bug更改
This commit is contained in:
commit
770b3cfcf1
@ -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
|
||||
});
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -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
|
||||
});
|
||||
}
|
||||
|
||||
@ -231,13 +231,78 @@ 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 {
|
||||
// 处理空数据情况
|
||||
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 = [];
|
||||
recordTotal.value = 0;
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@ -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(`保存成功`);
|
||||
|
||||
|
||||
@ -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>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user