响应情况弹窗筛选功能完成,预警情况弹窗增加影响区域过滤,
This commit is contained in:
parent
07b5f24adf
commit
fc7e3ee0a9
@ -65,7 +65,7 @@
|
||||
</div>
|
||||
|
||||
<!-- 照片 -->
|
||||
<div class="section">
|
||||
<div class="section" v-if="photoList.length > 0">
|
||||
<div class="section-title">
|
||||
<span class="title-icon">▍</span>
|
||||
照片
|
||||
@ -107,13 +107,13 @@
|
||||
<div class="detail-row">
|
||||
<span class="detail-label">现场情况描述:</span>
|
||||
<span class="detail-value">{{ record.description }}</span>
|
||||
<div
|
||||
<!-- <div
|
||||
v-if="record.image"
|
||||
class="detail-image"
|
||||
@click="previewImage(record.image)"
|
||||
>
|
||||
<img :src="record.image" alt="现场照片" />
|
||||
</div>
|
||||
<img :src="record.image" alt="" />
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="detail-row">
|
||||
<span class="detail-label">是否发现问题:</span>
|
||||
|
||||
@ -106,7 +106,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="record.image" class="patrol-image" @click="previewImage(record.image)">
|
||||
<img :src="record.image" alt="现场照片" />
|
||||
<img :src="record.image" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -126,7 +126,7 @@
|
||||
class="detail-image"
|
||||
@click="previewImage(patrolRecord.image)"
|
||||
>
|
||||
<img :src="patrolRecord.image" alt="现场照片" />
|
||||
<img :src="patrolRecord.image" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -156,7 +156,7 @@
|
||||
class="detail-image"
|
||||
@click="previewImage(patrolRecord.image)"
|
||||
>
|
||||
<img :src="patrolRecord.image" alt="现场照片" />
|
||||
<img :src="patrolRecord.image" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -21,8 +21,10 @@
|
||||
<el-select
|
||||
:teleported="false"
|
||||
v-model="filterForm.warningLevel"
|
||||
placeholder="预警等级"
|
||||
placeholder="请选择预警等级"
|
||||
class="filter-select"
|
||||
@change="handleWarningLevelChange"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="option in warningLevelOptions"
|
||||
@ -36,8 +38,10 @@
|
||||
<el-select
|
||||
:teleported="false"
|
||||
v-model="filterForm.region"
|
||||
placeholder="影响区域"
|
||||
placeholder="请选择影响区域"
|
||||
class="filter-select"
|
||||
@change="handleWarningLevelChange"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="option in regionOptions"
|
||||
@ -51,8 +55,10 @@
|
||||
<el-select
|
||||
:teleported="false"
|
||||
v-model="filterForm.isEnded"
|
||||
placeholder="是否结束"
|
||||
placeholder="请选择是否结束"
|
||||
class="filter-select"
|
||||
@change="handleWarningLevelChange"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="option in isEndedOptions"
|
||||
@ -66,8 +72,10 @@
|
||||
<el-select
|
||||
:teleported="false"
|
||||
v-model="filterForm.isResponded"
|
||||
placeholder="是否回应"
|
||||
placeholder="请选择是否回应"
|
||||
class="filter-select"
|
||||
@change="handleWarningLevelChange"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="option in isRespondedOptions"
|
||||
@ -212,7 +220,11 @@ const handleCurrentChange = val => {
|
||||
currentPage.value = val;
|
||||
fetchData();
|
||||
};
|
||||
|
||||
// 处理预警等级变化
|
||||
const handleWarningLevelChange = () => {
|
||||
currentPage.value = 1;
|
||||
fetchData();
|
||||
};
|
||||
// 获取预警通知统计
|
||||
const fetchData = async () => {
|
||||
try {
|
||||
@ -222,7 +234,23 @@ const fetchData = async () => {
|
||||
end: '',
|
||||
offset: (currentPage.value - 1) * pageSize.value,
|
||||
limit: pageSize.value,
|
||||
|
||||
riskLevel: filterForm.value.warningLevel || '',
|
||||
countyName: '',
|
||||
isExpire: filterForm.value.isEnded,
|
||||
isReply: filterForm.value.isResponded,
|
||||
};
|
||||
|
||||
if (regionOptions.value.length > 0) {
|
||||
// 处理影响区域筛选
|
||||
const selectedRegion = regionOptions.value.find(
|
||||
option => option.value === filterForm.value.region
|
||||
);
|
||||
if (selectedRegion) {
|
||||
params.countyName = selectedRegion.label == '全部' ? '' : selectedRegion.label || '';
|
||||
}
|
||||
}
|
||||
|
||||
if (props.dispatchDateRange.length > 0) {
|
||||
params.start = formatDateTime(props.dispatchDateRange[0]) || '';
|
||||
params.end = formatDateTime(props.dispatchDateRange[1]) || '';
|
||||
@ -303,7 +331,7 @@ watch(
|
||||
|
||||
.filter-item {
|
||||
.filter-select {
|
||||
width: 120px;
|
||||
width: 150px;
|
||||
|
||||
:deep(.el-input__wrapper) {
|
||||
background-color: rgba(30, 70, 120, 0.4);
|
||||
|
||||
@ -187,7 +187,7 @@ const tableHeight = ref(300);
|
||||
const tableColumns = ref([
|
||||
{ prop: 'index', label: '序号', width: '' },
|
||||
{ prop: 'riskLeve', label: '预警等级', width: '', slot: 'riskLeve' },
|
||||
{ label: '来源', prop: 'source', width: '' },
|
||||
{ prop: 'source', label: '来源', width: '' },
|
||||
{ prop: 'weatherType', label: '气象类型', width: '' },
|
||||
{ prop: 'countyName', label: '影响区域', width: '' },
|
||||
{ prop: 'warningTime', label: '生效时间', width: '' },
|
||||
@ -226,7 +226,12 @@ const fetchWarningData = async () => {
|
||||
params.riskLevel = filterForm.value.riskLeve;
|
||||
}
|
||||
if (filterForm.value.countyName) {
|
||||
params.countyName = filterForm.value.countyName;
|
||||
const selectedRegion = regionOptions.value.find(
|
||||
option => option.value === filterForm.value.countyName
|
||||
);
|
||||
if (selectedRegion) {
|
||||
params.countyName = selectedRegion.label == '全部' ? '' : selectedRegion.label || '';
|
||||
}
|
||||
}
|
||||
if (filterForm.value.isEnded !== undefined && filterForm.value.isEnded !== '') {
|
||||
params.isExpire = filterForm.value.isEnded;
|
||||
@ -250,9 +255,9 @@ const fetchWarningData = async () => {
|
||||
tableData.value = list.map((item, index) => ({
|
||||
index: index + 1,
|
||||
riskLeve: item.riskLeve || '-',
|
||||
source: item.source || '-',
|
||||
weatherType: item.weatherType || '-',
|
||||
countyName: item.countyName || '-',
|
||||
source: item.source || '-',
|
||||
warningTime: item.startTime || '-',
|
||||
endTime: item.endTime || '-',
|
||||
impactCount: item.affectedCount || 0,
|
||||
|
||||
@ -54,7 +54,8 @@ export const fetchRoadConditionOptions = async () => {
|
||||
label: item,
|
||||
value: item,
|
||||
}));
|
||||
typeOptions.value = options;
|
||||
// 保留"全部"选项,并添加接口返回的数据
|
||||
typeOptions.value = [{ label: '全部', value: '' }, ...options];
|
||||
return options;
|
||||
}
|
||||
} catch (error) {
|
||||
@ -100,6 +101,7 @@ export const fetchControlMeasureOptions = async () => {
|
||||
|
||||
// 风险等级选项
|
||||
export const riskLevelOptions = [
|
||||
{ label: '全部', value: '' },
|
||||
{ label: '一级', value: '一级' },
|
||||
{ label: '二级', value: '二级' },
|
||||
{ label: '三级', value: '三级' },
|
||||
@ -125,8 +127,8 @@ export const pointLevelOptions = [
|
||||
// 是否回应选项
|
||||
export const isRespondedOptions = [
|
||||
{ label: '全部', value: '' },
|
||||
{ label: '是', value: 'yes' },
|
||||
{ label: '否', value: 'no' },
|
||||
{ label: '是', value: true },
|
||||
{ label: '否', value: false },
|
||||
];
|
||||
|
||||
// 预警等级选项
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user