fix: 页面字段/接口调整

This commit is contained in:
TsMask
2025-02-20 10:47:23 +08:00
parent 814bae0b94
commit 485fa89833
85 changed files with 1133 additions and 1792 deletions

View File

@@ -24,6 +24,7 @@ import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue';
import { writeSheet } from '@/utils/execl-utils';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { readLoalXlsx } from '@/utils/execl-utils';
import { parseDateToStr } from '@/utils/date-utils';
const neInfoStore = useNeInfoStore();
const { getDict } = useDictStore();
const { t, currentLocale } = useI18n();
@@ -168,6 +169,12 @@ let tableColumns: ColumnsType = [
align: 'center',
sorter: (a: any, b: any) => 1,
width: 5,
customRender(opt) {
if (typeof opt.value === 'number') {
return parseDateToStr(+opt.value);
}
return opt.value;
},
},
{
title: t('views.faultManage.activeAlarm.alarmCode'),
@@ -734,14 +741,14 @@ function fnGetList(pageNum?: number) {
filterState.sql = sql;
}
listAct(toRaw(queryParams), filterState.sql).then((res: any) => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (state.selectedRowKeys.length > 0) {
state.selectedRowKeys = [];
}
////
tablePagination.total = res.total;
tableState.data = res.rows;
const { total, rows } = res.data;
tablePagination.total = total;
tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -1199,7 +1206,7 @@ onMounted(() => {
:label="t('views.faultManage.activeAlarm.eventTime')"
name="eventTime"
>
{{ modalState.from.eventTime }}
{{ parseDateToStr(modalState.from.eventTime) }}
</a-form-item>
</a-col>
</a-row>
@@ -1210,7 +1217,10 @@ onMounted(() => {
:label="t('views.faultManage.activeAlarm.alarmType')"
name="alarmType"
>
{{ modalState.from.alarmType }}
<DictTag
:options="dict.activeAlarmType"
:value="modalState.from.alarmType"
/>
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
@@ -1247,7 +1257,10 @@ onMounted(() => {
:label="t('views.faultManage.activeAlarm.origLevel')"
name="origSeverity"
>
{{ modalState.from.origSeverity }}
<DictTag
:options="dict.activeAlarmSeverity"
:value="modalState.from.origSeverity"
/>
</a-form-item>
</a-col>
</a-row>

View File

@@ -130,12 +130,6 @@ let tableColumns: ColumnsType = [
align: 'center',
width: 5,
},
{
title: t('views.faultManage.activeAlarm.neName'),
dataIndex: 'neName',
align: 'center',
width: 5,
},
{
title: t('views.faultManage.activeAlarm.neType'),
dataIndex: 'neType',
@@ -161,12 +155,6 @@ let tableColumns: ColumnsType = [
sorter: (a: any, b: any) => 1,
width: 5,
},
{
title: t('views.faultManage.activeAlarm.pvFlag'),
dataIndex: 'pvFlag',
align: 'center',
width: 5,
},
{
title: t('common.operate'),
key: 'alarm_id',
@@ -403,14 +391,15 @@ function fnGetList(pageNum?: number) {
queryParams.endTime = queryRangePicker.value[1];
listAct(toRaw(queryParams)).then((res: any) => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (state.selectedRowKeys.length > 0) {
state.selectedRowKeys = [];
}
////
tablePagination.total = res.total;
tableState.data = res.rows;
const { total, rows } = res.data;
tablePagination.total = total;
tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -735,14 +724,6 @@ onMounted(() => {
{{ modalState.from.neId }}
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.faultManage.activeAlarm.neName')"
name="neName"
>
{{ modalState.from.neName }}
</a-form-item>
</a-col>
</a-row>
<a-row>
@@ -791,25 +772,6 @@ onMounted(() => {
{{ modalState.from.locationInfo }}
</a-form-item>
<a-row>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.faultManage.activeAlarm.province')"
name="province"
>
{{ modalState.from.province }}
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.faultManage.activeAlarm.alarmType')"
name="alarmType"
>
{{ modalState.from.alarmType }}
</a-form-item>
</a-col>
</a-row>
<a-form-item
:label="t('views.faultManage.activeAlarm.addInfo')"
name="addInfo"

View File

@@ -540,13 +540,14 @@ function fnGetList(pageNum?: number) {
queryParams.beginTime = queryRangePicker.value[0];
queryParams.endTime = queryRangePicker.value[1];
listAct(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
if (res.code === RESULT_CODE_SUCCESS) {
// 取消勾选
if (state.selectedRowKeys.length > 0) {
state.selectedRowKeys = [];
}
tablePagination.total = res.total;
tableState.data = res.rows;
const { total, rows } = res.data;
tablePagination.total = total;
tableState.data = rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&