| | |
| | | |
| | | import { columns, querySchema } from './data'; |
| | | import fixtureDrawer from './fixture-drawer.vue'; |
| | | import fixtureBorrowListDrawer from './fixture-borrow-list-drawer.vue'; |
| | | import fixtureImportModal from './fixture-import-modal.vue'; |
| | | import FixtureTypeTree from './fixture-type-tree.vue'; |
| | | |
| | |
| | | formOptions, |
| | | gridOptions, |
| | | gridEvents: { |
| | | sortChange: (sortParams) => vxeSortEvent(tableApi, sortParams) |
| | | sortChange: (sortParams) => vxeSortEvent(tableApi, sortParams), |
| | | cellClick: (e: any) => { |
| | | const { row } = e; |
| | | console.error() |
| | | handleBorroeList(row) |
| | | } |
| | | } |
| | | }); |
| | | |
| | | const [FixtureDrawer, fixtureDrawerApi] = useVbenDrawer({ |
| | | connectedComponent: fixtureDrawer |
| | | }); |
| | | const [FixtureBorrowListDrawer, fixtureBorrowListDrawerApi] = useVbenDrawer({ |
| | | connectedComponent: fixtureBorrowListDrawer, |
| | | placement: 'left' |
| | | }); |
| | | |
| | | const [FixtureBorrowDrawer, fixtureBorrowDrawerApi] = useVbenDrawer({ |
| | |
| | | function handleAdd() { |
| | | fixtureDrawerApi.setData({}); |
| | | fixtureDrawerApi.open(); |
| | | } |
| | | |
| | | async function handleBorroeList(record: Recordable<any>) { |
| | | fixtureBorrowListDrawerApi.setData({ fixtureId: record.id }); |
| | | fixtureBorrowListDrawerApi.open(); |
| | | } |
| | | |
| | | async function handleEdit(record: Recordable<any>) { |
| | |
| | | <ghost-button v-if="isBorrow(row)" class="btn-success" v-access:code="['eims:fixture:borrow']" @click="handleBorrow(row, '0')"> |
| | | 借用 |
| | | </ghost-button> |
| | | <ghost-button |
| | | v-else-if="isReturn(row) && isBorrowUser(row)" |
| | | v-access:code="['eims:fixture:borrow']" |
| | | @click="handleBorrow(row, '1')" |
| | | > |
| | | <ghost-button v-else-if="isReturn(row) && isBorrowUser(row)" v-access:code="['eims:fixture:borrow']" @click="handleBorrow(row, '1')"> |
| | | 归还 |
| | | </ghost-button> |
| | | <Popconfirm :get-popup-container="getVxePopupContainer" placement="left" title="确认删除?" @confirm="handleDelete(row)"> |
| | |
| | | </BasicTable> |
| | | </div> |
| | | <FixtureDrawer @reload="tableApi.query()" /> |
| | | <!--工具借出归还操作--> |
| | | <FixtureBorrowDrawer @reload="tableApi.query()" /> |
| | | <!--查看工具借出归还记录--> |
| | | <FixtureBorrowListDrawer /> |
| | | <FixtureImportModal @reload="tableApi.query()" /> |
| | | </Page> |
| | | </template> |