fix: 日期选择清空异常和移除console

This commit is contained in:
TsMask
2023-09-26 18:52:35 +08:00
parent 34c43c5af1
commit 3b9b56fec9
14 changed files with 46 additions and 21 deletions

View File

@@ -166,6 +166,9 @@ function fnTableSelectedRowKeys(keys: (string | number)[]) {
function fnGetList() {
if (tableState.loading) return;
tableState.loading = true;
if (!queryRangePicker.value) {
queryRangePicker.value = ['', ''];
}
queryParams.beginTime = queryRangePicker.value[0];
queryParams.endTime = queryRangePicker.value[1];
listNeVersion(toRaw(queryParams)).then(res => {

View File

@@ -175,10 +175,12 @@ function fnTableSize({ key }: MenuInfo) {
function fnGetList() {
if (tableState.loading) return;
tableState.loading = true;
if (!queryRangePicker.value) {
queryRangePicker.value = ['', ''];
}
queryParams.beginTime = queryRangePicker.value[0];
queryParams.endTime = queryRangePicker.value[1];
listAlarm(toRaw(queryParams)).then(res => {
console.log(res);
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
tablePagination.total = res.total;
tableState.data = res.rows;
@@ -212,7 +214,7 @@ onMounted(() => {
<a-form :model="queryParams" name="queryParams" layout="horizontal">
<a-row :gutter="16">
<a-col :lg="6" :md="12" :xs="24">
<a-form-item label="网元类型" name="accountName">
<a-form-item label="网元类型" name="neType">
<a-auto-complete
v-model:value="queryParams.neType"
:options="useNeInfoStore().getNeSelectOtions"

View File

@@ -36,7 +36,7 @@ function fnQueryReset() {
queryParams = Object.assign(queryParams, {
accountName: '',
beginTime: '',
endTime: undefined,
endTime: '',
pageNum: 1,
pageSize: 20,
});
@@ -97,7 +97,7 @@ let tableColumns: ColumnsType = [
title: 'MML',
dataIndex: 'mml',
key: 'mml',
align: 'center',
align: 'left',
},
{
title: '记录时间',
@@ -147,10 +147,12 @@ function fnTableSize({ key }: MenuInfo) {
function fnGetList() {
if (tableState.loading) return;
tableState.loading = true;
if (!queryRangePicker.value) {
queryRangePicker.value = ['', ''];
}
queryParams.beginTime = queryRangePicker.value[0];
queryParams.endTime = queryRangePicker.value[1];
listMML(toRaw(queryParams)).then(res => {
console.log(res);
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
tablePagination.total = res.total;
tableState.data = res.rows;
@@ -279,12 +281,10 @@ onMounted(() => {
>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'mml'">
<a-space :size="8" align="center">
<a-tooltip>
<template #title>{{ record.result }}</template>
<div class="mmlText">{{ record.mml }}</div>
</a-tooltip>
</a-space>
<a-tooltip>
<template #title>{{ record.result }}</template>
<div class="mmlText">{{ record.mml }}</div>
</a-tooltip>
</template>
</template>
</a-table>
@@ -297,8 +297,7 @@ onMounted(() => {
padding: 0 24px;
}
.mmlText {
max-width: 200px;
max-width: 800px;
cursor: pointer;
text-align: start;
}
</style>

View File

@@ -172,7 +172,6 @@ function fnGetList() {
if (tableState.loading) return;
tableState.loading = true;
listOperationLog(toRaw(queryParams)).then(res => {
console.log(res);
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
tablePagination.total = res.total;
tableState.data = res.rows;

View File

@@ -157,7 +157,6 @@ function fnGetList() {
if (tableState.loading) return;
tableState.loading = true;
listTraceData(toRaw(queryParams)).then(res => {
console.log(res);
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
tablePagination.total = res.total;
tableState.data = res.rows;
@@ -218,7 +217,9 @@ function fnModalVisible(row: Record<string, any>) {
modalState.from.rawDataHTML = t('views.traceManage.analysis.noData');
}
});
modalState.title = t('views.traceManage.analysis.taskTitle', { num: row.imsi });
modalState.title = t('views.traceManage.analysis.taskTitle', {
num: row.imsi,
});
modalState.visible = true;
}
@@ -321,7 +322,7 @@ onMounted(() => {
<a-row :gutter="16">
<a-col :lg="6" :md="12" :xs="24">
<a-form-item
:placeholder="t('views.traceManage.analysis.imsi')"
:label="t('views.traceManage.analysis.imsi')"
name="imsi"
>
<a-input
@@ -333,7 +334,7 @@ onMounted(() => {
</a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-form-item
:placeholder="t('views.traceManage.analysis.msisdn')"
:label="t('views.traceManage.analysis.msisdn')"
name="imsi"
>
<a-input
@@ -443,7 +444,9 @@ onMounted(() => {
:visible="modalState.visible"
@cancel="fnModalVisibleClose"
>
<div class="raw-title">{{ t('views.traceManage.analysis.signalData') }}</div>
<div class="raw-title">
{{ t('views.traceManage.analysis.signalData') }}
</div>
<a-row
class="raw"
:gutter="16"

View File

@@ -350,6 +350,9 @@ function fnClose() {
/**查询调度日志列表 */
function fnGetList() {
tableState.loading = true;
if (!queryRangePicker.value) {
queryRangePicker.value = ['', ''];
}
queryParams.beginTime = queryRangePicker.value[0];
queryParams.endTime = queryRangePicker.value[1];
listJobLog(toRaw(queryParams)).then(res => {

View File

@@ -312,6 +312,9 @@ function fnExportList() {
function fnGetList() {
if (tableState.loading) return;
tableState.loading = true;
if (!queryRangePicker.value) {
queryRangePicker.value = ['', ''];
}
queryParams.beginTime = queryRangePicker.value[0];
queryParams.endTime = queryRangePicker.value[1];
listLogininfor(toRaw(queryParams)).then(res => {

View File

@@ -345,6 +345,9 @@ function fnExportList() {
function fnGetList() {
if (tableState.loading) return;
tableState.loading = true;
if (!queryRangePicker.value) {
queryRangePicker.value = ['', ''];
}
queryParams.beginTime = queryRangePicker.value[0];
queryParams.endTime = queryRangePicker.value[1];
listOperlog(toRaw(queryParams)).then(res => {

View File

@@ -423,6 +423,9 @@ function fnRefreshCache() {
function fnGetList() {
if (tableState.loading) return;
tableState.loading = true;
if (!queryRangePicker.value) {
queryRangePicker.value = ['', ''];
}
queryParams.beginTime = queryRangePicker.value[0];
queryParams.endTime = queryRangePicker.value[1];
listConfig(toRaw(queryParams)).then(res => {

View File

@@ -426,6 +426,9 @@ function fnDataView(dictId: string | number = '0') {
function fnGetList() {
if (tableState.loading) return;
tableState.loading = true;
if (!queryRangePicker.value) {
queryRangePicker.value = ['', ''];
}
queryParams.beginTime = queryRangePicker.value[0];
queryParams.endTime = queryRangePicker.value[1];
listType(toRaw(queryParams)).then(res => {

View File

@@ -673,6 +673,9 @@ function fnExportList() {
function fnGetList() {
if (tableState.loading) return;
tableState.loading = true;
if (!queryRangePicker.value) {
queryRangePicker.value = ['', ''];
}
queryParams.beginTime = queryRangePicker.value[0];
queryParams.endTime = queryRangePicker.value[1];
listRole(toRaw(queryParams)).then(res => {

View File

@@ -674,6 +674,9 @@ function fnModalUploadXlsxImportExportTemplate() {
function fnGetList() {
if (tableState.loading) return;
tableState.loading = true;
if (!queryRangePicker.value) {
queryRangePicker.value = ['', ''];
}
queryParams.beginTime = queryRangePicker.value[0];
queryParams.endTime = queryRangePicker.value[1];
listUser(toRaw(queryParams)).then(res => {

View File

@@ -157,7 +157,6 @@ function fnGetList() {
if (tableState.loading) return;
tableState.loading = true;
listTraceData(toRaw(queryParams)).then(res => {
console.log(res);
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
tablePagination.total = res.total;
tableState.data = res.rows;

View File

@@ -461,7 +461,6 @@ function fnModalOk() {
const hide = message.loading(t('common.loading'), 0);
traceTask
.then(res => {
console.log(res);
if (res.code === RESULT_CODE_SUCCESS) {
message.success({
content: t('common.msgSuccess', { msg: modalState.title }),