|
@ -1,5 +1,6 @@ |
|
|
<script lang="ts" setup> |
|
|
<script lang="ts" setup> |
|
|
import { onMounted, onUnmounted, ref } from 'vue' |
|
|
import { onMounted, onUnmounted, ref } from 'vue' |
|
|
|
|
|
import { Space } from 'ant-design-vue' |
|
|
import { columns, searchFormSchema } from '../exa.data' |
|
|
import { columns, searchFormSchema } from '../exa.data' |
|
|
import EXAModal from './EXAModal.vue' |
|
|
import EXAModal from './EXAModal.vue' |
|
|
import CreateBatchModal from './CreateBatchModal.vue' |
|
|
import CreateBatchModal from './CreateBatchModal.vue' |
|
@ -21,7 +22,6 @@ const [registerModal, { openModal }] = useModal() |
|
|
const [registerCreateBatchModal, { openModal: openCreateBatchModal }] = useModal() |
|
|
const [registerCreateBatchModal, { openModal: openCreateBatchModal }] = useModal() |
|
|
|
|
|
|
|
|
const [registerHistoryModal, { openModal: openHistoryModal }] = useModal() |
|
|
const [registerHistoryModal, { openModal: openHistoryModal }] = useModal() |
|
|
|
|
|
|
|
|
const [registerTable, { getForm, reload, getDataSource, updateTableDataRecord }] = useTable({ |
|
|
const [registerTable, { getForm, reload, getDataSource, updateTableDataRecord }] = useTable({ |
|
|
title: '测点列表', |
|
|
title: '测点列表', |
|
|
api: getEXAPage, |
|
|
api: getEXAPage, |
|
@ -33,23 +33,19 @@ const [registerTable, { getForm, reload, getDataSource, updateTableDataRecord }] |
|
|
schemas: searchFormSchema, |
|
|
schemas: searchFormSchema, |
|
|
showResetButton: false, |
|
|
showResetButton: false, |
|
|
actionColOptions: { |
|
|
actionColOptions: { |
|
|
span: 2, |
|
|
span: 6, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
useSearchForm: true, |
|
|
useSearchForm: true, |
|
|
showTableSetting: true, |
|
|
showTableSetting: true, |
|
|
showIndexColumn: false, |
|
|
showIndexColumn: false, |
|
|
actionColumn: { |
|
|
actionColumn: { |
|
|
width: 140, |
|
|
width: 80, |
|
|
title: t('common.action'), |
|
|
title: t('common.action'), |
|
|
dataIndex: 'action', |
|
|
dataIndex: 'action', |
|
|
fixed: 'right', |
|
|
fixed: 'right', |
|
|
}, |
|
|
}, |
|
|
}) |
|
|
}) |
|
|
// function handleQuery() { |
|
|
|
|
|
// getForm().setFieldsValue({ condition: '锅炉' }) |
|
|
|
|
|
// reload() |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
async function getNow() { |
|
|
async function getNow() { |
|
|
const params = getDataSource() |
|
|
const params = getDataSource() |
|
@ -109,6 +105,17 @@ async function handleDelete(record: Recordable) { |
|
|
<template> |
|
|
<template> |
|
|
<div> |
|
|
<div> |
|
|
<BasicTable @register="registerTable"> |
|
|
<BasicTable @register="registerTable"> |
|
|
|
|
|
<template #form-advanceBefore> |
|
|
|
|
|
<Space style="margin-right: 10%;"> |
|
|
|
|
|
<a-button v-auth="['system:role:create']" type="primary" :pre-icon="IconEnum.ADD" @click="handleCreate"> |
|
|
|
|
|
{{ t('action.create') }} |
|
|
|
|
|
</a-button> |
|
|
|
|
|
<a-button v-auth="['system:role:create']" type="primary" :pre-icon="IconEnum.ADDS" @click="handleCreateBatch"> |
|
|
|
|
|
{{ t('action.createBatch') }} |
|
|
|
|
|
</a-button> |
|
|
|
|
|
</Space> |
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
<template #value="{ record }"> |
|
|
<template #value="{ record }"> |
|
|
<a class="click-status" @click="handleHistory(record)"> |
|
|
<a class="click-status" @click="handleHistory(record)"> |
|
|
{{ record.value }} |
|
|
{{ record.value }} |
|
@ -116,12 +123,12 @@ async function handleDelete(record: Recordable) { |
|
|
<!-- <SlidersOutlined class="click-status" /> --> |
|
|
<!-- <SlidersOutlined class="click-status" /> --> |
|
|
</template> |
|
|
</template> |
|
|
<template #toolbar> |
|
|
<template #toolbar> |
|
|
<a-button v-auth="['system:role:create']" type="primary" :pre-icon="IconEnum.ADD" @click="handleCreate"> |
|
|
<!-- <a-button v-auth="['system:role:create']" type="primary" :pre-icon="IconEnum.ADD" @click="handleCreate"> |
|
|
{{ t('action.create') }} |
|
|
{{ t('action.create') }} |
|
|
</a-button> |
|
|
</a-button> |
|
|
<a-button v-auth="['system:role:create']" type="primary" :pre-icon="IconEnum.ADDS" @click="handleCreateBatch"> |
|
|
<a-button v-auth="['system:role:create']" type="primary" :pre-icon="IconEnum.ADDS" @click="handleCreateBatch"> |
|
|
{{ t('action.createBatch') }} |
|
|
{{ t('action.createBatch') }} |
|
|
</a-button> |
|
|
</a-button> --> |
|
|
<!-- <a-button v-auth="['system:role:create']" :pre-icon="IconEnum.EXPORT" @click="handleExport"> |
|
|
<!-- <a-button v-auth="['system:role:create']" :pre-icon="IconEnum.EXPORT" @click="handleExport"> |
|
|
{{ t('action.export') }} |
|
|
{{ t('action.export') }} |
|
|
</a-button> --> |
|
|
</a-button> --> |
|
|