| | |
| | | <el-row class="cardTop"> |
| | | <el-col :span="12" class="mainCardBtn"> |
| | | <el-button type="primary" :icon="Plus" size="default" @click="openInspectTaskDialog('新增', {})">新增</el-button> |
| | | <el-button type="primary" :icon="Upload" size="default" @click="openUploadDialog('任务')">导入</el-button> |
| | | <!-- <el-button type="danger" :icon="Delete" size="default" plain>删除</el-button>--> |
| | | </el-col> |
| | | <el-button type="primary" :icon="Refresh" size="default" /> |
| | | </el-row> |
| | | <el-table ref="multipleTableRef" :data="tableData.inspectTaskData" style="width: 100%" height="calc(100% - 100px)" :header-cell-style="{ background: '#fafafa' }" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" /> |
| | | <!-- <el-table-column type="selection" width="55" />--> |
| | | <el-table-column property="unitName" label="任务名称" /> |
| | | <el-table-column property="workType" label="任务类型"> |
| | | <template #default="scope"> |
| | |
| | | </div> |
| | | </div> |
| | | <inspect-task-dialog ref="inspectTaskDialogRef" @refreshInspectTask="getInspectionTask"></inspect-task-dialog> |
| | | <upload-dialog ref="uploadRef" @refresh="getInspectionTask"></upload-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { toRefs, reactive, ref, onMounted } from 'vue'; |
| | | 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'; |
| | | import { ElTable, ElMessage, ElMessageBox } from 'element-plus'; |
| | | import { inspectTaskApi } from '/@/api/intellectInspectSystem/inspectTask'; |
| | | import inspectTaskDialog from './components/inspectTaskDialog.vue'; |
| | | import inspectTaskDialog from './components/inspectTaskDialog.vue' |
| | | import uploadDialog from './components/upload.vue' |
| | | import { departmentApi } from '/@/api/systemManage/department'; |
| | | import { teamManageApi } from '/@/api/systemManage/personShiftManage/teamManage'; |
| | | import { inspectPointApi } from '/@/api/intellectInspectSystem/inspectPointManage'; |
| | |
| | | } |
| | | export default { |
| | | name: 'index', |
| | | components: { inspectTaskDialog }, |
| | | components: { inspectTaskDialog, uploadDialog }, |
| | | setup() { |
| | | const inspectTaskDialogRef = ref(); |
| | | const uploadRef = ref() |
| | | const state = reactive<stateType>({ |
| | | tableData: { |
| | | inspectTaskData: [], |
| | |
| | | } |
| | | }; |
| | | |
| | | const openUploadDialog = (type: string)=>{ |
| | | uploadRef.value.open(type) |
| | | } |
| | | |
| | | // 分页改变 |
| | | const onHandleSizeChange = (val: number) => { |
| | | state.tableData.params.pageSize = val; |
| | |
| | | Delete, |
| | | Refresh, |
| | | Plus, |
| | | Upload, |
| | | reset, |
| | | openUploadDialog, |
| | | changeStatus, |
| | | changeGroup, |
| | | parseNumber, |
| | |
| | | onHandleSizeChange, |
| | | onHandleCurrentChange, |
| | | inspectTaskDialogRef, |
| | | uploadRef, |
| | | openInspectTaskDialog, |
| | | ...toRefs(state) |
| | | }; |