bug更改

This commit is contained in:
王兴凯 2026-07-16 14:41:41 +08:00
commit 770b3cfcf1
9 changed files with 163 additions and 29 deletions

View File

@ -54,7 +54,7 @@ export function getFishTab(stcd: string) {
// 检查水质站是否启用 AI 预测功能
export function checkAnalysisShow(data: any) {
return request({
url: '/api/dec-lygk-base-server/base/vmsstbprpt/GetKendoList',
url: '/overview/vmsstbprpt/GetKendoList',
method: 'post',
data
});

View File

@ -128,7 +128,7 @@ export function dwInfoGetKendoListCust(data: any) {
data
});
}
//月均水温对比,图表,表格 /api/wmp-env-server/sw/monthDetail/Det/GetKendoListCust
//月均水温对比,图表,表格
export function DetGetKendoListCust(data: any) {
return request({
url: '/wt/monthDetail/Det/GetKendoListCust',

View File

@ -1,23 +1,23 @@
import request from '@/utils/request';
// 获取所有沿程配置数据
// 飞行路径
export function threedroambGetKendoListCust(data: any) {
return request({
url: '/api/wmp-sys-server/sys/threedroamb/GetKendoListCust',
url: '/threedroamb/GetKendoListCust',
method: 'post',
data: data
});
}
export function threedroambsave(data: any) {
return request({
url: '/api/wmp-sys-server/sys/threedroamb/save',
url: '/threedroamb/save',
method: 'post',
data: data
});
}
export function threedroambdelete(data: any) {
return request({
url: '/api/wmp-sys-server/sys/threedroamb/delete',
url: '/threedroamb/delete',
method: 'get',
params: data
});
@ -25,7 +25,7 @@ export function threedroambdelete(data: any) {
//根据id查询弹窗
export function threedroambGetKendoById(data: any) {
return request({
url: '/api/wmp-sys-server/sys/threedroamb/getThreedRoamDetails',
url: '/threedroamb/getThreedRoamDetails',
method: 'get',
params: data
});
@ -33,7 +33,7 @@ export function threedroambGetKendoById(data: any) {
// 导入接口
export function threedroambimport(data: FormData) {
return request({
url: '/api/wmp-sys-server/sys/threedroamb/import',
url: '/threedroamb/import',
method: 'post',
data: data,
headers: { 'Content-Type': 'multipart/form-data' }
@ -42,7 +42,7 @@ export function threedroambimport(data: FormData) {
// 导出模板
export function threedroambexport(data: any) {
return request({
url: '/api/wmp-sys-server/sys/threedroamb/export',
url: '/threedroamb/export',
method: 'post',
data: data,
responseType: 'blob'

View File

@ -49,3 +49,11 @@ export function saveBaseWbsbChildDetail(data: any) {
data: data
});
}
//站点类型下拉框
export function sttpGetKendoList(data: any) {
return request({
url: '/base/msalongb/sttp/GetKendoList',
method: 'post',
data: data
});
}

View File

@ -231,12 +231,77 @@ const loadRecordList = async () => {
};
const res: any = await getVideoPlayDetail(params);
if (res?.data?.data) {
if (res?.data?.data.length >0) {
recordList.value = res.data.data;
recordTotal.value = res.data.total || 0;
} else {
recordList.value = [];
recordTotal.value = 0;
//
const params1 = {
filter: {
logic: 'and',
filters: [
{
field: 'stcd',
operator: 'in',
value: [selectedStcd.value]
}
]
},
sort: [
{
field: 'tm',
dir: 'desc'
}
]
};
let res1 = await getVideoDetail(params1);
if (res1.data.data.length > 0) {
// tm
const tm = res1.data.data[0].tm;
const endTime = dayjs(tm);
const startTime = endTime.subtract(7, 'day');
dateRange.value = [startTime, endTime];
// getVideoPlayDetail
const newParams = {
filter: {
logic: 'and',
filters: [
{
field: 'stcd',
operator: 'in',
value: [selectedStcd.value]
},
{
field: 'tm',
operator: 'gte',
dataType: 'date',
value: startTime.format('YYYY-MM-DD 00:00:00')
},
{
field: 'tm',
operator: 'lte',
dataType: 'date',
value: endTime.format('YYYY-MM-DD 23:59:59')
}
]
},
sort: [{ field: 'tm', dir: 'desc' }],
skip: 0,
take: pageSize
};
const res2 = await getVideoPlayDetail(newParams);
if (res2?.data?.data?.length > 0) {
recordList.value = res2.data.data;
recordTotal.value = res2.data.total || 0;
} else {
recordList.value = [];
recordTotal.value = 0;
}
} else {
recordList.value = [];
recordTotal.value = 0;
}
}
} catch (error) {
recordList.value = [];

View File

@ -103,7 +103,7 @@
:default-expand-all="false"
:selectable="false"
block-node
style="width: 400px"
>
<template #title="{ dataRef }">
<!-- 编辑状态只显示编辑区域 -->
@ -364,6 +364,15 @@ const refreshNodeSort = (nodes: any[]) => {
const checkDuplicateStcd = (stcd: string, siblings: any[], excludeKey?: string): boolean => {
return siblings.some(node => node.stcd === stcd && node.key !== excludeKey);
};
// +
const checkDuplicateSttpDirection = (sttpName: string, type: number, siblings: any[], excludeKey?: string): boolean => {
return siblings.some(node =>
node.sttpName === sttpName &&
(node.type == 1 || node.ioDirection == 1) === (type == 1) &&
node.key !== excludeKey
);
};
const handleRiverSelect = async (value: string) => {
const res = await getEngInfoDropdown({ baseId: value });
stationList.value = (res.data || []).map((item: any) => ({
@ -376,7 +385,9 @@ const getNodeTitle = (dataRef: any) => {
if (!dataRef.parentId) {
return dataRef.ennm || '';
} else {
return `${dataRef.stnm ||dataRef.ennm || ''}-${dataRef.type == 1 || dataRef.ioDirection == 1 ? '出库' : '入库'}`;
const direction = dataRef.type == 1 || dataRef.ioDirection == 1 ? '出库' : '入库';
const sttp = dataRef.sttpName || '';
return sttp ? `${dataRef.stnm || dataRef.ennm || ''}-${sttp}-${direction}` : `${dataRef.stnm || dataRef.ennm || ''}-${direction}`;
}
};
@ -580,8 +591,8 @@ const handleStationSelectConfirm = (data: { record: any; type: number }) => {
const siblings = node.parentId
? findNodeByKey(treeData.value, node.parentId)?.children || []
: treeData.value;
if (checkDuplicateStcd(data.record.stcd, siblings, editingNodeKey.value!)) {
message.warning('该站点在当前层级已存在,请重新选择');
if (checkDuplicateSttpDirection(data.record.sttpName, data.type, siblings, editingNodeKey.value!)) {
message.warning('该测站类型在当前方向已存在,请重新选择');
return;
}
@ -601,8 +612,8 @@ const handleStationSelectConfirm = (data: { record: any; type: number }) => {
message.error('父节点不存在');
return;
}
if (checkDuplicateStcd(data.record.stcd, parent.children || [])) {
message.warning('该站点在当前层级已存在,请勿重复添加');
if (checkDuplicateSttpDirection(data.record.sttpName, data.type, parent.children || [])) {
message.warning('该测站类型在当前方向已存在,请勿重复添加');
return;
}
const newChild = {
@ -803,18 +814,19 @@ defineExpose({
.tree-node-wrapper {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
padding-right: 8px;
.tree-node-title {
flex: 1;
}
.tree-node-actions {
opacity: 0;
transition: opacity 0.2s;
margin-left: 18px;
}
}

View File

@ -10,7 +10,7 @@
>
<!-- 搜索表单 -->
<a-form layout="inline" class="search-form">
<a-form-item label="名称">
<a-form-item label="测站名称">
<a-input
v-model:value="searchName"
placeholder="请输入测站名称"
@ -19,8 +19,20 @@
@press-enter="handleSearch"
/>
</a-form-item>
<a-form-item label="测站类型">
<a-select
v-model:value="sttpCode"
show-search
placeholder="请选择测站类型"
style="width: 200px"
:options="sttpCodeoptions"
:filter-option="sttpFilterOption"
allow-clear
></a-select>
</a-form-item>
<a-form-item>
<a-button type="primary" @click="handleSearch">查询</a-button>
<a-button @click="handleReset" style="margin-left: 8px">重置</a-button>
</a-form-item>
</a-form>
@ -69,7 +81,7 @@
import { ref, computed, watch } from 'vue';
import { noAuthGetKendoPage } from '@/api/select';
import BasicTable from '@/components/BasicTable/index.vue';
import { sttpGetKendoList } from '@/api/system/map/ConfigManagement';
interface Props {
visible: boolean;
baseId: string;
@ -84,10 +96,13 @@ const emit = defineEmits<{
(e: 'update:visible', value: boolean): void;
(e: 'confirm', data: { record: any; type: number }): void;
}>();
// label
const sttpFilterOption = (input: string, option: any) => {
return option.label?.toLowerCase().indexOf(input.toLowerCase()) >= 0;
};
//
const searchName = ref('');
const sttpCode = ref('');
//
const tableRef = ref();
const selectedRow = ref<any>(null);
@ -142,7 +157,13 @@ const handleSearch = () => {
dataType: 'string',
value: props.baseId
}
: null
: null,
{
field: 'STTP',
operator: 'neq',
dataType: 'string',
value: 'ENG'
}
].filter(Boolean);
if (searchName.value) {
filters.push({
@ -151,6 +172,15 @@ const handleSearch = () => {
value: searchName.value
});
}
if(sttpCode.value){
filters.push({
field: 'STTP_CODE',
operator: 'eq',
dataType: 'string',
value: sttpCode.value
});
}
const filter = {
logic: 'and',
filters
@ -158,14 +188,33 @@ const handleSearch = () => {
tableRef.value?.getList(filter);
};
//
const handleReset = () => {
searchName.value = '';
sttpCode.value = '';
handleSearch();
};
const sttpCodeoptions = ref([]);
const getsttpGetKendoList = async () => {
let res = await sttpGetKendoList({});
sttpCodeoptions.value = res.data.data.map(item => {
return {
label: item.sttpName,
value: item.sttpCode
};
});
};
//
watch(
() => props.visible,
visible => {
if (visible) {
searchName.value = '';
sttpCode.value = '';
// DOM
setTimeout(() => handleSearch(), 0);
getsttpGetKendoList();
}
}
);

View File

@ -211,11 +211,12 @@ const editModalCancel = () => {
//
const handleEditSubmit = async (values: any) => {
// debugger
try {
let res = await saveTiltPhoto({
...currentRecord.value,
...values,
recordTime:currentRecord.value.recordTime != '-' ? currentRecord.value.recordTime : null
});
message.success(`保存成功`);

View File

@ -1,8 +1,7 @@
<!-- d:\wordpack\WholeProcessPlatform\frontend\src\views\system\map\components\LayerManagement\index.vue -->
<template>
<div class="content">
预警规则
<!-- <LayerManagementSearch
<LayerManagementSearch
ref="layerManagementSearch"
:handle-add="handleAdd"
@reset="handleReset"
@ -69,7 +68,7 @@
:loading="editLoading"
@cancel="editModalCancel"
@ok="handleEditSubmit"
/> -->
/>
</div>
</template>