Compare commits
2 Commits
e33df64a8a
...
68660700ed
| Author | SHA1 | Date | |
|---|---|---|---|
| 68660700ed | |||
| 630892dd5e |
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<base-dialog
|
||||
v-model:visible="props.visible"
|
||||
:visible="props.visible"
|
||||
title="AI预警处理结果"
|
||||
:table-data="[]"
|
||||
:table-columns="[]"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<base-dialog
|
||||
v-model:visible="props.visible"
|
||||
:visible="props.visible"
|
||||
title="管控情况"
|
||||
:table-data="tableData"
|
||||
:table-columns="tableColumns"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<base-dialog
|
||||
v-model:visible="props.visible"
|
||||
:visible="props.visible"
|
||||
title="管控情况"
|
||||
:table-data="tableData"
|
||||
:table-columns="tableColumns"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<base-dialog
|
||||
v-model:visible="props.visible"
|
||||
:visible="props.visible"
|
||||
title="调度区县情况"
|
||||
:table-data="tableData"
|
||||
:table-columns="tableColumns"
|
||||
@ -133,57 +133,62 @@ const handleCurrentChange = (val) => {
|
||||
|
||||
// 获取数据
|
||||
const fetchData = async () => {
|
||||
try {
|
||||
const res = await request({
|
||||
url: '/snow-ops-platform/weather-warning/scheduling-county-record',
|
||||
method: 'GET',
|
||||
params: {
|
||||
offset: (currentPage.value - 1) * pageSize.value,
|
||||
limit: pageSize.value,
|
||||
start: formatDateTime(props.dispatchDateRange?.[0]),
|
||||
end: formatDateTime(props.dispatchDateRange?.[1]),
|
||||
countyId: filterForm.value.region,
|
||||
},
|
||||
})
|
||||
const res = await request({
|
||||
url: '/snow-ops-platform/weather-warning/scheduling-county-record',
|
||||
method: 'GET',
|
||||
params: {
|
||||
offset: (currentPage.value - 1) * pageSize.value,
|
||||
limit: pageSize.value,
|
||||
start: formatDateTime(props.dispatchDateRange?.[0]),
|
||||
end: formatDateTime(props.dispatchDateRange?.[1]),
|
||||
countyId: filterForm.value.region,
|
||||
},
|
||||
})
|
||||
|
||||
if (res.total > 0 && res.data) {
|
||||
const data = res.data
|
||||
tableData.value = data.map((item, index) => {
|
||||
// 解析 command 字段中的 JSON 数据
|
||||
let commandData = {}
|
||||
if (res.total > 0 && res.data) {
|
||||
const data = res.data
|
||||
tableData.value = data.map((item, index) => {
|
||||
// 解析 command 字段中的 JSON 数据
|
||||
let commandData = {
|
||||
userName: '',
|
||||
userPhone: '',
|
||||
type: '',
|
||||
role: '',
|
||||
}
|
||||
if (item.command) {
|
||||
// 判断是否为JSON字符串
|
||||
try {
|
||||
if (item.command) {
|
||||
commandData = JSON.parse(item.command)
|
||||
const parsed = JSON.parse(item.command)
|
||||
if (typeof parsed === 'object' && parsed !== null) {
|
||||
commandData = parsed
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('解析 command 字段失败:', e)
|
||||
} catch (error) {
|
||||
console.error('解析 command 字段失败:', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 根据 type 映射类型和角色
|
||||
const typeMap = {
|
||||
'phone-based-confirmation': '电话确认',
|
||||
'video-conference': '视频会议',
|
||||
'scheduling-county': '调度区县',
|
||||
}
|
||||
const district = regionOptions.value.find((option) => option.value === item.countyId)?.label || '-'
|
||||
// 根据 type 映射类型和角色
|
||||
const typeMap = {
|
||||
'phone-based-confirmation': '电话确认',
|
||||
'video-conference': '视频会议',
|
||||
'scheduling-county': '调度区县',
|
||||
}
|
||||
const district = regionOptions.value.find((option) => option.value === item.countyId)?.label || '-'
|
||||
|
||||
return {
|
||||
id: (currentPage.value - 1) * pageSize.value + index + 1,
|
||||
district: district,
|
||||
name: commandData.userName || '-',
|
||||
phone: commandData.userPhone || '-',
|
||||
type: commandData.type || '-',
|
||||
role: commandData.role || '一般人员',
|
||||
dispatchTime: item.createdAt || '-',
|
||||
}
|
||||
})
|
||||
total.value = res.total
|
||||
} else {
|
||||
tableData.value = []
|
||||
total.value = 0
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取调度区县详情数据失败:', error)
|
||||
return {
|
||||
id: (currentPage.value - 1) * pageSize.value + index + 1,
|
||||
district: district,
|
||||
name: commandData.userName || '-',
|
||||
phone: commandData.userPhone || '-',
|
||||
type: commandData.type || '-',
|
||||
role: commandData.role || '一般人员',
|
||||
dispatchTime: item.createdAt || '-',
|
||||
}
|
||||
})
|
||||
total.value = res.total
|
||||
} else {
|
||||
tableData.value = []
|
||||
total.value = 0
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<base-dialog
|
||||
v-model:visible="props.visible"
|
||||
:visible="props.visible"
|
||||
title="调度区县情况"
|
||||
:table-data="tableData"
|
||||
:table-columns="tableColumns"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<base-dialog
|
||||
v-model:visible="props.visible"
|
||||
:visible="props.visible"
|
||||
title="详情"
|
||||
:table-data="[]"
|
||||
:table-columns="[]"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<base-dialog
|
||||
v-model:visible="props.visible"
|
||||
:visible="props.visible"
|
||||
:title="props.title"
|
||||
:table-data="tableData"
|
||||
:table-columns="tableColumns"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<base-dialog
|
||||
v-model:visible="props.visible"
|
||||
:visible="props.visible"
|
||||
title="抽查人次"
|
||||
:table-data="tableData"
|
||||
:table-columns="tableColumns"
|
||||
@ -8,9 +8,10 @@
|
||||
:total="total"
|
||||
:current-page="currentPage"
|
||||
:page-size="pageSize"
|
||||
max-width="800px"
|
||||
:max-width="800"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
@update:visible="handleClose"
|
||||
@close="handleClose"
|
||||
>
|
||||
<!-- 筛选区域 -->
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<base-dialog
|
||||
v-model:visible="props.visible"
|
||||
:visible="props.visible"
|
||||
title="影响点详情"
|
||||
:table-data="[]"
|
||||
:table-columns="[]"
|
||||
@ -102,17 +102,13 @@
|
||||
<div class="detail-row">
|
||||
<span class="detail-label">现场情况描述:</span>
|
||||
<span class="detail-value">{{ record.description }}</span>
|
||||
<!-- <div
|
||||
v-if="record.image"
|
||||
class="detail-image"
|
||||
@click="previewImage(record.image)"
|
||||
>
|
||||
<img :src="record.image" alt="" />
|
||||
</div> -->
|
||||
<div v-if="record.image" class="detail-image" v-for="(img, index) in record.image" :key="index" @click="previewImage(img)">
|
||||
<img :src="img" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-row">
|
||||
<span class="detail-label">是否发现问题:</span>
|
||||
<span class="detail-value" :class="record.hasProblem ? 'status-yes' : 'status-no'">
|
||||
<span class="detail-value" :class="!record.hasProblem ? 'status-yes' : 'status-no'">
|
||||
{{ record.hasProblem ? '是' : '否' }}
|
||||
</span>
|
||||
</div>
|
||||
@ -141,7 +137,7 @@ import { ref, watch } from 'vue'
|
||||
import { Close } from '@element-plus/icons-vue'
|
||||
import baseDialog from '../component/baseDialog.vue'
|
||||
import { request } from '@/utils/request'
|
||||
import { getImageUrlList } from '../component/index.js'
|
||||
import { getImageUrlList, formatDateTime } from '../component/index.js'
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
@ -237,6 +233,55 @@ const leveltext = (level) => {
|
||||
if (level.includes('9')) return '未评定'
|
||||
return '未评定'
|
||||
}
|
||||
// 获取巡查记录
|
||||
const getPatrolRecord = async (riskPointId) => {
|
||||
if (!riskPointId) {
|
||||
console.warn('未提供风险点ID')
|
||||
return
|
||||
}
|
||||
|
||||
const res = await request({
|
||||
url: '/snow-ops-platform/risk-point/patrol-record',
|
||||
method: 'GET',
|
||||
params: {
|
||||
riskPointId,
|
||||
},
|
||||
})
|
||||
|
||||
console.log('巡查记录数据:', res)
|
||||
if (res.data) {
|
||||
// 这里处理巡查记录数据,更新到 dynamicRecords 中
|
||||
// 根据实际返回的数据结构进行处理
|
||||
if (Array.isArray(res.data)) {
|
||||
let arr = []
|
||||
res.data.forEach((item) => {
|
||||
let image = item.images ? JSON.parse(item.images) : []
|
||||
let imageArr = []
|
||||
if (image.length > 0) {
|
||||
image.forEach((img) => {
|
||||
imageArr.push(img.url.split('fileId=')[1])
|
||||
})
|
||||
imageArr = imageArr.join(',')
|
||||
}
|
||||
|
||||
console.log('image:', getImageUrlList(imageArr))
|
||||
arr.push({
|
||||
// type: 'patrol',
|
||||
typeName: '巡查记录',
|
||||
patrolPerson: item.worker || '',
|
||||
patrolTime: formatDateTime(item.updatedAt) || '',
|
||||
description: item.conclusion || '',
|
||||
hasProblem: item.hasProblem || false,
|
||||
image: imageArr.length > 0 ? getImageUrlList(imageArr) : [],
|
||||
})
|
||||
})
|
||||
dynamicRecords.value = arr.reverse()
|
||||
}
|
||||
} else {
|
||||
dynamicRecords.value = []
|
||||
}
|
||||
}
|
||||
|
||||
// 点击遮罩关闭已由base-dialog组件处理
|
||||
// 处理影响点类型数据
|
||||
const getAffectedObjectTypeId = (data) => {
|
||||
@ -373,6 +418,13 @@ const getAffectedObjectTypeId = (data) => {
|
||||
photoList.value = photos.length > 0 ? photos : []
|
||||
|
||||
console.log('照片列表:', photos)
|
||||
|
||||
// 获取巡查记录
|
||||
const riskPointId = data.item?.RISK_POINT?.GL1_ID
|
||||
if (riskPointId) {
|
||||
getPatrolRecord(riskPointId)
|
||||
}
|
||||
|
||||
// 更新动态记录 - 路段信息展示
|
||||
// dynamicRecords.value = [
|
||||
// {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<base-dialog
|
||||
v-model:visible="props.visible"
|
||||
:visible="props.visible"
|
||||
title="影响点情况"
|
||||
:table-data="tableData"
|
||||
:table-columns="tableColumns"
|
||||
@ -8,7 +8,7 @@
|
||||
:total="total"
|
||||
:current-page="currentPage"
|
||||
:page-size="pageSize"
|
||||
showFilter="true"
|
||||
:showFilter="true"
|
||||
:z-index="2000"
|
||||
:max-width="1200"
|
||||
@size-change="handleSizeChange"
|
||||
@ -819,6 +819,7 @@ watch(
|
||||
total.value = 0
|
||||
tableData.value = []
|
||||
cardType.value = '0'
|
||||
cardTypeVal.value = '路段'
|
||||
console.log('影响点情况=========newVal:', newVal)
|
||||
if (newVal) {
|
||||
filterForm.value.region = newVal.countyName
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<base-dialog
|
||||
v-model:visible="props.visible"
|
||||
:visible="props.visible"
|
||||
title="线下帮扶"
|
||||
:table-data="tableData"
|
||||
:table-columns="tableColumns"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<base-dialog
|
||||
v-model:visible="props.visible"
|
||||
:visible="props.visible"
|
||||
title="巡查情况"
|
||||
:table-data="tableData"
|
||||
:table-columns="tableColumns"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<!-- 响应点详情对话框 标题是影响点详情 -->
|
||||
<base-dialog
|
||||
v-model:visible="props.visible"
|
||||
:visible="props.visible"
|
||||
title="影响点详情"
|
||||
:table-data="[]"
|
||||
:table-columns="[]"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<base-dialog
|
||||
v-model:visible="props.visible"
|
||||
:visible="props.visible"
|
||||
title="响应点详情"
|
||||
:table-data="[]"
|
||||
:table-columns="[]"
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<!-- :title="props.allCountyData.name + '三级路长明细'" -->
|
||||
<base-dialog
|
||||
v-model:visible="props.visible"
|
||||
:title="props.allCountyData.name + '三级路长明细'"
|
||||
:visible="props.visible"
|
||||
title="农村公路调度"
|
||||
:table-data="tableData"
|
||||
:table-columns="tableColumns"
|
||||
:table-height="300"
|
||||
@ -15,8 +16,8 @@
|
||||
@close="handleClose"
|
||||
>
|
||||
<!-- 标题栏下方自定义插槽 -->
|
||||
<template #header>
|
||||
<!-- 统计数据卡片 -->
|
||||
<!-- 统计数据卡片 -->
|
||||
<!-- <template #header>
|
||||
<div class="stats-cards">
|
||||
<div class="stat-card">
|
||||
<div class="card-icon">
|
||||
@ -55,7 +56,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</template> -->
|
||||
|
||||
<!-- 操作列插槽 -->
|
||||
<template #operation="{ row }">
|
||||
@ -75,19 +76,11 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, watch } from 'vue';
|
||||
import {
|
||||
Close,
|
||||
VideoCamera,
|
||||
Microphone,
|
||||
Phone,
|
||||
ArrowLeft,
|
||||
ArrowRight,
|
||||
User,
|
||||
OfficeBuilding,
|
||||
MapLocation,
|
||||
} from '@element-plus/icons-vue';
|
||||
import baseDialog from '../component/baseDialog.vue';
|
||||
import { ref, computed, watch } from 'vue'
|
||||
import { Close, VideoCamera, Microphone, Phone, ArrowLeft, ArrowRight, User, OfficeBuilding, MapLocation } from '@element-plus/icons-vue'
|
||||
import baseDialog from '../component/baseDialog.vue'
|
||||
import { request } from '@/utils/request'
|
||||
import { formatDateTime, openVideoConference, openVoiceConference } from '../component/index.js'
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
@ -100,179 +93,136 @@ const props = defineProps({
|
||||
name: '',
|
||||
}),
|
||||
},
|
||||
});
|
||||
getdateRange: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
})
|
||||
|
||||
const emit = defineEmits(['update:visible', 'close']);
|
||||
const emit = defineEmits(['update:visible', 'close', 'call'])
|
||||
|
||||
// 统计数据
|
||||
const stats = ref({
|
||||
total: 1127,
|
||||
county: 216,
|
||||
village: 1099,
|
||||
});
|
||||
})
|
||||
|
||||
// 表格列配置
|
||||
const tableColumns = ref([
|
||||
{ prop: 'id', label: '序号', width: '' },
|
||||
{ prop: 'district', label: '区县/镇街', width: '' },
|
||||
{ prop: 'countyName', label: '区县/镇街', width: '' },
|
||||
{ prop: 'name', label: '姓名', width: '' },
|
||||
{ prop: 'phone', label: '电话', width: '' },
|
||||
{ prop: 'role', label: '角色', width: '' },
|
||||
{ prop: 'position', label: '职务', width: '' },
|
||||
{ prop: 'schedulingCount', label: '调度数', width: '' },
|
||||
{ prop: 'schedulingLastTime', label: '最后调度时间', width: '' },
|
||||
{ prop: 'operation', label: '操作', width: '120px', slot: 'operation' },
|
||||
]);
|
||||
])
|
||||
|
||||
// 表格数据
|
||||
const tableData = ref([
|
||||
{
|
||||
id: 1,
|
||||
district: '万州区柏梓镇',
|
||||
name: '赵海浪',
|
||||
phone: '1862352068',
|
||||
role: '一般人员(路长履职)',
|
||||
position: '其他',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
district: '万州区柏梓镇',
|
||||
name: '赵海浪',
|
||||
phone: '1862352068',
|
||||
role: '一般人员(路长履职)',
|
||||
position: '其他',
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
district: '万州区柏梓镇',
|
||||
name: '赵海浪',
|
||||
phone: '1862352068',
|
||||
role: '一般人员(路长履职)',
|
||||
position: '其他',
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
district: '万州区柏梓镇',
|
||||
name: '赵海浪',
|
||||
phone: '1862352068',
|
||||
role: '一般人员(路长履职)',
|
||||
position: '其他',
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
district: '万州区李河镇',
|
||||
name: '王建国',
|
||||
phone: '1398324567',
|
||||
role: '一般人员(路长履职)',
|
||||
position: '其他',
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
district: '万州区李河镇',
|
||||
name: '王建国',
|
||||
phone: '1398324567',
|
||||
role: '一般人员(路长履职)',
|
||||
position: '其他',
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
district: '万州区李河镇',
|
||||
name: '王建国',
|
||||
phone: '1398324567',
|
||||
role: '一般人员(路长履职)',
|
||||
position: '其他',
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
district: '万州区李河镇',
|
||||
name: '王建国',
|
||||
phone: '1398324567',
|
||||
role: '一般人员(路长履职)',
|
||||
position: '其他',
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
district: '万州区分水镇',
|
||||
name: '刘志强',
|
||||
phone: '1387654321',
|
||||
role: '一般人员(路长履职)',
|
||||
position: '其他',
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
district: '万州区分水镇',
|
||||
name: '刘志强',
|
||||
phone: '1387654321',
|
||||
role: '一般人员(路长履职)',
|
||||
position: '其他',
|
||||
},
|
||||
{
|
||||
id: 11,
|
||||
district: '万州区分水镇',
|
||||
name: '刘志强',
|
||||
phone: '1387654321',
|
||||
role: '一般人员(路长履职)',
|
||||
position: '其他',
|
||||
},
|
||||
{
|
||||
id: 12,
|
||||
district: '万州区分水镇',
|
||||
name: '刘志强',
|
||||
phone: '1387654321',
|
||||
role: '一般人员(路长履职)',
|
||||
position: '其他',
|
||||
},
|
||||
]);
|
||||
const tableData = ref([])
|
||||
|
||||
// 分页
|
||||
const currentPage = ref(1);
|
||||
const pageSize = ref(10);
|
||||
const total = ref(36);
|
||||
const currentPage = ref(1)
|
||||
const pageSize = ref(10)
|
||||
const total = ref(36)
|
||||
|
||||
// 关闭对话框
|
||||
const handleClose = () => {
|
||||
emit('update:visible', false);
|
||||
emit('close');
|
||||
};
|
||||
emit('update:visible', false)
|
||||
emit('close')
|
||||
}
|
||||
|
||||
// 分页操作
|
||||
const handleSizeChange = val => {
|
||||
pageSize.value = val;
|
||||
fetchData();
|
||||
};
|
||||
const handleSizeChange = (val) => {
|
||||
pageSize.value = val
|
||||
fetchData()
|
||||
}
|
||||
|
||||
const handleCurrentChange = val => {
|
||||
currentPage.value = val;
|
||||
fetchData();
|
||||
};
|
||||
const handleCurrentChange = (val) => {
|
||||
currentPage.value = val
|
||||
fetchData()
|
||||
}
|
||||
|
||||
// 获取数据
|
||||
const fetchData = () => {
|
||||
console.log('获取第', currentPage.value, '页数据');
|
||||
// 实际项目中调用API获取数据
|
||||
};
|
||||
const fetchData = async () => {
|
||||
try {
|
||||
const res = await request({
|
||||
url: '/snow-ops-platform/weather-warning/affected-road-captain',
|
||||
method: 'GET',
|
||||
params: {
|
||||
offset: (currentPage.value - 1) * pageSize.value,
|
||||
limit: pageSize.value,
|
||||
start: formatDateTime(props.getdateRange?.[0]),
|
||||
end: formatDateTime(props.getdateRange?.[1]),
|
||||
},
|
||||
})
|
||||
console.log('路长数据:', res)
|
||||
|
||||
if (res.total > 0 && res.data) {
|
||||
const data = res.data
|
||||
tableData.value = data.map((item, index) => ({
|
||||
id: currentPage.value * pageSize.value - (pageSize.value - index - 1),
|
||||
countyName: item.countyName || '-',
|
||||
name: item.name || '-',
|
||||
phone: item.phone || '-',
|
||||
schedulingCount: item.schedulingCount || '-',
|
||||
schedulingLastTime: item.schedulingLastTime || '-',
|
||||
}))
|
||||
total.value = res.total
|
||||
} else {
|
||||
tableData.value = []
|
||||
total.value = 0
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取路长数据失败:', error)
|
||||
}
|
||||
}
|
||||
|
||||
// 操作按钮
|
||||
const handleView = item => {
|
||||
console.log('查看视频:', item);
|
||||
};
|
||||
const handleView = (item) => {
|
||||
console.log('查看视频:', item)
|
||||
openVideoConference({
|
||||
...item,
|
||||
id: item.id || '',
|
||||
type: '护路员',
|
||||
role: '路长',
|
||||
text: '拨打视频电话',
|
||||
})
|
||||
}
|
||||
|
||||
const handleVoice = item => {
|
||||
console.log('语音通话:', item);
|
||||
};
|
||||
const handleVoice = (item) => {
|
||||
console.log('语音通话:', item)
|
||||
openVoiceConference({
|
||||
...item,
|
||||
id: item.id || '',
|
||||
type: '',
|
||||
role: '路长',
|
||||
text: '拨打语音电话',
|
||||
})
|
||||
}
|
||||
|
||||
const handleCall = item => {
|
||||
console.log('拨打电话:', item);
|
||||
};
|
||||
const handleCall = (item) => {
|
||||
console.log('拨打电话:', item)
|
||||
emit('call', {
|
||||
...item,
|
||||
id: item.id || '',
|
||||
type: '护路员',
|
||||
role: '路长',
|
||||
text: '拨打电话',
|
||||
})
|
||||
}
|
||||
|
||||
// 监听visible变化
|
||||
watch(
|
||||
() => props.visible,
|
||||
newVal => {
|
||||
(newVal) => {
|
||||
if (newVal) {
|
||||
currentPage.value = 1;
|
||||
fetchData();
|
||||
currentPage.value = 1
|
||||
fetchData()
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
)
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<base-dialog
|
||||
v-model:visible="props.visible"
|
||||
:visible="props.visible"
|
||||
title="响应情况"
|
||||
:table-data="tableData"
|
||||
:table-columns="tableColumns"
|
||||
@ -208,22 +208,40 @@ const statsCardsData = ref([
|
||||
{ type: '驻地', label: '影响驻地', value: 0, icon: Icon3 },
|
||||
])
|
||||
|
||||
// 表格列配置
|
||||
const tableColumns = ref([
|
||||
// 统一的表格列配置(桥梁、边坡、隧道、路段使用)
|
||||
const unifiedColumns = [
|
||||
{ prop: 'id', label: '序号', width: '' },
|
||||
{ prop: 'pointType', label: '影响点类型', width: '' },
|
||||
{ prop: 'pointLocation', label: '影响点位置', width: '' },
|
||||
{ prop: 'pointLevel', label: '影响点等级', width: '', slot: 'pointLevel' },
|
||||
{ prop: 'checkCount', label: '巡查次数', width: '' },
|
||||
{ prop: 'trafficDept', label: '交通主管部门负责人', width: '100px', slot: 'trafficDept' },
|
||||
{ prop: 'roadOrg', label: '公路机构责任人', width: '100px', slot: 'roadOrg' },
|
||||
{ prop: 'maintenance', label: '养护站负责人', width: '100px', slot: 'maintenance' },
|
||||
{ prop: 'roadKeeper', label: '护路员', width: '100px', slot: 'roadKeeper' },
|
||||
|
||||
{ prop: 'generalStaff', label: '一般人员(路长履职)', width: '100px', slot: 'generalStaff' },
|
||||
{ prop: 'trafficDept', label: '交通主管部门负责人', width: '', slot: 'trafficDept' },
|
||||
{ prop: 'roadOrg', label: '公路机构责任人', width: '', slot: 'roadOrg' },
|
||||
{ prop: 'maintenance', label: '养护站负责人', width: '', slot: 'maintenance' },
|
||||
{ prop: 'roadKeeper', label: '护路员', width: '', slot: 'roadKeeper' },
|
||||
{ prop: 'generalStaff', label: '一般人员(路长履职)', width: '', slot: 'generalStaff' },
|
||||
{ prop: 'urgeTime', label: '最新催告时间', width: '', slot: 'urgeTime' },
|
||||
{ prop: 'operation', label: '操作', width: '', slot: 'operation' },
|
||||
])
|
||||
]
|
||||
|
||||
// 项目类型专用表格列配置
|
||||
const projectColumns = [
|
||||
{ prop: 'id', label: '序号', width: '60' },
|
||||
{ prop: 'region', label: '影响区域', width: '' },
|
||||
{ prop: 'pointType', label: '影响点类型', width: '' },
|
||||
{ prop: 'siteName', label: '驻地名称', width: '' },
|
||||
{ prop: 'whistleblower', label: '吹哨人', width: '', slot: 'whistleblower' },
|
||||
{ prop: 'constructionUnit', label: '建设单位包保责任人', width: '', slot: 'constructionUnit' },
|
||||
{ prop: 'constructionDept', label: '施工单位包保责任人', width: '', slot: 'constructionDept' },
|
||||
{ prop: 'siteResponsible', label: '驻地包保责任人', width: '', slot: 'siteResponsible' },
|
||||
{ prop: 'countyResponsible', label: '区县级包保责任人', width: '', slot: 'countyResponsible' },
|
||||
{ prop: 'cityResponsible', label: '市级包保责任人', width: '', slot: 'cityResponsible' },
|
||||
// { prop: 'urgeTime', label: '最新催告时间', width: '', slot: 'urgeTime' },
|
||||
// { prop: 'operation', label: '操作', width: '', slot: 'operation' },
|
||||
]
|
||||
|
||||
// 动态表格列配置
|
||||
const tableColumns = ref(unifiedColumns)
|
||||
|
||||
// 表格数据
|
||||
const tableData = ref([])
|
||||
@ -384,7 +402,7 @@ const fetchData = async () => {
|
||||
}
|
||||
})
|
||||
total.value = res.total || 0
|
||||
}else{
|
||||
} else {
|
||||
tableData.value = []
|
||||
total.value = 0
|
||||
}
|
||||
@ -454,6 +472,11 @@ watch(
|
||||
currentPage.value = 1
|
||||
fetchData()
|
||||
loadBarChartData()
|
||||
if (newVal == '驻地') {
|
||||
tableColumns.value = projectColumns
|
||||
} else {
|
||||
tableColumns.value = unifiedColumns
|
||||
}
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<base-dialog
|
||||
v-model:visible="props.visible"
|
||||
:visible="props.visible"
|
||||
title="影响点详情"
|
||||
:table-data="[]"
|
||||
:table-columns="[]"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<base-dialog
|
||||
v-model:visible="props.visible"
|
||||
:visible="props.visible"
|
||||
:title="props.allCountyData.name + '基本信息表'"
|
||||
:table-data="tableData"
|
||||
:table-columns="tableColumns"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<base-dialog
|
||||
v-model:visible="props.visible"
|
||||
:visible="props.visible"
|
||||
:title="`${props.allCountyData.name}建设项目责任人详情`"
|
||||
:table-data="tableData"
|
||||
:table-columns="tableColumns"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<base-dialog
|
||||
v-model:visible="props.visible"
|
||||
:visible="props.visible"
|
||||
:title="props.allCountyData.name + '建设项目责任人明细'"
|
||||
:table-data="tableData"
|
||||
:table-columns="tableColumns"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<base-dialog
|
||||
v-model:visible="props.visible"
|
||||
:visible="props.visible"
|
||||
:title="props.allCountyData.name + '护路团队成员明细'"
|
||||
:table-data="tableData"
|
||||
:table-columns="tableColumns"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<base-dialog
|
||||
v-model:visible="props.visible"
|
||||
:visible="props.visible"
|
||||
:title="rescueTeamData.title"
|
||||
:table-data="[]"
|
||||
:table-columns="[]"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<base-dialog
|
||||
v-model:visible="props.visible"
|
||||
:visible="props.visible"
|
||||
title="响应情况"
|
||||
:table-data="tableData"
|
||||
:table-columns="tableColumns"
|
||||
@ -105,7 +105,7 @@ const props = defineProps({
|
||||
},
|
||||
})
|
||||
|
||||
const emit = defineEmits(['update:visible', 'close', 'openImpactPoint', 'getResponseStatusrowFn'])
|
||||
const emit = defineEmits(['update:visible', 'close', 'openImpactPoint', 'responseStatus', 'getResponseStatusrowFn'])
|
||||
|
||||
// 筛选表单
|
||||
const filterForm = ref({
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<base-dialog
|
||||
v-model:visible="props.visible"
|
||||
:visible="props.visible"
|
||||
title="预警情况"
|
||||
:table-data="tableData"
|
||||
:table-columns="tableColumns"
|
||||
|
||||
@ -1650,28 +1650,28 @@ const initMap = async () => {
|
||||
两江: [29.723, 106.583],
|
||||
}
|
||||
|
||||
// 根据统计数据添加区县标签
|
||||
if (affectedCountyData.value && affectedCountyData.value.byName) {
|
||||
Object.entries(affectedCountyData.value.byName).forEach(([districtName, data]) => {
|
||||
const center = districtCenters[districtName]
|
||||
if (center) {
|
||||
const displayName = districtName
|
||||
const label = window.L.divIcon({
|
||||
className: 'district-label',
|
||||
html: `<div class="label-content">${displayName}</div>`,
|
||||
iconSize: [80, 30],
|
||||
iconAnchor: [40, 15],
|
||||
})
|
||||
// 根据统计数据添加区县标签(已在loadDistrictGeoJson中添加,此处注释避免重复)
|
||||
// if (affectedCountyData.value && affectedCountyData.value.byName) {
|
||||
// Object.entries(affectedCountyData.value.byName).forEach(([districtName, data]) => {
|
||||
// const center = districtCenters[districtName]
|
||||
// if (center) {
|
||||
// const displayName = districtName
|
||||
// const label = window.L.divIcon({
|
||||
// className: 'district-label',
|
||||
// html: `<div class="label-content">${displayName}</div>`,
|
||||
// iconSize: [80, 30],
|
||||
// iconAnchor: [40, 15],
|
||||
// })
|
||||
|
||||
const marker = window.L.marker(center, {
|
||||
icon: label,
|
||||
interactive: false,
|
||||
zIndexOffset: 500,
|
||||
})
|
||||
marker.addTo(mapInstance)
|
||||
}
|
||||
})
|
||||
}
|
||||
// const marker = window.L.marker(center, {
|
||||
// icon: label,
|
||||
// interactive: false,
|
||||
// zIndexOffset: 500,
|
||||
// })
|
||||
// marker.addTo(mapInstance)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
|
||||
// 调整视图以适应重庆边界
|
||||
const chongqingBounds = [
|
||||
|
||||
@ -182,11 +182,11 @@ export const logUserOperation = async (type, command) => {
|
||||
data: data,
|
||||
})
|
||||
console.log('日志请求完成:', res)
|
||||
if (res.code === '00000') {
|
||||
ElMessage.success('操作日志记录成功')
|
||||
} else {
|
||||
ElMessage.error(res.message || '操作日志记录失败')
|
||||
}
|
||||
// if (res.code === '00000') {
|
||||
// ElMessage.success('操作日志记录成功')
|
||||
// } else {
|
||||
// ElMessage.error(res.message || '操作日志记录失败')
|
||||
// }
|
||||
}
|
||||
|
||||
// 打开视频会议
|
||||
@ -331,6 +331,7 @@ const getTokenFromStorage = () => {
|
||||
const BASE_API_URL = 'http://58.144.223.132:30008/'
|
||||
// 获取图片地址数组
|
||||
export const getImageUrlList = (fileIdStr) => {
|
||||
console.log('fileIdStr:', fileIdStr)
|
||||
if (!fileIdStr || typeof fileIdStr !== 'string') {
|
||||
console.warn('fileIdStr 为空或不是字符串')
|
||||
return []
|
||||
|
||||
@ -92,9 +92,11 @@
|
||||
<div>
|
||||
<!-- 农村公路对话框 -->
|
||||
<responseSituationDiaLog
|
||||
:getdateRange="getdateRange"
|
||||
v-model:visible="dialogVisible.responseSituation"
|
||||
:allCountyData="allCountyData"
|
||||
@close="closeDialog('responseSituation')"
|
||||
@call="handleCallClick"
|
||||
/>
|
||||
|
||||
<!-- 预警信息对话框 -->
|
||||
@ -585,7 +587,7 @@ const handleDistrictClick = (item) => {
|
||||
allCountyData.value = item
|
||||
if (item.data.roadType == 'national') {
|
||||
// 国省道
|
||||
openDialog('tongnanTeam')
|
||||
openDialog('tongnanopenDialogTeam')
|
||||
} else if (item.data.roadType == 'rural') {
|
||||
openDialog('responseSituation')
|
||||
} else if (item.data.type == 'project' && item.data.roadType == '-') {
|
||||
@ -604,7 +606,7 @@ const handleCenterCardClick = (item) => {
|
||||
title: getCardTitleByType(item.type),
|
||||
dataList: item.data,
|
||||
}
|
||||
if (item.type == 'second') return
|
||||
// if (item.type == 'second') return
|
||||
chongqingMapRef.value.openCenterCard(cardData)
|
||||
|
||||
// 如果数据中包含区县信息,定位到第一个区县
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user