| | |
| | | </el-table-column> |
| | | <el-table-column align="center" label="巡检"> |
| | | <template #default="scope"> |
| | | <span v-if="scope.row.isVisit == 0">-</span> |
| | | <span v-if="scope.row.isVisit == 1">是</span> |
| | | <span v-if="scope.row.isVisit == 2">否</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="检测"> |
| | | <template #default="scope"> |
| | | <span v-if="scope.row.isCheck == 0">-</span> |
| | | <span v-if="scope.row.isCheck == 1">是</span> |
| | | <span v-if="scope.row.isCheck == 2">否</span> |
| | | </template> |
| | |
| | | <template #default="scope"> |
| | | <el-button type="primary" link :icon="View" @click="openD('查看', scope.row.id)">查看</el-button> |
| | | <el-button type="primary" link :icon="EditPen" @click="openD('修改', scope.row.id)">修改</el-button> |
| | | <el-button type="primary" link :icon="Delete" @click="Delete(scope.row.id)">删除</el-button> |
| | | <el-button type="primary" link :icon="Delete" @click="Deletes(scope.row.id)">删除</el-button> |
| | | <el-button type="primary" link :icon="CirclePlus" @click="openD('添加', scope.row.id)">添加下级设备设施类型管理</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | import { Plus, View, EditPen, Delete, CirclePlus } from '@element-plus/icons-vue'; |
| | | import Dailog from './component/Dailog.vue'; |
| | | import { facilityManagementApi } from '/@/api/facilityManagement'; |
| | | import { ElMessage } from 'element-plus'; |
| | | import { ElMessage,ElMessageBox } from 'element-plus'; |
| | | export default defineComponent({ |
| | | components: { Dailog }, |
| | | setup() { |
| | |
| | | listApi(); |
| | | }); |
| | | // 删除 |
| | | const Delete = (id: number) => { |
| | | facilityManagementApi() |
| | | .getequipmentTypeMngDelete(id) |
| | | .then((res) => { |
| | | if (res.data.code == 200) { |
| | | ElMessage({ |
| | | showClose: true, |
| | | message: res.data.msg, |
| | | type: 'success', |
| | | const Deletes = (id: number) => { |
| | | let arr = []; |
| | | arr.push(id); |
| | | ElMessageBox.confirm('确定删除所选项吗?', 'Warning', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then(() => { |
| | | facilityManagementApi() |
| | | .getequipmentTypeMngDelete(arr) |
| | | .then((res) => { |
| | | if (res.data.code == 200) { |
| | | ElMessage({ |
| | | showClose: true, |
| | | message: res.data.msg, |
| | | type: 'success', |
| | | }); |
| | | listApi(); |
| | | } else { |
| | | } |
| | | }); |
| | | listApi(); |
| | | } else { |
| | | ElMessage({ |
| | | showClose: true, |
| | | message: res.data.msg, |
| | | type: 'error', |
| | | }); |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: 'Delete canceled', |
| | | }); |
| | | }); |
| | | }; |
| | | const add = () => { |
| | |
| | | add, |
| | | tableData, |
| | | Show, |
| | | Delete, |
| | | Deletes, |
| | | openD, |
| | | listApi, |
| | | Plus, |
| | | View, |
| | | EditPen, |
| | | CirclePlus, |
| | | Delete, |
| | | }; |
| | | }, |
| | | }); |