style: 告警前传日志单行超出省略显示

This commit is contained in:
TsMask
2025-02-27 15:34:51 +08:00
parent 1517cb685c
commit 365fab3965

View File

@@ -73,7 +73,7 @@ let tableState: TabeStateType = reactive({
}); });
/**表格字段列 */ /**表格字段列 */
let tableColumns: ColumnsType = [ let tableColumns: ColumnsType = reactive([
{ {
title: t('common.rowId'), title: t('common.rowId'),
dataIndex: 'id', dataIndex: 'id',
@@ -97,6 +97,7 @@ let tableColumns: ColumnsType = [
dataIndex: 'result', dataIndex: 'result',
align: 'center', align: 'center',
width: 6, width: 6,
ellipsis: true,
}, },
{ {
title: t('views.logManage.forwarding.type'), title: t('views.logManage.forwarding.type'),
@@ -148,7 +149,7 @@ let tableColumns: ColumnsType = [
}, },
width: 5, width: 5,
}, },
]; ]);
/**表格分页器参数 */ /**表格分页器参数 */
let tablePagination = reactive({ let tablePagination = reactive({
@@ -187,7 +188,7 @@ function fnTableSize({ key }: MenuInfo) {
function fnGetList(pageNum?: number) { function fnGetList(pageNum?: number) {
if (tableState.loading) return; if (tableState.loading) return;
tableState.loading = true; tableState.loading = true;
if(pageNum){ if (pageNum) {
queryParams.pageNum = pageNum; queryParams.pageNum = pageNum;
} }
if (!queryRangePicker.value) { if (!queryRangePicker.value) {
@@ -196,11 +197,15 @@ function fnGetList(pageNum?: number) {
queryParams.beginTime = queryRangePicker.value[0]; queryParams.beginTime = queryRangePicker.value[0];
queryParams.endTime = queryRangePicker.value[1]; queryParams.endTime = queryRangePicker.value[1];
listForwarding(toRaw(queryParams)).then(res => { listForwarding(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
const { total, rows } = res.data; const { total, rows } = res.data;
tablePagination.total = total; tablePagination.total = total;
tableState.data = rows; tableState.data = rows;
if (tablePagination.total <=(queryParams.pageNum - 1) * tablePagination.pageSize &&queryParams.pageNum !== 1) { if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
queryParams.pageNum !== 1
) {
tableState.loading = false; tableState.loading = false;
fnGetList(queryParams.pageNum - 1); fnGetList(queryParams.pageNum - 1);
} }
@@ -234,7 +239,10 @@ onMounted(() => {
<a-form :model="queryParams" name="queryParams" layout="horizontal"> <a-form :model="queryParams" name="queryParams" layout="horizontal">
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :lg="6" :md="12" :xs="24"> <a-col :lg="6" :md="12" :xs="24">
<a-form-item :label="t('views.logManage.forwarding.type')" name="neType"> <a-form-item
:label="t('views.logManage.forwarding.type')"
name="neType"
>
<a-auto-complete <a-auto-complete
v-model:value="queryParams.neType" v-model:value="queryParams.neType"
:options="useNeInfoStore().getNeSelectOtions" :options="useNeInfoStore().getNeSelectOtions"
@@ -243,7 +251,10 @@ onMounted(() => {
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="8" :md="12" :xs="24"> <a-col :lg="8" :md="12" :xs="24">
<a-form-item :label="t('views.logManage.forwarding.logTime')" name="queryRangePicker"> <a-form-item
:label="t('views.logManage.forwarding.logTime')"
name="queryRangePicker"
>
<a-range-picker <a-range-picker
v-model:value="queryRangePicker" v-model:value="queryRangePicker"
allow-clear allow-clear