|
|
|
@ -4,7 +4,7 @@ import { onMounted } from 'vue' |
|
|
|
|
|
|
|
import { useRoute } from 'vue-router' |
|
|
|
import { columns, searchFormSchema } from './alarm.data' |
|
|
|
// import UpdateModal from './UpdateModal.vue' |
|
|
|
import UpdateModal from '../../run/instant/warnConfig/UpdateModal.vue' |
|
|
|
|
|
|
|
import { BasicTable, TableAction, useTable } from '@/components/Table' |
|
|
|
import { getWarnPageReal, updateWarn } from '@/api/alert/warn' |
|
|
|
@ -32,11 +32,15 @@ const [registerTable, { getForm, reload, getDataSource, updateTableDataRecord }] |
|
|
|
labelWidth: 80, |
|
|
|
schemas: searchFormSchema, |
|
|
|
showResetButton: false, |
|
|
|
submitButtonOptions:{ |
|
|
|
preIcon: IconEnum.SEARCH, |
|
|
|
}, |
|
|
|
actionColOptions: { |
|
|
|
span: 4, |
|
|
|
span: 2, |
|
|
|
style: { |
|
|
|
marginLeft: '10px' |
|
|
|
} |
|
|
|
textAlign: 'left', |
|
|
|
marginLeft: '10px', |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
showTableSetting: true, |
|
|
|
@ -55,7 +59,7 @@ async function updateStatus(record) { |
|
|
|
console.log(record) |
|
|
|
reload() |
|
|
|
} |
|
|
|
function handleWarnConfig(record: Recordable) { |
|
|
|
function handleUpdate(record: Recordable) { |
|
|
|
openUpdateModal(true, { record, isUpdate: true }) |
|
|
|
} |
|
|
|
|
|
|
|
@ -73,16 +77,16 @@ onMounted(async () => { |
|
|
|
<TableAction |
|
|
|
:actions="[ |
|
|
|
|
|
|
|
{ icon: IconEnum.EDIT, label: t('action.edit'), auth: 'run:instant:warnConfig', onClick: handleWarnConfig.bind(null, record) }, |
|
|
|
{ icon: IconEnum.TREND, label: t('action.trend'), auth: 'run:instant:warnConfig', onClick: handleWarnConfig.bind(null, record) }, |
|
|
|
{ icon: IconEnum.DETAIL, label: t('action.detail'), auth: 'run:instant:warnConfig', onClick: handleWarnConfig.bind(null, record) }, |
|
|
|
{ icon: IconEnum.EDIT, label: t('action.edit'), onClick: handleUpdate.bind(null, record) }, |
|
|
|
{ icon: IconEnum.TREND, label: t('action.trend'), onClick: handleUpdate.bind(null, record) }, |
|
|
|
{ icon: IconEnum.DETAIL, label: t('action.detail'), onClick: handleUpdate.bind(null, record) }, |
|
|
|
|
|
|
|
]" |
|
|
|
/> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</BasicTable> |
|
|
|
<!-- <UpdateModal @register="registerUpdateModal" @success="reload" />--> |
|
|
|
<UpdateModal @register="registerUpdateModal" @success="reload" /> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
|