| | |
| | | <div> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="getList">搜索</el-button> |
| | | <el-button @click="cancelSearch">取消</el-button> |
| | | <el-button @click="cancelSearch">清空</el-button> |
| | | </el-form-item> |
| | | </div> |
| | | </div> |
| | |
| | | </template> |
| | | <script setup> |
| | | import { getAirSpaceTypeList, airSpaceTypeEdit, airSpaceTypeAdd, airSpaceTypeDelete } from '@/api/airspace/airspace'; |
| | | import { ElMessage } from 'element-plus' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | |
| | | const total = ref(0) |
| | | const params = ref({ |
| | |
| | | rowView.value = row |
| | | } |
| | | function handleDelete (row) { |
| | | // 确定要删除么? |
| | | ElMessage({ |
| | | message: '确定要删除么?', |
| | | ElMessageBox.confirm('确定将选择数据删除?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | showClose: true, |
| | | onClose: () => { |
| | | airSpaceTypeDelete(row.id).then(res => { |
| | | ElMessage.success('删除成功') |
| | | getList() |
| | | }) |
| | | } |
| | | }).then(() => { |
| | | airSpaceTypeDelete(row.id).then(res => { |
| | | ElMessage.success('删除成功') |
| | | getList() |
| | | }) |
| | | }).catch(() => { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: '已取消删除' |
| | | }) |
| | | }) |
| | | |
| | | } |
| | | function handleAdd() { |
| | | titleTxt.value = '新增' |