|
|
|
@ -1,7 +1,7 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
import { reactive } from "vue"; |
|
|
|
import { reactive, useTemplateRef } from "vue"; |
|
|
|
import { ElButton } from "element-plus"; |
|
|
|
import { Search } from "@element-plus/icons-vue"; |
|
|
|
import { Delete, Search } from "@element-plus/icons-vue"; |
|
|
|
import DataForm from "@/components/data-form/DataForm.vue"; |
|
|
|
import type { FormField } from "@/components/data-form/DataFormTypes.ts"; |
|
|
|
import { AgGridVue } from "ag-grid-vue3"; |
|
|
|
@ -110,6 +110,7 @@ const data: ComponentData = { |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
const grid = useTemplateRef<InstanceType<typeof AgGridVue>>("gridRef"); |
|
|
|
|
|
|
|
function reload() { |
|
|
|
data.api.paginationGoToPage(0); |
|
|
|
@ -135,12 +136,27 @@ function serverSideDatasource(params: IServerSideGetRowsParams) { |
|
|
|
params.success({ rowData: page.records, rowCount: page.total }) |
|
|
|
}).finally(() => state.loading = false); |
|
|
|
} |
|
|
|
|
|
|
|
function delInvLpn() { |
|
|
|
const row = data.api?.getSelectedRows()?.[0]; |
|
|
|
console.log("row", row); |
|
|
|
system.confirm("确定删除").then(res => { |
|
|
|
Request.request.get("/api/workbench/DeviceManager@delInvLpn", { |
|
|
|
params: { |
|
|
|
lpn: row.lpn, |
|
|
|
locCode: row.loc_code, |
|
|
|
envId: row.env_id, |
|
|
|
}, |
|
|
|
}).then(res=> reload()).finally(); |
|
|
|
}); |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<template> |
|
|
|
<div class="common-layout dashboard flex-column-container"> |
|
|
|
<div class="flex-item-fixed toolbar"> |
|
|
|
<ElButton :icon="Search" :loading="state.loading" @click="reload" type="warning" plain>查询</ElButton> |
|
|
|
<ElButton :icon="Delete" @click="delInvLpn" type="danger" plain>删除</ElButton> |
|
|
|
</div> |
|
|
|
<DataForm |
|
|
|
class="query-form flex-item-fixed" |
|
|
|
|