| | |
| | | <el-form ref="queryParamsRef" :model="searchParams" class="gd-search-form"> |
| | | <el-form-item label="飞手姓名" prop="flyerName"> |
| | | <el-input |
| | | class="gd-input gray" |
| | | class="gd-input gray" |
| | | v-model="searchParams.flyerName" |
| | | placeholder="请输入飞手姓名" |
| | | clearable |
| | | @clear="handleSearch" |
| | | /> |
| | | <!-- <el-select |
| | | class="gd-select gray" |
| | | popper-class="gd-select-popper" |
| | | v-model="searchParams.flyerName" |
| | | placeholder="请选择飞手姓名" |
| | | > |
| | | <el-option |
| | | v-for="item in flyingHandList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> --> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="擅长机型" prop="skilledUavType"> |
| | |
| | | </el-form> |
| | | |
| | | <div class="gd-table-toolbar"> |
| | | <el-button :icon="Plus" color="#4C34FF" type="primary" @click="addFlyingHand">新增</el-button> |
| | | <el-button :icon="Plus" color="#4C34FF" type="primary" @click="addFlyingHand">飞手建档</el-button> |
| | | </div> |
| | | |
| | | <div class="gd-table-container" v-loading="loading"> |
| | |
| | | {{ getDictLabel(row.technicalStrength, dictObj.technicalStrength) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="skilledUavType" show-overflow-tooltip label="擅长机型" /> |
| | | <el-table-column prop="skilledUavType" show-overflow-tooltip label="擅长机型"> |
| | | <template v-slot="{ row }"> |
| | | {{ getDictLabel(row.skilledUavType, dictObj.skilledUavType) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="skilledTaskType" show-overflow-tooltip label="擅长任务类型"> |
| | | <template v-slot="{ row }"> |
| | | {{ getDictLabel(row.skilledTaskType, dictObj.skilledTaskType) }} |
| | | {{ getDictLabel(row.skilledTaskType, dictObj.workOrderType) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" class-name="operation-btns" width="180"> |
| | | <template v-slot="{ row }"> |
| | | <el-link @click="viewFlyingHand(row)">查看</el-link> |
| | | <el-link type="primary" @click="editFlyingHand(row)">编辑</el-link> |
| | | <el-link type="danger" @click="deleteFlyingHand(row.id)">删除</el-link> |
| | | <el-link type="danger" @click="deleteFlyingHand(row)">删除</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | import { getFlyingHandPage, removeFlyingHand } from './flyingHandApi' |
| | | import { deviceFlyerApi } from '@/api/zkxt' |
| | | import FlyingHandDialog from './FlyingHandDialog.vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { prod } from 'mathjs' |
| | | |
| | | // 初始化查询参数 |
| | |
| | | const flyingHandData = ref({}) |
| | | |
| | | const dictObj = ref({ |
| | | skilledTaskType: [], // 擅长任务类型 |
| | | workOrderType: [], // 擅长任务类型 |
| | | skilledUavType: [], // 擅长机型 |
| | | technicalStrength: [] // 技术特长 |
| | | }) |
| | |
| | | } |
| | | |
| | | // 删除飞手 |
| | | function deleteFlyingHand(id) { |
| | | ElMessageBox.confirm('确定要删除该飞手信息吗?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | async function deleteFlyingHand(row) { |
| | | const tips = row ? '该条' : '选中的项' |
| | | await ElMessageBox.confirm(`确认删除${tips}吗?`, '提示', { |
| | | type: 'warning', |
| | | }).then(async () => { |
| | | try { |
| | | await removeFlyingHand(id) |
| | | ElMessage.success('删除成功') |
| | | getList() |
| | | } catch (error) { |
| | | ElMessage.error('删除失败') |
| | | } |
| | | }).catch(() => { |
| | | // 取消删除 |
| | | customClass: 'gd-confirm-custom', |
| | | confirmButtonClass: 'gd-confirm-button', |
| | | cancelButtonClass: 'gd-confirm-cancel-button', |
| | | }) |
| | | const ids = row ? row.id : selectedIds.value.join(',') |
| | | await removeFlyingHand({ ids: ids }) |
| | | ElMessage.success('删除成功') |
| | | getList() |
| | | } |
| | | |
| | | // 处理弹窗确认 |
| | |
| | | |
| | | // 获取字典 |
| | | function getDictList() { |
| | | getDictionaryByCode('skilledTaskType,skilledUavType,technicalStrength').then(res => { |
| | | getDictionaryByCode('workOrderType,skilledUavType,technicalStrength').then(res => { |
| | | dictObj.value = res.data.data |
| | | }) |
| | | } |
| | |
| | | getFlyingHandList() |
| | | }) |
| | | </script> |
| | | <style scoped lang="scss"></style> |
| | | <style scoped lang="scss"></style> |