| | |
| | | </el-icon> |
| | | 新增设备区域 |
| | | </el-button> |
| | | <el-button type="primary" :icon="Upload" size="default" @click="openUploadDialog('区域')">导入</el-button> |
| | | </div> |
| | | <el-table :data="facilityAreaData.data" style="width: 100%"> |
| | | <el-table-column type="index" label="序号" width="60" /> |
| | |
| | | <br /> |
| | | </el-card> |
| | | <facilityAreaDialog ref="facilityAreaDialogRef" @refreshFacilityArea="initFacilityAreaTableData" /> |
| | | <upload-dialog ref="uploadRef" @refresh="initFacilityAreaTableData"></upload-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { toRefs, reactive, onMounted, ref, defineComponent } from 'vue'; |
| | | import { ElMessageBox, ElMessage } from 'element-plus'; |
| | | import facilityAreaDialog from './components/facilityAreaDialog.vue'; |
| | | import uploadDialog from '/@/views/intellectInspect/inspectTaskManage/inspectTask/components/upload.vue' |
| | | import { facilityAreaApi } from '/@/api/intellectInspectSystem/facilityAreaManage'; |
| | | import { Edit, View, Plus, Delete, Refresh, Search, Download } from '@element-plus/icons-vue'; |
| | | import { Edit, View, Plus, Delete, Refresh, Search, Download, Upload } from '@element-plus/icons-vue'; |
| | | |
| | | // 定义接口来定义对象的类型 |
| | | interface TableData { |
| | |
| | | |
| | | export default defineComponent({ |
| | | name: 'facilityArea', |
| | | components: { facilityAreaDialog, Edit, Delete }, |
| | | components: { facilityAreaDialog, Edit, Delete, uploadDialog }, |
| | | setup() { |
| | | const facilityAreaDialogRef = ref(); |
| | | const uploadRef = ref() |
| | | const state = reactive<TableDataState>({ |
| | | facilityAreaData: { |
| | | data: [], |
| | |
| | | const onOpenDialogRef = (type: string, value: any) => { |
| | | facilityAreaDialogRef.value.openFacilityAreaDialog(type, value, state.facilityAreaTypeList); |
| | | }; |
| | | |
| | | const openUploadDialog = (type: string)=>{ |
| | | uploadRef.value.open(type) |
| | | } |
| | | |
| | | // 删除 |
| | | const onDelProductionDevice = (row: any) => { |
| | | ElMessageBox.confirm(`此操作将永久删除该条设备区域:“${row.region}”,是否继续?`, '提示', { |
| | |
| | | return { |
| | | Edit, |
| | | Delete, |
| | | Upload, |
| | | uploadRef, |
| | | openUploadDialog, |
| | | handleSearch, |
| | | onOpenDialogRef, |
| | | onHandleSizeChange, |