Merge remote-tracking branch 'origin/master'
| | |
| | | <el-input class="command-input" v-model="formData.disposeWay" maxlength="200" type="textarea" placeholder="请输入" clearable /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <div v-if="checkAreaBind" class="warning-text"> 注:该设备已绑定区域,报废设备该区域无法正常使用,是否报废?</div> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | |
| | | import { computed, ref } from 'vue' |
| | | import { ElMessage } from 'element-plus' |
| | | import { fieldRules } from '@ztzf/utils' |
| | | import { fwDeviceScrapSaveApi } from '@/views/basicManage/deviceStock/fwDeviceScrapApi' |
| | | import { fwDeviceScrapSaveApi,fivDevicelcheckAreaBindApi } from '@/views/basicManage/deviceStock/fwDeviceScrapApi' |
| | | import dayjs from 'dayjs' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | |
| | | dialogMode.value = mode || 'add' |
| | | visible.value = true |
| | | formData.value.deviceId = row.id |
| | | getCheckAreaBind() |
| | | } |
| | | const checkAreaBind = ref(false) |
| | | function getCheckAreaBind() { |
| | | fivDevicelcheckAreaBindApi({ |
| | | deviceId: formData.value.deviceId |
| | | }).then(res => { |
| | | checkAreaBind.value = res.data.data |
| | | }) |
| | | } |
| | | |
| | | onMounted(() => {}) |
| | | onMounted(() => { |
| | | getCheckAreaBind() |
| | | }) |
| | | |
| | | defineExpose({ open }) |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .warning-text { |
| | | width: 100%; |
| | | color: red; |
| | | font-size: 14px; |
| | | text-align: center; |
| | | margin: -10px 0 10px 0; |
| | | } |
| | | </style> |
| | |
| | | params, |
| | | }) |
| | | } |
| | | |
| | | // 设置区域绑定校验 |
| | | export const fivDevicelcheckAreaBindApi = params => { |
| | | return request({ |
| | | url: `/drone-fw/device/fwDevice/checkAreaBind`, |
| | | method: 'get', |
| | | params, |
| | | }) |
| | | } |
| | | |
| | | |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="label">擅长任务类型</div> |
| | | <div class="val">{{ getDictLabel(formData.skilledTaskType, dictObj.skilledTaskType) }}</div> |
| | | <div class="val">{{ getDictLabel(formData.skilledTaskType, dictObj.patrolTaskType) }}</div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="label">项目经验</div> |
| | |
| | | :disabled="dialogType === 'view'" |
| | | > |
| | | <el-option |
| | | v-for="item in dictObj.skilledTaskType" |
| | | v-for="item in dictObj.patrolTaskType" |
| | | :key="item.dictKey" |
| | | :label="item.dictValue" |
| | | :value="item.dictKey" |
| | |
| | | </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.patrolTaskType) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" class-name="operation-btns" width="180"> |
| | |
| | | const flyingHandData = ref({}) |
| | | |
| | | const dictObj = ref({ |
| | | skilledTaskType: [], // 擅长任务类型 |
| | | patrolTaskType: [], // 擅长任务类型 |
| | | skilledUavType: [], // 擅长机型 |
| | | technicalStrength: [] // 技术特长 |
| | | }) |
| | |
| | | |
| | | // 获取字典 |
| | | function getDictList() { |
| | | getDictionaryByCode('skilledTaskType,skilledUavType,technicalStrength').then(res => { |
| | | getDictionaryByCode('patrolTaskType,skilledUavType,technicalStrength').then(res => { |
| | | dictObj.value = res.data.data |
| | | }) |
| | | } |
| | |
| | | <div class="gd-table-toolbar"> |
| | | <el-button :icon="Plus" color="#4C34FF" type="primary" @click="openForm('add')">新增机构</el-button> |
| | | <el-button :icon="Upload" @click="handleImport">导入机构</el-button> |
| | | <el-button :icon="Download" @click="handleExport">导出机构</el-button> |
| | | <el-button :icon="Download" :loading="exportLoading" :disabled="exportLoading" @click="handleExport">导出机构</el-button> |
| | | </div> |
| | | |
| | | <div class="gd-table-container" v-loading="loading"> |
| | |
| | | const importRules = ref({ |
| | | file: [{ required: true, message: '请上传文件', trigger: ['change'] }], |
| | | }) |
| | | |
| | | // 导出加载状态 |
| | | const exportLoading = ref(false) |
| | | |
| | | provide('regionOptions', regionOptions) |
| | | provide('dictObj', dictObj) |
| | |
| | | } |
| | | |
| | | // 导出机构 |
| | | function handleExport() { |
| | | agenciesExportApi(searchParams.value).then(res => { |
| | | async function handleExport() { |
| | | exportLoading.value = true |
| | | try { |
| | | const res = await agenciesExportApi(searchParams.value) |
| | | const blob = new Blob([res.data]) |
| | | const url = URL.createObjectURL(blob) |
| | | const a = document.createElement('a') |
| | |
| | | a.click() |
| | | document.body.removeChild(a) |
| | | URL.revokeObjectURL(url) |
| | | }) |
| | | } catch (error) { |
| | | console.error('导出失败:', error) |
| | | } finally { |
| | | exportLoading.value = false |
| | | } |
| | | } |
| | | |
| | | onMounted(() => { |
| | |
| | | <div class="gd-table-toolbar"> |
| | | <el-button :icon="Plus" color="#4C34FF" type="primary" @click="openForm('add')">新增区划</el-button> |
| | | <el-button :icon="Upload" @click="handleImport">导入区划</el-button> |
| | | <el-button :icon="Download" @click="handleExport">导出区划</el-button> |
| | | <el-button :icon="Download" :loading="exportLoading" :disabled="exportLoading" @click="handleExport">导出区划</el-button> |
| | | </div> |
| | | |
| | | <div class="gd-table-container" v-loading="loading"> |
| | |
| | | const importRules = ref({ |
| | | file: [{ required: true, message: '请上传文件', trigger: ['change'] }], |
| | | }) |
| | | |
| | | // 导出加载状态 |
| | | const exportLoading = ref(false) |
| | | |
| | | provide('regionOptions', regionOptions) |
| | | provide('dictObj', dictObj) |
| | |
| | | } |
| | | |
| | | // 导出区划 |
| | | function handleExport() { |
| | | zoningExportApi(searchParams.value).then(res => { |
| | | async function handleExport() { |
| | | exportLoading.value = true |
| | | try { |
| | | const res = await zoningExportApi(searchParams.value) |
| | | const blob = new Blob([res.data]) |
| | | const url = URL.createObjectURL(blob) |
| | | const a = document.createElement('a') |
| | | a.href = url |
| | | a.download = `区划列表${new Date().getTime()}.xlsx` |
| | | a.download = `区划列表.xlsx` |
| | | document.body.appendChild(a) |
| | | a.click() |
| | | document.body.removeChild(a) |
| | | URL.revokeObjectURL(url) |
| | | }) |
| | | } catch (error) { |
| | | console.error('导出失败:', error) |
| | | } finally { |
| | | exportLoading.value = false |
| | | } |
| | | } |
| | | |
| | | onMounted(() => { |