| | |
| | | const monBtn = ref<any>('primary'); |
| | | |
| | | function queryData(type: ViewMode) { |
| | | // TODO 日视图和月视图后端已统一方法 前端可删除日视图多余配置 |
| | | if (type === ViewMode.Day) { |
| | | dayBtn.value = 'primary'; |
| | | monBtn.value = 'default'; |
| | | curViewMode.value = ViewMode.Day; |
| | | tableApi.setGridOptions(gridOptions2); |
| | | // tableApi.setGridOptions(gridOptions2); |
| | | } else if (type === ViewMode.Month) { |
| | | dayBtn.value = 'default'; |
| | | monBtn.value = 'primary'; |
| | | curViewMode.value = ViewMode.Month; |
| | | tableApi.setGridOptions(gridOptions); |
| | | // tableApi.setGridOptions(gridOptions); |
| | | } |
| | | tableApi.query(); |
| | | } |
| | |
| | | <template> |
| | | <Page :auto-content-height="true"> |
| | | <div class="flex h-full gap-[8px] flex-col"> |
| | | <BasicTable class="h-2/3" table-title="点检记录列表"> |
| | | <BasicTable class="h-2/3" table-title="点检汇总列表"> |
| | | <template #toolbar-tools> |
| | | <Space> |
| | | <Button :type="dayBtn" @click.stop="queryData(ViewMode.Day)">日视图</Button> |
| | |
| | | <ghost-button v-access:code="['eims:inspectSt:edit']" @click.stop="handleEdit(row)"> |
| | | {{ $t('pages.common.edit') }} |
| | | </ghost-button> |
| | | <Popconfirm :get-popup-container="getVxePopupContainer" placement="left" title="确认删除?" |
| | | @confirm="handleDelete(row)"> |
| | | <Popconfirm :get-popup-container="getVxePopupContainer" placement="left" title="确认删除?" @confirm="handleDelete(row)"> |
| | | <ghost-button danger v-access:code="['eims:inspectSt:remove']" @click.stop=""> |
| | | {{ $t('pages.common.delete') }} |
| | | </ghost-button> |
| | |
| | | </Space> |
| | | </template> |
| | | </BasicTable> |
| | | <BasisSubTable :columns="recordCol" :list-api="listInspStRecord" :req-value="recordId" class="h-1/3" |
| | | req-key="inspCode" title="点检记录" /> |
| | | <BasisSubTable :columns="recordCol" :list-api="listInspStRecord" :req-value="recordId" class="h-1/3" req-key="inspCode" title="点检记录" /> |
| | | </div> |
| | | <InspStDrawer @reload="tableApi.query()" /> |
| | | </Page> |