Merge remote-tracking branch 'origin/master'
| | |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="飞手姓名" prop="flyerId"> |
| | | <el-select |
| | | <el-select v-if="dialogType === 'add'" |
| | | class="gd-select" |
| | | popper-class="gd-select-popper" |
| | | v-model="formData.flyerId" |
| | | placeholder="请选择" |
| | | clearable |
| | | @change="handleChange" |
| | | :disabled="dialogType === 'view'" |
| | | > |
| | | <el-option |
| | | v-for="item in flyingHandList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | <el-select v-else |
| | | class="gd-select" |
| | | popper-class="gd-select-popper" |
| | | v-model="formData.flyerId" |
| | | placeholder="请选择" |
| | | clearable |
| | | :disabled="dialogType === 'edit'" |
| | | > |
| | | <el-option |
| | | v-for="item in flyingHandEditList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | |
| | | const dictObj = inject('dictObj') // 擅长任务类型 |
| | | |
| | | const flyingHandList = inject('flyingHandList') // 飞手列表 |
| | | const flyingHandEditList = inject('flyingHandEditList') // 飞手建档列表 |
| | | |
| | | |
| | | const emit = defineEmits(['update:modelValue', 'confirm']) |
| | | |
| | |
| | | method: 'post', |
| | | }) |
| | | } |
| | | |
| | | // 查看所有已经建档飞手 |
| | | export function getAllFlyerIds(params) { |
| | | return request({ |
| | | url: '/drone-gd/flyer/gdFlyer/allFlyerIds', |
| | | method: 'get', |
| | | params |
| | | }) |
| | | } |
| | |
| | | import { onMounted, ref, nextTick } from 'vue' |
| | | import { getDictionaryByCode } from '@/api/system/dictbiz' |
| | | import { getDictLabel } from '@ztzf/utils' |
| | | import { getFlyingHandPage, removeFlyingHand } from './flyingHandApi' |
| | | import { getFlyingHandPage, removeFlyingHand,getAllFlyerIds } from './flyingHandApi' |
| | | import { deviceFlyerApi,deviceFlyerDetailApi } from '@/api/zkxt' |
| | | import FlyingHandDialog from './FlyingHandDialog.vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | |
| | | function handleSearch() { |
| | | searchParams.value.current = 1 |
| | | getList() |
| | | getFlyingHandList() |
| | | } |
| | | |
| | | // 重置查询 |
| | |
| | | queryParamsRef.value?.resetFields() |
| | | searchParams.value.current = 1 |
| | | getList() |
| | | getFlyingHandList() |
| | | } |
| | | |
| | | // 添加飞手 |
| | |
| | | await removeFlyingHand({ ids: ids }) |
| | | ElMessage.success('删除成功') |
| | | getList() |
| | | getFlyingHandList() |
| | | } |
| | | |
| | | // 处理弹窗确认 |
| | | function handleConfirm() { |
| | | dialogVisible.value = false |
| | | getList() |
| | | getFlyingHandList() |
| | | } |
| | | |
| | | // 获取字典 |
| | |
| | | |
| | | // 获取飞手列表 |
| | | const flyingHandList = ref([]) |
| | | const flyingHandEditList = ref([]) |
| | | function getFlyingHandList() { |
| | | deviceFlyerApi({ current: 1, size: 10 }).then(res => { |
| | | flyingHandList.value = res?.data?.data ?? [] |
| | | }) |
| | | getAllFlyerIds().then(resIds => { |
| | | console.log(resIds.data.data, '99999') |
| | | deviceFlyerApi({ current: 1, size: 9999 }).then(res => { |
| | | flyingHandEditList.value = res?.data?.data ?? [] |
| | | flyingHandList.value = res?.data?.data ?? [] |
| | | // 把已经建档的飞手从flyingHandList.value里面移除 |
| | | flyingHandList.value = flyingHandList.value.filter(item => !resIds.data.data.includes(item.id)) |
| | | console.log(flyingHandList.value, '11111') |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | provide('flyingHandList', flyingHandList) |
| | | provide('flyingHandEditList', flyingHandEditList) |
| | | |
| | | onMounted(() => { |
| | | getList() |
| | |
| | | const development = { |
| | | VITE_APP_ENV:'development', |
| | | // 开发环境这里改为自己的 |
| | | VITE_APP_WEBVIEW_URL: 'https://wrj.shuixiongit.com/drone-app-web-view/#/webViewWrapper', |
| | | // VITE_APP_WEBVIEW_URL: 'http://localhost:5173/drone-app-web-view/#/webViewWrapper', |
| | | // VITE_APP_WEBVIEW_URL: 'https://wrj.shuixiongit.com/drone-app-web-view/#/webViewWrapper', |
| | | VITE_APP_WEBVIEW_URL: 'https://wrj.shuixiongit.com/mobile-web-view/#/webViewWrapper', |
| | | VITE_API_BASE_URL: 'http://218.202.104.82:8200', |
| | | // VITE_API_BASE_URL: 'https://aisky.org.cn/api', |
| | | VITE_APP_WS_API_URL:'wss://wrj.shuixiongit.com/drone-wss/api/v1/ws', |
| | | |
| | | |
| | | // 静态资源存放地址' |
| | | VITE_APP_ASSETS_URL: 'https://wrj.shuixiongit.com/aiskyminio/cloud-bucket/ztzf_app_assets' |
| | | } |
| | |
| | | error.data?.error_description !== "Bad credentials" |
| | | ? error.data?.error_description |
| | | : "登录失败,请重试"; |
| | | uni.showToast({ |
| | | title: errorMsg, |
| | | icon: "none", |
| | | duration: 2000, |
| | | }); |
| | | // uni.showToast({ |
| | | // title: errorMsg, |
| | | // icon: "none", |
| | | // duration: 2000, |
| | | // }); |
| | | } |
| | | } |
| | | |
| | |
| | | }); |
| | | } |
| | | }).catch(err => { |
| | | uni.showToast({ |
| | | title: '网络错误,请稍后重试', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }); |
| | | // uni.showToast({ |
| | | // title: '网络错误,请稍后重试', |
| | | // icon: 'none', |
| | | // duration: 2000 |
| | | // }); |
| | | }); |
| | | }; |
| | | function register() { |
| | |
| | | }); |
| | | } |
| | | }).catch(err => { |
| | | uni.showToast({ |
| | | title: '网络错误,请稍后重试', |
| | | icon: 'none', |
| | | }); |
| | | // uni.showToast({ |
| | | // title: '网络错误,请稍后重试', |
| | | // icon: 'none', |
| | | // }); |
| | | }); |
| | | } |
| | | </script> |
| | |
| | | }); |
| | | } |
| | | }).catch(err => { |
| | | uni.showToast({ |
| | | title: '网络错误,请稍后重试', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }); |
| | | // uni.showToast({ |
| | | // title: '网络错误,请稍后重试', |
| | | // icon: 'none', |
| | | // duration: 2000 |
| | | // }); |
| | | }); |
| | | }; |
| | | const reset = () => { |
| | |
| | | }); |
| | | } |
| | | }).catch(err => { |
| | | uni.showToast({ |
| | | title: '网络错误,请稍后重试', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }); |
| | | console.log(err); |
| | | // uni.showToast({ |
| | | // title: '网络错误,请稍后重试', |
| | | // icon: 'none', |
| | | // duration: 2000 |
| | | // }); |
| | | }); |
| | | }; |
| | | onShow(async () => { |