| | |
| | | {{ getDictLabel(row.areaType, dictObj.areaType) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="triggerCondition" show-overflow-tooltip width="130" label="触发条件" /> |
| | | <el-table-column prop="triggerCondition" show-overflow-tooltip width="130" label="触发条件"> |
| | | <template v-slot="{ row }"> |
| | | {{ getDictLabel(row.triggerCondition, dictObj.triggeringCondition) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="responseMechanism" show-overflow-tooltip width="130" label="响应机制" /> |
| | | <el-table-column prop="controlLevel" show-overflow-tooltip width="120" label="管控级别"> |
| | | <template v-slot="{ row }"> |
| | |
| | | import { fwAreaDividePageApi, fwAreaDivideRemoveApi } from './partitionApi' |
| | | import FormDiaLog from './FormDiaLog.vue' |
| | | import { getDictionaryByCode } from '@/api/system/dictbiz' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | import { getDictLabel } from '@ztzf/utils' |
| | | |
| | | const initSearchParams = () => ({ |
| | |
| | | const queryParamsRef = ref(null) // 查询表单实例 |
| | | const dialogRef = ref(null) // 弹框实例 |
| | | const dialogVisible = ref(false) |
| | | const route = useRoute() |
| | | |
| | | // 获取列表 |
| | | async function getList () { |
| | |
| | | // 删除 |
| | | async function handleDelete (row) { |
| | | const tips = row ? '该条' : '选中的项' |
| | | await ElMessageBox.confirm(`确认删除${tips}吗?`, '提示', { type: 'warning' }) |
| | | await ElMessageBox.confirm(`确认删除${tips}吗?`, '提示', { |
| | | type: 'warning', |
| | | customClass: 'command-page-view-message-box', |
| | | confirmButtonClass: 'command-message-box-confirm', |
| | | cancelButtonClass: 'command-message-box-cancel', |
| | | }) |
| | | const ids = row ? row.id : selectedIds.value.join(',') |
| | | await fwAreaDivideRemoveApi({ ids }) |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '区域划分'}-删除`, |
| | | type: 1, |
| | | }) |
| | | ElMessage.success('删除成功') |
| | | selectedIds.value = [] |
| | | getList() |
| | |
| | | const dictObj = ref({ |
| | | areaType: [], //区域类型 |
| | | controlLevel: [], //管控级别 |
| | | triggeringCondition: [], //触发条件 |
| | | deviceType: [], |
| | | }) |
| | | provide('dictObj', dictObj) |
| | | |
| | | // 获取字典 |
| | | function getDictList() { |
| | | getDictionaryByCode('areaType,controlLevel,deviceType').then(res => { |
| | | getDictionaryByCode('areaType,controlLevel,deviceType,triggeringCondition').then(res => { |
| | | dictObj.value = res.data.data |
| | | }) |
| | | } |