| | |
| | | <el-icon> |
| | | <ele-FolderAdd /> |
| | | </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" /> |
| | | <el-table-column prop="region" label="设备区域名称" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="regionType" label="设备区域类型" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="regionDepartment" label="所属部门" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="createByUserName" label="创建人" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="gmtCreate" label="创建时间" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="lastEditUserName" label="最后修改人" show-overflow-tooltip></el-table-column> |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | <br /> |
| | | <el-pagination |
| | | @size-change="onHandleSizeChange" |
| | | @current-change="onHandleCurrentChange" |
| | | :pager-count="5" |
| | | :page-sizes="[10, 20, 30]" |
| | | v-model:current-page="facilityAreaData.params.pageIndex" |
| | | background |
| | | v-model:page-size="facilityAreaData.params.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="facilityAreaData.total" |
| | | class="page-position" |
| | | > |
| | | </el-pagination> |
| | | <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" :pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="facilityAreaData.params.pageIndex" background v-model:page-size="facilityAreaData.params.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="facilityAreaData.total" class="page-position"> </el-pagination> |
| | | <br /> |
| | | <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}”,是否继续?`, '提示', { |
| | | confirmButtonText: '确认', |
| | |
| | | return { |
| | | Edit, |
| | | Delete, |
| | | Upload, |
| | | uploadRef, |
| | | openUploadDialog, |
| | | handleSearch, |
| | | onOpenDialogRef, |
| | | onHandleSizeChange, |