{{ item.name }}
@@ -63,18 +88,26 @@
border-left: 4px solid #f24d4d;
width: 18%;
padding: 10px;
+ padding-top: 15px;
+ padding-bottom: 15px;
.top {
padding-left: 10px;
+ font-size: 22px;
+ font-weight: 700;
}
.bottom {
text-align: center;
.value {
- font-size: 18px;
+ font-size: 22px;
font-weight: 700;
}
+
+ .unit {
+ font-size: 20px;
+ }
}
}
}
diff --git a/src/views/home/alarm/count/components/trendAnalysis.vue b/src/views/home/alarm/count/components/trendAnalysis.vue
index cea2495..73e18b0 100644
--- a/src/views/home/alarm/count/components/trendAnalysis.vue
+++ b/src/views/home/alarm/count/components/trendAnalysis.vue
@@ -131,8 +131,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/device/device/index.vue b/src/views/home/device/device/index.vue
index 55f12a9..df2cf32 100644
--- a/src/views/home/device/device/index.vue
+++ b/src/views/home/device/device/index.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
const $router = useRouter()
const useStatusList = ref<{ id: string; name: string; value: string }[]>([]) // 设备在用情况
+const deviceTypeList = ref<{ id: string; name: string; value: string }[]>([]) // 设备类型
// 表格数据
const list = ref
([])
const total = ref(0)
@@ -20,18 +21,18 @@
const columns = ref([
{ text: '状态', value: 'onlineState', align: 'center', isCustom: true, width: '55' },
{ text: '设备编号', value: 'devcode', align: 'center', isRequired: true },
- { text: '设备类型', value: 'deviceType', align: 'center', isRequired: true },
- { text: '监测对象', value: 'watchObject', align: 'center' },
+ { text: '设备类型', value: 'deviceTypeName', align: 'center', isRequired: true },
+ { text: '监测对象', value: 'watchObject', align: 'center', width: '85' },
{ text: '设备型号', value: 'deviceModel', align: 'center' },
{ text: '厂商', value: 'manufactureName', align: 'center', isRequired: true },
- { text: '安装位号', value: 'tagNumber', align: 'center', isRequired: true },
+ { text: '安装位号', value: 'tagNumber', align: 'center', isRequired: true, width: '110' },
{ text: '详细位置', value: 'position', align: 'center', isRequired: true },
{ text: '管理单位', value: 'deptName', align: 'center', isRequired: true },
- { text: '在用情况', value: 'validName', align: 'center', isRequired: true },
+ { text: '在用情况', value: 'validName', align: 'center', isRequired: true, width: '85' },
// { text: '布防状态', value: '', align: 'center', isRequired: true },
- { text: '电量', value: 'cell', align: 'center', isRequired: true },
- { text: '最新上报时间', value: 'logtime', align: 'center', isRequired: true },
- { text: '安装日期', value: 'installDate', align: 'center', isRequired: true },
+ { text: '电量', value: 'cell', align: 'center', isRequired: true, width: '70' },
+ { text: '最新上报时间', value: 'logtime', align: 'center', isRequired: true, width: '180' },
+ { text: '安装日期', value: 'installDate', align: 'center', isRequired: true, width: '180' },
])
// 最终展示列
const columnsConfig = ref([])
@@ -75,6 +76,7 @@
list.value = res.data.rows.map((item: any) => ({
...item,
validName: useStatusList.value.length ? useStatusList.value[useStatusList.value.findIndex(citem => item.valid === citem.value)].name : '',
+ deviceTypeName: deviceTypeList.value.length ? deviceTypeList.value[deviceTypeList.value.findIndex(citem => item.deviceType === citem.value)].name : '',
}))
total.value = res.data.total
loadingTable.value = false
@@ -178,7 +180,7 @@
ElMessage.warning('敬请期待')
}
const isUsed = ref<{ id: string; name: string; value: string }[]>([]) // 是否启用
-const deviceTypeList = ref<{ id: string; name: string; value: string }[]>([]) // 设备类型
+
const manufacturerList = ref<{ id: string; name: string; value: string }[]>([]) // 厂商列表
const cellList = ref<{ id: string; name: string; value: string }[]>([]) // 厂商列表
@@ -217,6 +219,12 @@
// 设备类型
getDeviceTypeListPage({ limit: 9999, offset: 1 }).then((res) => {
deviceTypeList.value = res.data.rows.map((item: any) => ({ id: item.id, name: item.typeName, value: item.id }))
+ if (list.value.length) {
+ list.value = list.value.map((item: any) => ({
+ ...item,
+ deviceTypeName: deviceTypeList.value.length ? deviceTypeList.value[deviceTypeList.value.findIndex(citem => item.deviceType === citem.value)].name : '',
+ }))
+ }
})
// 厂商
getManufacturerListPage().then((res) => {
diff --git a/src/views/home/pipeline/components/detailInfoDialog.vue b/src/views/home/pipeline/components/detailInfoDialog.vue
index 31f5635..1662e6e 100644
--- a/src/views/home/pipeline/components/detailInfoDialog.vue
+++ b/src/views/home/pipeline/components/detailInfoDialog.vue
@@ -123,44 +123,39 @@
x
-
-
-
-
- {{ item.text }}
-
-
- {{ detailInfo[item.value] || '' }}
-
-
+
+
+
+ {{ item.text }}
+
+
+ {{ detailInfo[item.value] || '' }}
+
+
+
diff --git a/src/views/home/pipeline/components/map.vue b/src/views/home/pipeline/components/map.vue
index b956aa0..c7c37be 100644
--- a/src/views/home/pipeline/components/map.vue
+++ b/src/views/home/pipeline/components/map.vue
@@ -176,7 +176,10 @@
setTimeout(() => {
// mapRef.value.map.setZoom(14)
// mapRef.value.map.setFitView()
- mapRef.value.map.setCenter(data.event.data.lnglat)
+ // mapRef.value.map.setCenter(data.event.data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.event.data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
// 关联的管线高亮
const line = $props.pipe.filter((item: any) => item.pipeCode === data.event.data.row.pipeCode)
@@ -218,7 +221,10 @@
info: data,
map: mapRef.value.map,
})
- mapRef.value.map.setCenter(data.lnglat)
+ // mapRef.value.map.setCenter(data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
}
// 重置标记点
diff --git a/src/views/home/pipeline/index.vue b/src/views/home/pipeline/index.vue
index 9ef5426..7eb2f1d 100644
--- a/src/views/home/pipeline/index.vue
+++ b/src/views/home/pipeline/index.vue
@@ -12,8 +12,9 @@
import { getDictByCode } from '@/api/system/dict'
// 表格标识 地图或普通
const mapRef = ref()
-const tableFlag = ref('normal')
+const tableFlag = ref('map')
const mapLoading = ref(true)
+const mapLoad = ref(false)
// 表格数据
const list = ref([])
const total = ref(0)
@@ -58,7 +59,6 @@
// 查询数据
const fetchData = () => {
loadingTable.value = true
- mapLoading.value = true
// 判断是否有查询条件(是地图展示20条 否地图展示所有)
const queryList = [] as Boolean[] // 长度大于2 即为是
for (const i in listQuery.value) {
@@ -82,13 +82,13 @@
}
}).catch(() => {
loadingTable.value = false
- if (queryList.length <= 2) {
- mapLoading.value = false
- }
+ mapLoading.value = false
})
- if (queryList.length > 2) { return }
+ if (queryList.length > 2 || mapLoad.value) { return }
+ mapLoading.value = true
// 获取地图全部数据
getPipelineList(listQuery.value).then((res) => {
+ mapLoad.value = true
// 管线
pipeData.value = res.data.map((item: any) => ({
pipeCode: item.PIPE_CODE,
@@ -104,6 +104,7 @@
}, 500)
})
getPipelineDeviceList(listQuery.value).then((res) => {
+ mapLoad.value = true
mapList.value = res.data.map((item: { [key: string]: string }) => ({
deviceTypeName: item.TYPE_NAME,
tagNumber: item.TAG_NUMBER,
@@ -126,6 +127,7 @@
}
// 重置查询条件f
const reset = () => {
+ mapLoad.value = false
listQuery.value = {
limit: 20,
offset: 1,
@@ -239,6 +241,19 @@
},
})
}
+// 表格高度
+const tableHeight = ref(window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10)
+window.addEventListener('resize', () => {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+})
+watch(() => tableFlag.value, (newVal) => {
+ if (newVal === 'map') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+ }
+ else if (newVal === 'normal') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 98 - 10 - 52 - 52 - 10
+ }
+})
@@ -247,11 +262,9 @@
-
-
@@ -260,7 +273,7 @@
@@ -319,8 +332,6 @@
-
-
@@ -382,7 +393,7 @@
.icon {
position: fixed;
- top: 550px;
+ top: 450px;
left: 50%;
// transform: translateX(-50%);
z-index: 901;
diff --git a/src/api/home/alarm/count.ts b/src/api/home/alarm/count.ts
new file mode 100644
index 0000000..1f4b59a
--- /dev/null
+++ b/src/api/home/alarm/count.ts
@@ -0,0 +1,36 @@
+/**
+ * 报警统计
+ */
+import request from '@/api/index'
+
+// 报警总体情况
+export function getOverallAlarm() {
+ return request({
+ url: '/statics/alarmRecords/overall',
+ method: 'post',
+ })
+}
+// 各类报警统计
+export function getAlarmType(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmType',
+ method: 'post',
+ data,
+ })
+}
+// 各单位报警统计
+export function getAlarmCompany(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmCompany',
+ method: 'post',
+ data,
+ })
+}
+// 异常位置分析
+export function getAlarmPosition(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmPosition',
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/views/home/alarm/count/components/alarmStatistics.vue b/src/views/home/alarm/count/components/alarmStatistics.vue
index b009891..b088de2 100644
--- a/src/views/home/alarm/count/components/alarmStatistics.vue
+++ b/src/views/home/alarm/count/components/alarmStatistics.vue
@@ -5,30 +5,79 @@
-->
@@ -37,26 +86,22 @@
- 今日
-
-
本周
本月
-
+
+
+
-
+
搜索
-
+
+
@@ -110,8 +164,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/alarm/count/components/deptCount.vue b/src/views/home/alarm/count/components/deptCount.vue
index 1579231..1ca5482 100644
--- a/src/views/home/alarm/count/components/deptCount.vue
+++ b/src/views/home/alarm/count/components/deptCount.vue
@@ -122,8 +122,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/alarm/count/components/overallAlarm.vue b/src/views/home/alarm/count/components/overallAlarm.vue
index f14ee15..476add8 100644
--- a/src/views/home/alarm/count/components/overallAlarm.vue
+++ b/src/views/home/alarm/count/components/overallAlarm.vue
@@ -5,39 +5,64 @@
-->
-
+
{{ item.name }}
@@ -63,18 +88,26 @@
border-left: 4px solid #f24d4d;
width: 18%;
padding: 10px;
+ padding-top: 15px;
+ padding-bottom: 15px;
.top {
padding-left: 10px;
+ font-size: 22px;
+ font-weight: 700;
}
.bottom {
text-align: center;
.value {
- font-size: 18px;
+ font-size: 22px;
font-weight: 700;
}
+
+ .unit {
+ font-size: 20px;
+ }
}
}
}
diff --git a/src/views/home/alarm/count/components/trendAnalysis.vue b/src/views/home/alarm/count/components/trendAnalysis.vue
index cea2495..73e18b0 100644
--- a/src/views/home/alarm/count/components/trendAnalysis.vue
+++ b/src/views/home/alarm/count/components/trendAnalysis.vue
@@ -131,8 +131,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/device/device/index.vue b/src/views/home/device/device/index.vue
index 55f12a9..df2cf32 100644
--- a/src/views/home/device/device/index.vue
+++ b/src/views/home/device/device/index.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
const $router = useRouter()
const useStatusList = ref<{ id: string; name: string; value: string }[]>([]) // 设备在用情况
+const deviceTypeList = ref<{ id: string; name: string; value: string }[]>([]) // 设备类型
// 表格数据
const list = ref
([])
const total = ref(0)
@@ -20,18 +21,18 @@
const columns = ref([
{ text: '状态', value: 'onlineState', align: 'center', isCustom: true, width: '55' },
{ text: '设备编号', value: 'devcode', align: 'center', isRequired: true },
- { text: '设备类型', value: 'deviceType', align: 'center', isRequired: true },
- { text: '监测对象', value: 'watchObject', align: 'center' },
+ { text: '设备类型', value: 'deviceTypeName', align: 'center', isRequired: true },
+ { text: '监测对象', value: 'watchObject', align: 'center', width: '85' },
{ text: '设备型号', value: 'deviceModel', align: 'center' },
{ text: '厂商', value: 'manufactureName', align: 'center', isRequired: true },
- { text: '安装位号', value: 'tagNumber', align: 'center', isRequired: true },
+ { text: '安装位号', value: 'tagNumber', align: 'center', isRequired: true, width: '110' },
{ text: '详细位置', value: 'position', align: 'center', isRequired: true },
{ text: '管理单位', value: 'deptName', align: 'center', isRequired: true },
- { text: '在用情况', value: 'validName', align: 'center', isRequired: true },
+ { text: '在用情况', value: 'validName', align: 'center', isRequired: true, width: '85' },
// { text: '布防状态', value: '', align: 'center', isRequired: true },
- { text: '电量', value: 'cell', align: 'center', isRequired: true },
- { text: '最新上报时间', value: 'logtime', align: 'center', isRequired: true },
- { text: '安装日期', value: 'installDate', align: 'center', isRequired: true },
+ { text: '电量', value: 'cell', align: 'center', isRequired: true, width: '70' },
+ { text: '最新上报时间', value: 'logtime', align: 'center', isRequired: true, width: '180' },
+ { text: '安装日期', value: 'installDate', align: 'center', isRequired: true, width: '180' },
])
// 最终展示列
const columnsConfig = ref([])
@@ -75,6 +76,7 @@
list.value = res.data.rows.map((item: any) => ({
...item,
validName: useStatusList.value.length ? useStatusList.value[useStatusList.value.findIndex(citem => item.valid === citem.value)].name : '',
+ deviceTypeName: deviceTypeList.value.length ? deviceTypeList.value[deviceTypeList.value.findIndex(citem => item.deviceType === citem.value)].name : '',
}))
total.value = res.data.total
loadingTable.value = false
@@ -178,7 +180,7 @@
ElMessage.warning('敬请期待')
}
const isUsed = ref<{ id: string; name: string; value: string }[]>([]) // 是否启用
-const deviceTypeList = ref<{ id: string; name: string; value: string }[]>([]) // 设备类型
+
const manufacturerList = ref<{ id: string; name: string; value: string }[]>([]) // 厂商列表
const cellList = ref<{ id: string; name: string; value: string }[]>([]) // 厂商列表
@@ -217,6 +219,12 @@
// 设备类型
getDeviceTypeListPage({ limit: 9999, offset: 1 }).then((res) => {
deviceTypeList.value = res.data.rows.map((item: any) => ({ id: item.id, name: item.typeName, value: item.id }))
+ if (list.value.length) {
+ list.value = list.value.map((item: any) => ({
+ ...item,
+ deviceTypeName: deviceTypeList.value.length ? deviceTypeList.value[deviceTypeList.value.findIndex(citem => item.deviceType === citem.value)].name : '',
+ }))
+ }
})
// 厂商
getManufacturerListPage().then((res) => {
diff --git a/src/views/home/pipeline/components/detailInfoDialog.vue b/src/views/home/pipeline/components/detailInfoDialog.vue
index 31f5635..1662e6e 100644
--- a/src/views/home/pipeline/components/detailInfoDialog.vue
+++ b/src/views/home/pipeline/components/detailInfoDialog.vue
@@ -123,44 +123,39 @@
x
-
-
-
-
- {{ item.text }}
-
-
- {{ detailInfo[item.value] || '' }}
-
-
+
+
+
+ {{ item.text }}
+
+
+ {{ detailInfo[item.value] || '' }}
+
+
+
diff --git a/src/views/home/pipeline/components/map.vue b/src/views/home/pipeline/components/map.vue
index b956aa0..c7c37be 100644
--- a/src/views/home/pipeline/components/map.vue
+++ b/src/views/home/pipeline/components/map.vue
@@ -176,7 +176,10 @@
setTimeout(() => {
// mapRef.value.map.setZoom(14)
// mapRef.value.map.setFitView()
- mapRef.value.map.setCenter(data.event.data.lnglat)
+ // mapRef.value.map.setCenter(data.event.data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.event.data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
// 关联的管线高亮
const line = $props.pipe.filter((item: any) => item.pipeCode === data.event.data.row.pipeCode)
@@ -218,7 +221,10 @@
info: data,
map: mapRef.value.map,
})
- mapRef.value.map.setCenter(data.lnglat)
+ // mapRef.value.map.setCenter(data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
}
// 重置标记点
diff --git a/src/views/home/pipeline/index.vue b/src/views/home/pipeline/index.vue
index 9ef5426..7eb2f1d 100644
--- a/src/views/home/pipeline/index.vue
+++ b/src/views/home/pipeline/index.vue
@@ -12,8 +12,9 @@
import { getDictByCode } from '@/api/system/dict'
// 表格标识 地图或普通
const mapRef = ref()
-const tableFlag = ref('normal')
+const tableFlag = ref('map')
const mapLoading = ref(true)
+const mapLoad = ref(false)
// 表格数据
const list = ref([])
const total = ref(0)
@@ -58,7 +59,6 @@
// 查询数据
const fetchData = () => {
loadingTable.value = true
- mapLoading.value = true
// 判断是否有查询条件(是地图展示20条 否地图展示所有)
const queryList = [] as Boolean[] // 长度大于2 即为是
for (const i in listQuery.value) {
@@ -82,13 +82,13 @@
}
}).catch(() => {
loadingTable.value = false
- if (queryList.length <= 2) {
- mapLoading.value = false
- }
+ mapLoading.value = false
})
- if (queryList.length > 2) { return }
+ if (queryList.length > 2 || mapLoad.value) { return }
+ mapLoading.value = true
// 获取地图全部数据
getPipelineList(listQuery.value).then((res) => {
+ mapLoad.value = true
// 管线
pipeData.value = res.data.map((item: any) => ({
pipeCode: item.PIPE_CODE,
@@ -104,6 +104,7 @@
}, 500)
})
getPipelineDeviceList(listQuery.value).then((res) => {
+ mapLoad.value = true
mapList.value = res.data.map((item: { [key: string]: string }) => ({
deviceTypeName: item.TYPE_NAME,
tagNumber: item.TAG_NUMBER,
@@ -126,6 +127,7 @@
}
// 重置查询条件f
const reset = () => {
+ mapLoad.value = false
listQuery.value = {
limit: 20,
offset: 1,
@@ -239,6 +241,19 @@
},
})
}
+// 表格高度
+const tableHeight = ref(window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10)
+window.addEventListener('resize', () => {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+})
+watch(() => tableFlag.value, (newVal) => {
+ if (newVal === 'map') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+ }
+ else if (newVal === 'normal') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 98 - 10 - 52 - 52 - 10
+ }
+})
@@ -247,11 +262,9 @@
-
-
@@ -260,7 +273,7 @@
@@ -319,8 +332,6 @@
-
-
@@ -382,7 +393,7 @@
.icon {
position: fixed;
- top: 550px;
+ top: 450px;
left: 50%;
// transform: translateX(-50%);
z-index: 901;
diff --git a/src/views/home/rule/alarm/components/alarmLevelList.vue b/src/views/home/rule/alarm/components/alarmLevelList.vue
index c1b129d..40c1e43 100644
--- a/src/views/home/rule/alarm/components/alarmLevelList.vue
+++ b/src/views/home/rule/alarm/components/alarmLevelList.vue
@@ -18,7 +18,7 @@
{ text: '报警提示方式', value: 'alarmNoteMethodName', align: 'center' },
{ text: '报警音效', value: 'isSoundName', align: 'center' },
{ text: '报警推送', value: 'isSendName', align: 'center' },
- { text: '报警短信', value: 'isTextName', align: 'center' },
+ // { text: '报警短信', value: 'isTextName', align: 'center' },
])
const loadingTable = ref(true)
// 查询条件
diff --git a/src/api/home/alarm/count.ts b/src/api/home/alarm/count.ts
new file mode 100644
index 0000000..1f4b59a
--- /dev/null
+++ b/src/api/home/alarm/count.ts
@@ -0,0 +1,36 @@
+/**
+ * 报警统计
+ */
+import request from '@/api/index'
+
+// 报警总体情况
+export function getOverallAlarm() {
+ return request({
+ url: '/statics/alarmRecords/overall',
+ method: 'post',
+ })
+}
+// 各类报警统计
+export function getAlarmType(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmType',
+ method: 'post',
+ data,
+ })
+}
+// 各单位报警统计
+export function getAlarmCompany(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmCompany',
+ method: 'post',
+ data,
+ })
+}
+// 异常位置分析
+export function getAlarmPosition(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmPosition',
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/views/home/alarm/count/components/alarmStatistics.vue b/src/views/home/alarm/count/components/alarmStatistics.vue
index b009891..b088de2 100644
--- a/src/views/home/alarm/count/components/alarmStatistics.vue
+++ b/src/views/home/alarm/count/components/alarmStatistics.vue
@@ -5,30 +5,79 @@
-->
@@ -37,26 +86,22 @@
- 今日
-
-
本周
本月
-
+
+
+
-
+
搜索
-
+
+
@@ -110,8 +164,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/alarm/count/components/deptCount.vue b/src/views/home/alarm/count/components/deptCount.vue
index 1579231..1ca5482 100644
--- a/src/views/home/alarm/count/components/deptCount.vue
+++ b/src/views/home/alarm/count/components/deptCount.vue
@@ -122,8 +122,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/alarm/count/components/overallAlarm.vue b/src/views/home/alarm/count/components/overallAlarm.vue
index f14ee15..476add8 100644
--- a/src/views/home/alarm/count/components/overallAlarm.vue
+++ b/src/views/home/alarm/count/components/overallAlarm.vue
@@ -5,39 +5,64 @@
-->
-
+
{{ item.name }}
@@ -63,18 +88,26 @@
border-left: 4px solid #f24d4d;
width: 18%;
padding: 10px;
+ padding-top: 15px;
+ padding-bottom: 15px;
.top {
padding-left: 10px;
+ font-size: 22px;
+ font-weight: 700;
}
.bottom {
text-align: center;
.value {
- font-size: 18px;
+ font-size: 22px;
font-weight: 700;
}
+
+ .unit {
+ font-size: 20px;
+ }
}
}
}
diff --git a/src/views/home/alarm/count/components/trendAnalysis.vue b/src/views/home/alarm/count/components/trendAnalysis.vue
index cea2495..73e18b0 100644
--- a/src/views/home/alarm/count/components/trendAnalysis.vue
+++ b/src/views/home/alarm/count/components/trendAnalysis.vue
@@ -131,8 +131,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/device/device/index.vue b/src/views/home/device/device/index.vue
index 55f12a9..df2cf32 100644
--- a/src/views/home/device/device/index.vue
+++ b/src/views/home/device/device/index.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
const $router = useRouter()
const useStatusList = ref<{ id: string; name: string; value: string }[]>([]) // 设备在用情况
+const deviceTypeList = ref<{ id: string; name: string; value: string }[]>([]) // 设备类型
// 表格数据
const list = ref
([])
const total = ref(0)
@@ -20,18 +21,18 @@
const columns = ref([
{ text: '状态', value: 'onlineState', align: 'center', isCustom: true, width: '55' },
{ text: '设备编号', value: 'devcode', align: 'center', isRequired: true },
- { text: '设备类型', value: 'deviceType', align: 'center', isRequired: true },
- { text: '监测对象', value: 'watchObject', align: 'center' },
+ { text: '设备类型', value: 'deviceTypeName', align: 'center', isRequired: true },
+ { text: '监测对象', value: 'watchObject', align: 'center', width: '85' },
{ text: '设备型号', value: 'deviceModel', align: 'center' },
{ text: '厂商', value: 'manufactureName', align: 'center', isRequired: true },
- { text: '安装位号', value: 'tagNumber', align: 'center', isRequired: true },
+ { text: '安装位号', value: 'tagNumber', align: 'center', isRequired: true, width: '110' },
{ text: '详细位置', value: 'position', align: 'center', isRequired: true },
{ text: '管理单位', value: 'deptName', align: 'center', isRequired: true },
- { text: '在用情况', value: 'validName', align: 'center', isRequired: true },
+ { text: '在用情况', value: 'validName', align: 'center', isRequired: true, width: '85' },
// { text: '布防状态', value: '', align: 'center', isRequired: true },
- { text: '电量', value: 'cell', align: 'center', isRequired: true },
- { text: '最新上报时间', value: 'logtime', align: 'center', isRequired: true },
- { text: '安装日期', value: 'installDate', align: 'center', isRequired: true },
+ { text: '电量', value: 'cell', align: 'center', isRequired: true, width: '70' },
+ { text: '最新上报时间', value: 'logtime', align: 'center', isRequired: true, width: '180' },
+ { text: '安装日期', value: 'installDate', align: 'center', isRequired: true, width: '180' },
])
// 最终展示列
const columnsConfig = ref([])
@@ -75,6 +76,7 @@
list.value = res.data.rows.map((item: any) => ({
...item,
validName: useStatusList.value.length ? useStatusList.value[useStatusList.value.findIndex(citem => item.valid === citem.value)].name : '',
+ deviceTypeName: deviceTypeList.value.length ? deviceTypeList.value[deviceTypeList.value.findIndex(citem => item.deviceType === citem.value)].name : '',
}))
total.value = res.data.total
loadingTable.value = false
@@ -178,7 +180,7 @@
ElMessage.warning('敬请期待')
}
const isUsed = ref<{ id: string; name: string; value: string }[]>([]) // 是否启用
-const deviceTypeList = ref<{ id: string; name: string; value: string }[]>([]) // 设备类型
+
const manufacturerList = ref<{ id: string; name: string; value: string }[]>([]) // 厂商列表
const cellList = ref<{ id: string; name: string; value: string }[]>([]) // 厂商列表
@@ -217,6 +219,12 @@
// 设备类型
getDeviceTypeListPage({ limit: 9999, offset: 1 }).then((res) => {
deviceTypeList.value = res.data.rows.map((item: any) => ({ id: item.id, name: item.typeName, value: item.id }))
+ if (list.value.length) {
+ list.value = list.value.map((item: any) => ({
+ ...item,
+ deviceTypeName: deviceTypeList.value.length ? deviceTypeList.value[deviceTypeList.value.findIndex(citem => item.deviceType === citem.value)].name : '',
+ }))
+ }
})
// 厂商
getManufacturerListPage().then((res) => {
diff --git a/src/views/home/pipeline/components/detailInfoDialog.vue b/src/views/home/pipeline/components/detailInfoDialog.vue
index 31f5635..1662e6e 100644
--- a/src/views/home/pipeline/components/detailInfoDialog.vue
+++ b/src/views/home/pipeline/components/detailInfoDialog.vue
@@ -123,44 +123,39 @@
x
-
-
-
-
- {{ item.text }}
-
-
- {{ detailInfo[item.value] || '' }}
-
-
+
+
+
+ {{ item.text }}
+
+
+ {{ detailInfo[item.value] || '' }}
+
+
+
diff --git a/src/views/home/pipeline/components/map.vue b/src/views/home/pipeline/components/map.vue
index b956aa0..c7c37be 100644
--- a/src/views/home/pipeline/components/map.vue
+++ b/src/views/home/pipeline/components/map.vue
@@ -176,7 +176,10 @@
setTimeout(() => {
// mapRef.value.map.setZoom(14)
// mapRef.value.map.setFitView()
- mapRef.value.map.setCenter(data.event.data.lnglat)
+ // mapRef.value.map.setCenter(data.event.data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.event.data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
// 关联的管线高亮
const line = $props.pipe.filter((item: any) => item.pipeCode === data.event.data.row.pipeCode)
@@ -218,7 +221,10 @@
info: data,
map: mapRef.value.map,
})
- mapRef.value.map.setCenter(data.lnglat)
+ // mapRef.value.map.setCenter(data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
}
// 重置标记点
diff --git a/src/views/home/pipeline/index.vue b/src/views/home/pipeline/index.vue
index 9ef5426..7eb2f1d 100644
--- a/src/views/home/pipeline/index.vue
+++ b/src/views/home/pipeline/index.vue
@@ -12,8 +12,9 @@
import { getDictByCode } from '@/api/system/dict'
// 表格标识 地图或普通
const mapRef = ref()
-const tableFlag = ref('normal')
+const tableFlag = ref('map')
const mapLoading = ref(true)
+const mapLoad = ref(false)
// 表格数据
const list = ref([])
const total = ref(0)
@@ -58,7 +59,6 @@
// 查询数据
const fetchData = () => {
loadingTable.value = true
- mapLoading.value = true
// 判断是否有查询条件(是地图展示20条 否地图展示所有)
const queryList = [] as Boolean[] // 长度大于2 即为是
for (const i in listQuery.value) {
@@ -82,13 +82,13 @@
}
}).catch(() => {
loadingTable.value = false
- if (queryList.length <= 2) {
- mapLoading.value = false
- }
+ mapLoading.value = false
})
- if (queryList.length > 2) { return }
+ if (queryList.length > 2 || mapLoad.value) { return }
+ mapLoading.value = true
// 获取地图全部数据
getPipelineList(listQuery.value).then((res) => {
+ mapLoad.value = true
// 管线
pipeData.value = res.data.map((item: any) => ({
pipeCode: item.PIPE_CODE,
@@ -104,6 +104,7 @@
}, 500)
})
getPipelineDeviceList(listQuery.value).then((res) => {
+ mapLoad.value = true
mapList.value = res.data.map((item: { [key: string]: string }) => ({
deviceTypeName: item.TYPE_NAME,
tagNumber: item.TAG_NUMBER,
@@ -126,6 +127,7 @@
}
// 重置查询条件f
const reset = () => {
+ mapLoad.value = false
listQuery.value = {
limit: 20,
offset: 1,
@@ -239,6 +241,19 @@
},
})
}
+// 表格高度
+const tableHeight = ref(window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10)
+window.addEventListener('resize', () => {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+})
+watch(() => tableFlag.value, (newVal) => {
+ if (newVal === 'map') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+ }
+ else if (newVal === 'normal') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 98 - 10 - 52 - 52 - 10
+ }
+})
@@ -247,11 +262,9 @@
-
-
@@ -260,7 +273,7 @@
@@ -319,8 +332,6 @@
-
-
@@ -382,7 +393,7 @@
.icon {
position: fixed;
- top: 550px;
+ top: 450px;
left: 50%;
// transform: translateX(-50%);
z-index: 901;
diff --git a/src/views/home/rule/alarm/components/alarmLevelList.vue b/src/views/home/rule/alarm/components/alarmLevelList.vue
index c1b129d..40c1e43 100644
--- a/src/views/home/rule/alarm/components/alarmLevelList.vue
+++ b/src/views/home/rule/alarm/components/alarmLevelList.vue
@@ -18,7 +18,7 @@
{ text: '报警提示方式', value: 'alarmNoteMethodName', align: 'center' },
{ text: '报警音效', value: 'isSoundName', align: 'center' },
{ text: '报警推送', value: 'isSendName', align: 'center' },
- { text: '报警短信', value: 'isTextName', align: 'center' },
+ // { text: '报警短信', value: 'isTextName', align: 'center' },
])
const loadingTable = ref(true)
// 查询条件
diff --git a/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue b/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
index fe60451..757a42c 100644
--- a/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
+++ b/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
@@ -168,11 +168,11 @@
-
+
diff --git a/src/api/home/alarm/count.ts b/src/api/home/alarm/count.ts
new file mode 100644
index 0000000..1f4b59a
--- /dev/null
+++ b/src/api/home/alarm/count.ts
@@ -0,0 +1,36 @@
+/**
+ * 报警统计
+ */
+import request from '@/api/index'
+
+// 报警总体情况
+export function getOverallAlarm() {
+ return request({
+ url: '/statics/alarmRecords/overall',
+ method: 'post',
+ })
+}
+// 各类报警统计
+export function getAlarmType(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmType',
+ method: 'post',
+ data,
+ })
+}
+// 各单位报警统计
+export function getAlarmCompany(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmCompany',
+ method: 'post',
+ data,
+ })
+}
+// 异常位置分析
+export function getAlarmPosition(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmPosition',
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/views/home/alarm/count/components/alarmStatistics.vue b/src/views/home/alarm/count/components/alarmStatistics.vue
index b009891..b088de2 100644
--- a/src/views/home/alarm/count/components/alarmStatistics.vue
+++ b/src/views/home/alarm/count/components/alarmStatistics.vue
@@ -5,30 +5,79 @@
-->
@@ -37,26 +86,22 @@
- 今日
-
-
本周
本月
-
+
+
+
-
+
搜索
-
+
+
@@ -110,8 +164,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/alarm/count/components/deptCount.vue b/src/views/home/alarm/count/components/deptCount.vue
index 1579231..1ca5482 100644
--- a/src/views/home/alarm/count/components/deptCount.vue
+++ b/src/views/home/alarm/count/components/deptCount.vue
@@ -122,8 +122,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/alarm/count/components/overallAlarm.vue b/src/views/home/alarm/count/components/overallAlarm.vue
index f14ee15..476add8 100644
--- a/src/views/home/alarm/count/components/overallAlarm.vue
+++ b/src/views/home/alarm/count/components/overallAlarm.vue
@@ -5,39 +5,64 @@
-->
-
+
{{ item.name }}
@@ -63,18 +88,26 @@
border-left: 4px solid #f24d4d;
width: 18%;
padding: 10px;
+ padding-top: 15px;
+ padding-bottom: 15px;
.top {
padding-left: 10px;
+ font-size: 22px;
+ font-weight: 700;
}
.bottom {
text-align: center;
.value {
- font-size: 18px;
+ font-size: 22px;
font-weight: 700;
}
+
+ .unit {
+ font-size: 20px;
+ }
}
}
}
diff --git a/src/views/home/alarm/count/components/trendAnalysis.vue b/src/views/home/alarm/count/components/trendAnalysis.vue
index cea2495..73e18b0 100644
--- a/src/views/home/alarm/count/components/trendAnalysis.vue
+++ b/src/views/home/alarm/count/components/trendAnalysis.vue
@@ -131,8 +131,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/device/device/index.vue b/src/views/home/device/device/index.vue
index 55f12a9..df2cf32 100644
--- a/src/views/home/device/device/index.vue
+++ b/src/views/home/device/device/index.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
const $router = useRouter()
const useStatusList = ref<{ id: string; name: string; value: string }[]>([]) // 设备在用情况
+const deviceTypeList = ref<{ id: string; name: string; value: string }[]>([]) // 设备类型
// 表格数据
const list = ref
([])
const total = ref(0)
@@ -20,18 +21,18 @@
const columns = ref([
{ text: '状态', value: 'onlineState', align: 'center', isCustom: true, width: '55' },
{ text: '设备编号', value: 'devcode', align: 'center', isRequired: true },
- { text: '设备类型', value: 'deviceType', align: 'center', isRequired: true },
- { text: '监测对象', value: 'watchObject', align: 'center' },
+ { text: '设备类型', value: 'deviceTypeName', align: 'center', isRequired: true },
+ { text: '监测对象', value: 'watchObject', align: 'center', width: '85' },
{ text: '设备型号', value: 'deviceModel', align: 'center' },
{ text: '厂商', value: 'manufactureName', align: 'center', isRequired: true },
- { text: '安装位号', value: 'tagNumber', align: 'center', isRequired: true },
+ { text: '安装位号', value: 'tagNumber', align: 'center', isRequired: true, width: '110' },
{ text: '详细位置', value: 'position', align: 'center', isRequired: true },
{ text: '管理单位', value: 'deptName', align: 'center', isRequired: true },
- { text: '在用情况', value: 'validName', align: 'center', isRequired: true },
+ { text: '在用情况', value: 'validName', align: 'center', isRequired: true, width: '85' },
// { text: '布防状态', value: '', align: 'center', isRequired: true },
- { text: '电量', value: 'cell', align: 'center', isRequired: true },
- { text: '最新上报时间', value: 'logtime', align: 'center', isRequired: true },
- { text: '安装日期', value: 'installDate', align: 'center', isRequired: true },
+ { text: '电量', value: 'cell', align: 'center', isRequired: true, width: '70' },
+ { text: '最新上报时间', value: 'logtime', align: 'center', isRequired: true, width: '180' },
+ { text: '安装日期', value: 'installDate', align: 'center', isRequired: true, width: '180' },
])
// 最终展示列
const columnsConfig = ref([])
@@ -75,6 +76,7 @@
list.value = res.data.rows.map((item: any) => ({
...item,
validName: useStatusList.value.length ? useStatusList.value[useStatusList.value.findIndex(citem => item.valid === citem.value)].name : '',
+ deviceTypeName: deviceTypeList.value.length ? deviceTypeList.value[deviceTypeList.value.findIndex(citem => item.deviceType === citem.value)].name : '',
}))
total.value = res.data.total
loadingTable.value = false
@@ -178,7 +180,7 @@
ElMessage.warning('敬请期待')
}
const isUsed = ref<{ id: string; name: string; value: string }[]>([]) // 是否启用
-const deviceTypeList = ref<{ id: string; name: string; value: string }[]>([]) // 设备类型
+
const manufacturerList = ref<{ id: string; name: string; value: string }[]>([]) // 厂商列表
const cellList = ref<{ id: string; name: string; value: string }[]>([]) // 厂商列表
@@ -217,6 +219,12 @@
// 设备类型
getDeviceTypeListPage({ limit: 9999, offset: 1 }).then((res) => {
deviceTypeList.value = res.data.rows.map((item: any) => ({ id: item.id, name: item.typeName, value: item.id }))
+ if (list.value.length) {
+ list.value = list.value.map((item: any) => ({
+ ...item,
+ deviceTypeName: deviceTypeList.value.length ? deviceTypeList.value[deviceTypeList.value.findIndex(citem => item.deviceType === citem.value)].name : '',
+ }))
+ }
})
// 厂商
getManufacturerListPage().then((res) => {
diff --git a/src/views/home/pipeline/components/detailInfoDialog.vue b/src/views/home/pipeline/components/detailInfoDialog.vue
index 31f5635..1662e6e 100644
--- a/src/views/home/pipeline/components/detailInfoDialog.vue
+++ b/src/views/home/pipeline/components/detailInfoDialog.vue
@@ -123,44 +123,39 @@
x
-
-
-
-
- {{ item.text }}
-
-
- {{ detailInfo[item.value] || '' }}
-
-
+
+
+
+ {{ item.text }}
+
+
+ {{ detailInfo[item.value] || '' }}
+
+
+
diff --git a/src/views/home/pipeline/components/map.vue b/src/views/home/pipeline/components/map.vue
index b956aa0..c7c37be 100644
--- a/src/views/home/pipeline/components/map.vue
+++ b/src/views/home/pipeline/components/map.vue
@@ -176,7 +176,10 @@
setTimeout(() => {
// mapRef.value.map.setZoom(14)
// mapRef.value.map.setFitView()
- mapRef.value.map.setCenter(data.event.data.lnglat)
+ // mapRef.value.map.setCenter(data.event.data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.event.data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
// 关联的管线高亮
const line = $props.pipe.filter((item: any) => item.pipeCode === data.event.data.row.pipeCode)
@@ -218,7 +221,10 @@
info: data,
map: mapRef.value.map,
})
- mapRef.value.map.setCenter(data.lnglat)
+ // mapRef.value.map.setCenter(data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
}
// 重置标记点
diff --git a/src/views/home/pipeline/index.vue b/src/views/home/pipeline/index.vue
index 9ef5426..7eb2f1d 100644
--- a/src/views/home/pipeline/index.vue
+++ b/src/views/home/pipeline/index.vue
@@ -12,8 +12,9 @@
import { getDictByCode } from '@/api/system/dict'
// 表格标识 地图或普通
const mapRef = ref()
-const tableFlag = ref('normal')
+const tableFlag = ref('map')
const mapLoading = ref(true)
+const mapLoad = ref(false)
// 表格数据
const list = ref([])
const total = ref(0)
@@ -58,7 +59,6 @@
// 查询数据
const fetchData = () => {
loadingTable.value = true
- mapLoading.value = true
// 判断是否有查询条件(是地图展示20条 否地图展示所有)
const queryList = [] as Boolean[] // 长度大于2 即为是
for (const i in listQuery.value) {
@@ -82,13 +82,13 @@
}
}).catch(() => {
loadingTable.value = false
- if (queryList.length <= 2) {
- mapLoading.value = false
- }
+ mapLoading.value = false
})
- if (queryList.length > 2) { return }
+ if (queryList.length > 2 || mapLoad.value) { return }
+ mapLoading.value = true
// 获取地图全部数据
getPipelineList(listQuery.value).then((res) => {
+ mapLoad.value = true
// 管线
pipeData.value = res.data.map((item: any) => ({
pipeCode: item.PIPE_CODE,
@@ -104,6 +104,7 @@
}, 500)
})
getPipelineDeviceList(listQuery.value).then((res) => {
+ mapLoad.value = true
mapList.value = res.data.map((item: { [key: string]: string }) => ({
deviceTypeName: item.TYPE_NAME,
tagNumber: item.TAG_NUMBER,
@@ -126,6 +127,7 @@
}
// 重置查询条件f
const reset = () => {
+ mapLoad.value = false
listQuery.value = {
limit: 20,
offset: 1,
@@ -239,6 +241,19 @@
},
})
}
+// 表格高度
+const tableHeight = ref(window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10)
+window.addEventListener('resize', () => {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+})
+watch(() => tableFlag.value, (newVal) => {
+ if (newVal === 'map') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+ }
+ else if (newVal === 'normal') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 98 - 10 - 52 - 52 - 10
+ }
+})
@@ -247,11 +262,9 @@
-
-
@@ -260,7 +273,7 @@
@@ -319,8 +332,6 @@
-
-
@@ -382,7 +393,7 @@
.icon {
position: fixed;
- top: 550px;
+ top: 450px;
left: 50%;
// transform: translateX(-50%);
z-index: 901;
diff --git a/src/views/home/rule/alarm/components/alarmLevelList.vue b/src/views/home/rule/alarm/components/alarmLevelList.vue
index c1b129d..40c1e43 100644
--- a/src/views/home/rule/alarm/components/alarmLevelList.vue
+++ b/src/views/home/rule/alarm/components/alarmLevelList.vue
@@ -18,7 +18,7 @@
{ text: '报警提示方式', value: 'alarmNoteMethodName', align: 'center' },
{ text: '报警音效', value: 'isSoundName', align: 'center' },
{ text: '报警推送', value: 'isSendName', align: 'center' },
- { text: '报警短信', value: 'isTextName', align: 'center' },
+ // { text: '报警短信', value: 'isTextName', align: 'center' },
])
const loadingTable = ref(true)
// 查询条件
diff --git a/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue b/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
index fe60451..757a42c 100644
--- a/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
+++ b/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
@@ -168,11 +168,11 @@
-
+
diff --git a/src/views/home/rule/alarm/components/editDialog.vue b/src/views/home/rule/alarm/components/editDialog.vue
index a8c565f..3bd2958 100644
--- a/src/views/home/rule/alarm/components/editDialog.vue
+++ b/src/views/home/rule/alarm/components/editDialog.vue
@@ -226,6 +226,9 @@
else {
alarmEventList.value = []
}
+ if (newVal) {
+ dataForm.value.alarmThreshold = ''
+ }
}, {
deep: true,
immediate: true,
diff --git a/src/api/home/alarm/count.ts b/src/api/home/alarm/count.ts
new file mode 100644
index 0000000..1f4b59a
--- /dev/null
+++ b/src/api/home/alarm/count.ts
@@ -0,0 +1,36 @@
+/**
+ * 报警统计
+ */
+import request from '@/api/index'
+
+// 报警总体情况
+export function getOverallAlarm() {
+ return request({
+ url: '/statics/alarmRecords/overall',
+ method: 'post',
+ })
+}
+// 各类报警统计
+export function getAlarmType(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmType',
+ method: 'post',
+ data,
+ })
+}
+// 各单位报警统计
+export function getAlarmCompany(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmCompany',
+ method: 'post',
+ data,
+ })
+}
+// 异常位置分析
+export function getAlarmPosition(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmPosition',
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/views/home/alarm/count/components/alarmStatistics.vue b/src/views/home/alarm/count/components/alarmStatistics.vue
index b009891..b088de2 100644
--- a/src/views/home/alarm/count/components/alarmStatistics.vue
+++ b/src/views/home/alarm/count/components/alarmStatistics.vue
@@ -5,30 +5,79 @@
-->
@@ -37,26 +86,22 @@
- 今日
-
-
本周
本月
-
+
+
+
-
+
搜索
-
+
+
@@ -110,8 +164,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/alarm/count/components/deptCount.vue b/src/views/home/alarm/count/components/deptCount.vue
index 1579231..1ca5482 100644
--- a/src/views/home/alarm/count/components/deptCount.vue
+++ b/src/views/home/alarm/count/components/deptCount.vue
@@ -122,8 +122,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/alarm/count/components/overallAlarm.vue b/src/views/home/alarm/count/components/overallAlarm.vue
index f14ee15..476add8 100644
--- a/src/views/home/alarm/count/components/overallAlarm.vue
+++ b/src/views/home/alarm/count/components/overallAlarm.vue
@@ -5,39 +5,64 @@
-->
-
+
{{ item.name }}
@@ -63,18 +88,26 @@
border-left: 4px solid #f24d4d;
width: 18%;
padding: 10px;
+ padding-top: 15px;
+ padding-bottom: 15px;
.top {
padding-left: 10px;
+ font-size: 22px;
+ font-weight: 700;
}
.bottom {
text-align: center;
.value {
- font-size: 18px;
+ font-size: 22px;
font-weight: 700;
}
+
+ .unit {
+ font-size: 20px;
+ }
}
}
}
diff --git a/src/views/home/alarm/count/components/trendAnalysis.vue b/src/views/home/alarm/count/components/trendAnalysis.vue
index cea2495..73e18b0 100644
--- a/src/views/home/alarm/count/components/trendAnalysis.vue
+++ b/src/views/home/alarm/count/components/trendAnalysis.vue
@@ -131,8 +131,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/device/device/index.vue b/src/views/home/device/device/index.vue
index 55f12a9..df2cf32 100644
--- a/src/views/home/device/device/index.vue
+++ b/src/views/home/device/device/index.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
const $router = useRouter()
const useStatusList = ref<{ id: string; name: string; value: string }[]>([]) // 设备在用情况
+const deviceTypeList = ref<{ id: string; name: string; value: string }[]>([]) // 设备类型
// 表格数据
const list = ref
([])
const total = ref(0)
@@ -20,18 +21,18 @@
const columns = ref([
{ text: '状态', value: 'onlineState', align: 'center', isCustom: true, width: '55' },
{ text: '设备编号', value: 'devcode', align: 'center', isRequired: true },
- { text: '设备类型', value: 'deviceType', align: 'center', isRequired: true },
- { text: '监测对象', value: 'watchObject', align: 'center' },
+ { text: '设备类型', value: 'deviceTypeName', align: 'center', isRequired: true },
+ { text: '监测对象', value: 'watchObject', align: 'center', width: '85' },
{ text: '设备型号', value: 'deviceModel', align: 'center' },
{ text: '厂商', value: 'manufactureName', align: 'center', isRequired: true },
- { text: '安装位号', value: 'tagNumber', align: 'center', isRequired: true },
+ { text: '安装位号', value: 'tagNumber', align: 'center', isRequired: true, width: '110' },
{ text: '详细位置', value: 'position', align: 'center', isRequired: true },
{ text: '管理单位', value: 'deptName', align: 'center', isRequired: true },
- { text: '在用情况', value: 'validName', align: 'center', isRequired: true },
+ { text: '在用情况', value: 'validName', align: 'center', isRequired: true, width: '85' },
// { text: '布防状态', value: '', align: 'center', isRequired: true },
- { text: '电量', value: 'cell', align: 'center', isRequired: true },
- { text: '最新上报时间', value: 'logtime', align: 'center', isRequired: true },
- { text: '安装日期', value: 'installDate', align: 'center', isRequired: true },
+ { text: '电量', value: 'cell', align: 'center', isRequired: true, width: '70' },
+ { text: '最新上报时间', value: 'logtime', align: 'center', isRequired: true, width: '180' },
+ { text: '安装日期', value: 'installDate', align: 'center', isRequired: true, width: '180' },
])
// 最终展示列
const columnsConfig = ref([])
@@ -75,6 +76,7 @@
list.value = res.data.rows.map((item: any) => ({
...item,
validName: useStatusList.value.length ? useStatusList.value[useStatusList.value.findIndex(citem => item.valid === citem.value)].name : '',
+ deviceTypeName: deviceTypeList.value.length ? deviceTypeList.value[deviceTypeList.value.findIndex(citem => item.deviceType === citem.value)].name : '',
}))
total.value = res.data.total
loadingTable.value = false
@@ -178,7 +180,7 @@
ElMessage.warning('敬请期待')
}
const isUsed = ref<{ id: string; name: string; value: string }[]>([]) // 是否启用
-const deviceTypeList = ref<{ id: string; name: string; value: string }[]>([]) // 设备类型
+
const manufacturerList = ref<{ id: string; name: string; value: string }[]>([]) // 厂商列表
const cellList = ref<{ id: string; name: string; value: string }[]>([]) // 厂商列表
@@ -217,6 +219,12 @@
// 设备类型
getDeviceTypeListPage({ limit: 9999, offset: 1 }).then((res) => {
deviceTypeList.value = res.data.rows.map((item: any) => ({ id: item.id, name: item.typeName, value: item.id }))
+ if (list.value.length) {
+ list.value = list.value.map((item: any) => ({
+ ...item,
+ deviceTypeName: deviceTypeList.value.length ? deviceTypeList.value[deviceTypeList.value.findIndex(citem => item.deviceType === citem.value)].name : '',
+ }))
+ }
})
// 厂商
getManufacturerListPage().then((res) => {
diff --git a/src/views/home/pipeline/components/detailInfoDialog.vue b/src/views/home/pipeline/components/detailInfoDialog.vue
index 31f5635..1662e6e 100644
--- a/src/views/home/pipeline/components/detailInfoDialog.vue
+++ b/src/views/home/pipeline/components/detailInfoDialog.vue
@@ -123,44 +123,39 @@
x
-
-
-
-
- {{ item.text }}
-
-
- {{ detailInfo[item.value] || '' }}
-
-
+
+
+
+ {{ item.text }}
+
+
+ {{ detailInfo[item.value] || '' }}
+
+
+
diff --git a/src/views/home/pipeline/components/map.vue b/src/views/home/pipeline/components/map.vue
index b956aa0..c7c37be 100644
--- a/src/views/home/pipeline/components/map.vue
+++ b/src/views/home/pipeline/components/map.vue
@@ -176,7 +176,10 @@
setTimeout(() => {
// mapRef.value.map.setZoom(14)
// mapRef.value.map.setFitView()
- mapRef.value.map.setCenter(data.event.data.lnglat)
+ // mapRef.value.map.setCenter(data.event.data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.event.data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
// 关联的管线高亮
const line = $props.pipe.filter((item: any) => item.pipeCode === data.event.data.row.pipeCode)
@@ -218,7 +221,10 @@
info: data,
map: mapRef.value.map,
})
- mapRef.value.map.setCenter(data.lnglat)
+ // mapRef.value.map.setCenter(data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
}
// 重置标记点
diff --git a/src/views/home/pipeline/index.vue b/src/views/home/pipeline/index.vue
index 9ef5426..7eb2f1d 100644
--- a/src/views/home/pipeline/index.vue
+++ b/src/views/home/pipeline/index.vue
@@ -12,8 +12,9 @@
import { getDictByCode } from '@/api/system/dict'
// 表格标识 地图或普通
const mapRef = ref()
-const tableFlag = ref('normal')
+const tableFlag = ref('map')
const mapLoading = ref(true)
+const mapLoad = ref(false)
// 表格数据
const list = ref([])
const total = ref(0)
@@ -58,7 +59,6 @@
// 查询数据
const fetchData = () => {
loadingTable.value = true
- mapLoading.value = true
// 判断是否有查询条件(是地图展示20条 否地图展示所有)
const queryList = [] as Boolean[] // 长度大于2 即为是
for (const i in listQuery.value) {
@@ -82,13 +82,13 @@
}
}).catch(() => {
loadingTable.value = false
- if (queryList.length <= 2) {
- mapLoading.value = false
- }
+ mapLoading.value = false
})
- if (queryList.length > 2) { return }
+ if (queryList.length > 2 || mapLoad.value) { return }
+ mapLoading.value = true
// 获取地图全部数据
getPipelineList(listQuery.value).then((res) => {
+ mapLoad.value = true
// 管线
pipeData.value = res.data.map((item: any) => ({
pipeCode: item.PIPE_CODE,
@@ -104,6 +104,7 @@
}, 500)
})
getPipelineDeviceList(listQuery.value).then((res) => {
+ mapLoad.value = true
mapList.value = res.data.map((item: { [key: string]: string }) => ({
deviceTypeName: item.TYPE_NAME,
tagNumber: item.TAG_NUMBER,
@@ -126,6 +127,7 @@
}
// 重置查询条件f
const reset = () => {
+ mapLoad.value = false
listQuery.value = {
limit: 20,
offset: 1,
@@ -239,6 +241,19 @@
},
})
}
+// 表格高度
+const tableHeight = ref(window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10)
+window.addEventListener('resize', () => {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+})
+watch(() => tableFlag.value, (newVal) => {
+ if (newVal === 'map') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+ }
+ else if (newVal === 'normal') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 98 - 10 - 52 - 52 - 10
+ }
+})
@@ -247,11 +262,9 @@
-
-
@@ -260,7 +273,7 @@
@@ -319,8 +332,6 @@
-
-
@@ -382,7 +393,7 @@
.icon {
position: fixed;
- top: 550px;
+ top: 450px;
left: 50%;
// transform: translateX(-50%);
z-index: 901;
diff --git a/src/views/home/rule/alarm/components/alarmLevelList.vue b/src/views/home/rule/alarm/components/alarmLevelList.vue
index c1b129d..40c1e43 100644
--- a/src/views/home/rule/alarm/components/alarmLevelList.vue
+++ b/src/views/home/rule/alarm/components/alarmLevelList.vue
@@ -18,7 +18,7 @@
{ text: '报警提示方式', value: 'alarmNoteMethodName', align: 'center' },
{ text: '报警音效', value: 'isSoundName', align: 'center' },
{ text: '报警推送', value: 'isSendName', align: 'center' },
- { text: '报警短信', value: 'isTextName', align: 'center' },
+ // { text: '报警短信', value: 'isTextName', align: 'center' },
])
const loadingTable = ref(true)
// 查询条件
diff --git a/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue b/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
index fe60451..757a42c 100644
--- a/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
+++ b/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
@@ -168,11 +168,11 @@
-
+
diff --git a/src/views/home/rule/alarm/components/editDialog.vue b/src/views/home/rule/alarm/components/editDialog.vue
index a8c565f..3bd2958 100644
--- a/src/views/home/rule/alarm/components/editDialog.vue
+++ b/src/views/home/rule/alarm/components/editDialog.vue
@@ -226,6 +226,9 @@
else {
alarmEventList.value = []
}
+ if (newVal) {
+ dataForm.value.alarmThreshold = ''
+ }
}, {
deep: true,
immediate: true,
diff --git a/src/views/home/rule/alarm/index.vue b/src/views/home/rule/alarm/index.vue
index fef4bf0..99084a0 100644
--- a/src/views/home/rule/alarm/index.vue
+++ b/src/views/home/rule/alarm/index.vue
@@ -147,7 +147,7 @@
}))
const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 })
- alarmTypeList.value = uniqueMultiArray(res.data.rows.map((item: any) => ({
+ alarmTypeList.value = uniqueMultiArray(res2.data.rows.map((item: any) => ({
name: item.alarmType,
value: item.id,
id: item.id,
diff --git a/src/api/home/alarm/count.ts b/src/api/home/alarm/count.ts
new file mode 100644
index 0000000..1f4b59a
--- /dev/null
+++ b/src/api/home/alarm/count.ts
@@ -0,0 +1,36 @@
+/**
+ * 报警统计
+ */
+import request from '@/api/index'
+
+// 报警总体情况
+export function getOverallAlarm() {
+ return request({
+ url: '/statics/alarmRecords/overall',
+ method: 'post',
+ })
+}
+// 各类报警统计
+export function getAlarmType(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmType',
+ method: 'post',
+ data,
+ })
+}
+// 各单位报警统计
+export function getAlarmCompany(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmCompany',
+ method: 'post',
+ data,
+ })
+}
+// 异常位置分析
+export function getAlarmPosition(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmPosition',
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/views/home/alarm/count/components/alarmStatistics.vue b/src/views/home/alarm/count/components/alarmStatistics.vue
index b009891..b088de2 100644
--- a/src/views/home/alarm/count/components/alarmStatistics.vue
+++ b/src/views/home/alarm/count/components/alarmStatistics.vue
@@ -5,30 +5,79 @@
-->
@@ -37,26 +86,22 @@
- 今日
-
-
本周
本月
-
+
+
+
-
+
搜索
-
+
+
@@ -110,8 +164,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/alarm/count/components/deptCount.vue b/src/views/home/alarm/count/components/deptCount.vue
index 1579231..1ca5482 100644
--- a/src/views/home/alarm/count/components/deptCount.vue
+++ b/src/views/home/alarm/count/components/deptCount.vue
@@ -122,8 +122,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/alarm/count/components/overallAlarm.vue b/src/views/home/alarm/count/components/overallAlarm.vue
index f14ee15..476add8 100644
--- a/src/views/home/alarm/count/components/overallAlarm.vue
+++ b/src/views/home/alarm/count/components/overallAlarm.vue
@@ -5,39 +5,64 @@
-->
-
+
{{ item.name }}
@@ -63,18 +88,26 @@
border-left: 4px solid #f24d4d;
width: 18%;
padding: 10px;
+ padding-top: 15px;
+ padding-bottom: 15px;
.top {
padding-left: 10px;
+ font-size: 22px;
+ font-weight: 700;
}
.bottom {
text-align: center;
.value {
- font-size: 18px;
+ font-size: 22px;
font-weight: 700;
}
+
+ .unit {
+ font-size: 20px;
+ }
}
}
}
diff --git a/src/views/home/alarm/count/components/trendAnalysis.vue b/src/views/home/alarm/count/components/trendAnalysis.vue
index cea2495..73e18b0 100644
--- a/src/views/home/alarm/count/components/trendAnalysis.vue
+++ b/src/views/home/alarm/count/components/trendAnalysis.vue
@@ -131,8 +131,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/device/device/index.vue b/src/views/home/device/device/index.vue
index 55f12a9..df2cf32 100644
--- a/src/views/home/device/device/index.vue
+++ b/src/views/home/device/device/index.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
const $router = useRouter()
const useStatusList = ref<{ id: string; name: string; value: string }[]>([]) // 设备在用情况
+const deviceTypeList = ref<{ id: string; name: string; value: string }[]>([]) // 设备类型
// 表格数据
const list = ref
([])
const total = ref(0)
@@ -20,18 +21,18 @@
const columns = ref([
{ text: '状态', value: 'onlineState', align: 'center', isCustom: true, width: '55' },
{ text: '设备编号', value: 'devcode', align: 'center', isRequired: true },
- { text: '设备类型', value: 'deviceType', align: 'center', isRequired: true },
- { text: '监测对象', value: 'watchObject', align: 'center' },
+ { text: '设备类型', value: 'deviceTypeName', align: 'center', isRequired: true },
+ { text: '监测对象', value: 'watchObject', align: 'center', width: '85' },
{ text: '设备型号', value: 'deviceModel', align: 'center' },
{ text: '厂商', value: 'manufactureName', align: 'center', isRequired: true },
- { text: '安装位号', value: 'tagNumber', align: 'center', isRequired: true },
+ { text: '安装位号', value: 'tagNumber', align: 'center', isRequired: true, width: '110' },
{ text: '详细位置', value: 'position', align: 'center', isRequired: true },
{ text: '管理单位', value: 'deptName', align: 'center', isRequired: true },
- { text: '在用情况', value: 'validName', align: 'center', isRequired: true },
+ { text: '在用情况', value: 'validName', align: 'center', isRequired: true, width: '85' },
// { text: '布防状态', value: '', align: 'center', isRequired: true },
- { text: '电量', value: 'cell', align: 'center', isRequired: true },
- { text: '最新上报时间', value: 'logtime', align: 'center', isRequired: true },
- { text: '安装日期', value: 'installDate', align: 'center', isRequired: true },
+ { text: '电量', value: 'cell', align: 'center', isRequired: true, width: '70' },
+ { text: '最新上报时间', value: 'logtime', align: 'center', isRequired: true, width: '180' },
+ { text: '安装日期', value: 'installDate', align: 'center', isRequired: true, width: '180' },
])
// 最终展示列
const columnsConfig = ref([])
@@ -75,6 +76,7 @@
list.value = res.data.rows.map((item: any) => ({
...item,
validName: useStatusList.value.length ? useStatusList.value[useStatusList.value.findIndex(citem => item.valid === citem.value)].name : '',
+ deviceTypeName: deviceTypeList.value.length ? deviceTypeList.value[deviceTypeList.value.findIndex(citem => item.deviceType === citem.value)].name : '',
}))
total.value = res.data.total
loadingTable.value = false
@@ -178,7 +180,7 @@
ElMessage.warning('敬请期待')
}
const isUsed = ref<{ id: string; name: string; value: string }[]>([]) // 是否启用
-const deviceTypeList = ref<{ id: string; name: string; value: string }[]>([]) // 设备类型
+
const manufacturerList = ref<{ id: string; name: string; value: string }[]>([]) // 厂商列表
const cellList = ref<{ id: string; name: string; value: string }[]>([]) // 厂商列表
@@ -217,6 +219,12 @@
// 设备类型
getDeviceTypeListPage({ limit: 9999, offset: 1 }).then((res) => {
deviceTypeList.value = res.data.rows.map((item: any) => ({ id: item.id, name: item.typeName, value: item.id }))
+ if (list.value.length) {
+ list.value = list.value.map((item: any) => ({
+ ...item,
+ deviceTypeName: deviceTypeList.value.length ? deviceTypeList.value[deviceTypeList.value.findIndex(citem => item.deviceType === citem.value)].name : '',
+ }))
+ }
})
// 厂商
getManufacturerListPage().then((res) => {
diff --git a/src/views/home/pipeline/components/detailInfoDialog.vue b/src/views/home/pipeline/components/detailInfoDialog.vue
index 31f5635..1662e6e 100644
--- a/src/views/home/pipeline/components/detailInfoDialog.vue
+++ b/src/views/home/pipeline/components/detailInfoDialog.vue
@@ -123,44 +123,39 @@
x
-
-
-
-
- {{ item.text }}
-
-
- {{ detailInfo[item.value] || '' }}
-
-
+
+
+
+ {{ item.text }}
+
+
+ {{ detailInfo[item.value] || '' }}
+
+
+
diff --git a/src/views/home/pipeline/components/map.vue b/src/views/home/pipeline/components/map.vue
index b956aa0..c7c37be 100644
--- a/src/views/home/pipeline/components/map.vue
+++ b/src/views/home/pipeline/components/map.vue
@@ -176,7 +176,10 @@
setTimeout(() => {
// mapRef.value.map.setZoom(14)
// mapRef.value.map.setFitView()
- mapRef.value.map.setCenter(data.event.data.lnglat)
+ // mapRef.value.map.setCenter(data.event.data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.event.data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
// 关联的管线高亮
const line = $props.pipe.filter((item: any) => item.pipeCode === data.event.data.row.pipeCode)
@@ -218,7 +221,10 @@
info: data,
map: mapRef.value.map,
})
- mapRef.value.map.setCenter(data.lnglat)
+ // mapRef.value.map.setCenter(data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
}
// 重置标记点
diff --git a/src/views/home/pipeline/index.vue b/src/views/home/pipeline/index.vue
index 9ef5426..7eb2f1d 100644
--- a/src/views/home/pipeline/index.vue
+++ b/src/views/home/pipeline/index.vue
@@ -12,8 +12,9 @@
import { getDictByCode } from '@/api/system/dict'
// 表格标识 地图或普通
const mapRef = ref()
-const tableFlag = ref('normal')
+const tableFlag = ref('map')
const mapLoading = ref(true)
+const mapLoad = ref(false)
// 表格数据
const list = ref([])
const total = ref(0)
@@ -58,7 +59,6 @@
// 查询数据
const fetchData = () => {
loadingTable.value = true
- mapLoading.value = true
// 判断是否有查询条件(是地图展示20条 否地图展示所有)
const queryList = [] as Boolean[] // 长度大于2 即为是
for (const i in listQuery.value) {
@@ -82,13 +82,13 @@
}
}).catch(() => {
loadingTable.value = false
- if (queryList.length <= 2) {
- mapLoading.value = false
- }
+ mapLoading.value = false
})
- if (queryList.length > 2) { return }
+ if (queryList.length > 2 || mapLoad.value) { return }
+ mapLoading.value = true
// 获取地图全部数据
getPipelineList(listQuery.value).then((res) => {
+ mapLoad.value = true
// 管线
pipeData.value = res.data.map((item: any) => ({
pipeCode: item.PIPE_CODE,
@@ -104,6 +104,7 @@
}, 500)
})
getPipelineDeviceList(listQuery.value).then((res) => {
+ mapLoad.value = true
mapList.value = res.data.map((item: { [key: string]: string }) => ({
deviceTypeName: item.TYPE_NAME,
tagNumber: item.TAG_NUMBER,
@@ -126,6 +127,7 @@
}
// 重置查询条件f
const reset = () => {
+ mapLoad.value = false
listQuery.value = {
limit: 20,
offset: 1,
@@ -239,6 +241,19 @@
},
})
}
+// 表格高度
+const tableHeight = ref(window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10)
+window.addEventListener('resize', () => {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+})
+watch(() => tableFlag.value, (newVal) => {
+ if (newVal === 'map') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+ }
+ else if (newVal === 'normal') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 98 - 10 - 52 - 52 - 10
+ }
+})
@@ -247,11 +262,9 @@
-
-
@@ -260,7 +273,7 @@
@@ -319,8 +332,6 @@
-
-
@@ -382,7 +393,7 @@
.icon {
position: fixed;
- top: 550px;
+ top: 450px;
left: 50%;
// transform: translateX(-50%);
z-index: 901;
diff --git a/src/views/home/rule/alarm/components/alarmLevelList.vue b/src/views/home/rule/alarm/components/alarmLevelList.vue
index c1b129d..40c1e43 100644
--- a/src/views/home/rule/alarm/components/alarmLevelList.vue
+++ b/src/views/home/rule/alarm/components/alarmLevelList.vue
@@ -18,7 +18,7 @@
{ text: '报警提示方式', value: 'alarmNoteMethodName', align: 'center' },
{ text: '报警音效', value: 'isSoundName', align: 'center' },
{ text: '报警推送', value: 'isSendName', align: 'center' },
- { text: '报警短信', value: 'isTextName', align: 'center' },
+ // { text: '报警短信', value: 'isTextName', align: 'center' },
])
const loadingTable = ref(true)
// 查询条件
diff --git a/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue b/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
index fe60451..757a42c 100644
--- a/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
+++ b/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
@@ -168,11 +168,11 @@
-
+
diff --git a/src/views/home/rule/alarm/components/editDialog.vue b/src/views/home/rule/alarm/components/editDialog.vue
index a8c565f..3bd2958 100644
--- a/src/views/home/rule/alarm/components/editDialog.vue
+++ b/src/views/home/rule/alarm/components/editDialog.vue
@@ -226,6 +226,9 @@
else {
alarmEventList.value = []
}
+ if (newVal) {
+ dataForm.value.alarmThreshold = ''
+ }
}, {
deep: true,
immediate: true,
diff --git a/src/views/home/rule/alarm/index.vue b/src/views/home/rule/alarm/index.vue
index fef4bf0..99084a0 100644
--- a/src/views/home/rule/alarm/index.vue
+++ b/src/views/home/rule/alarm/index.vue
@@ -147,7 +147,7 @@
}))
const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 })
- alarmTypeList.value = uniqueMultiArray(res.data.rows.map((item: any) => ({
+ alarmTypeList.value = uniqueMultiArray(res2.data.rows.map((item: any) => ({
name: item.alarmType,
value: item.id,
id: item.id,
diff --git a/src/views/home/station/control/components/control.vue b/src/views/home/station/control/components/control.vue
index 8d1f867..5ec4b26 100644
--- a/src/views/home/station/control/components/control.vue
+++ b/src/views/home/station/control/components/control.vue
@@ -129,7 +129,7 @@
flex-wrap: wrap;
.left {
- width: 62%;
+ width: 55%;
// background-color: aqua;
display: flex;
justify-content: space-around;
@@ -152,7 +152,7 @@
}
.right {
- width: 37%;
+ width: 34%;
// background-color: chartreuse;
display: flex;
justify-content: space-around;
diff --git a/src/api/home/alarm/count.ts b/src/api/home/alarm/count.ts
new file mode 100644
index 0000000..1f4b59a
--- /dev/null
+++ b/src/api/home/alarm/count.ts
@@ -0,0 +1,36 @@
+/**
+ * 报警统计
+ */
+import request from '@/api/index'
+
+// 报警总体情况
+export function getOverallAlarm() {
+ return request({
+ url: '/statics/alarmRecords/overall',
+ method: 'post',
+ })
+}
+// 各类报警统计
+export function getAlarmType(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmType',
+ method: 'post',
+ data,
+ })
+}
+// 各单位报警统计
+export function getAlarmCompany(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmCompany',
+ method: 'post',
+ data,
+ })
+}
+// 异常位置分析
+export function getAlarmPosition(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmPosition',
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/views/home/alarm/count/components/alarmStatistics.vue b/src/views/home/alarm/count/components/alarmStatistics.vue
index b009891..b088de2 100644
--- a/src/views/home/alarm/count/components/alarmStatistics.vue
+++ b/src/views/home/alarm/count/components/alarmStatistics.vue
@@ -5,30 +5,79 @@
-->
@@ -37,26 +86,22 @@
- 今日
-
-
本周
本月
-
+
+
+
-
+
搜索
-
+
+
@@ -110,8 +164,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/alarm/count/components/deptCount.vue b/src/views/home/alarm/count/components/deptCount.vue
index 1579231..1ca5482 100644
--- a/src/views/home/alarm/count/components/deptCount.vue
+++ b/src/views/home/alarm/count/components/deptCount.vue
@@ -122,8 +122,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/alarm/count/components/overallAlarm.vue b/src/views/home/alarm/count/components/overallAlarm.vue
index f14ee15..476add8 100644
--- a/src/views/home/alarm/count/components/overallAlarm.vue
+++ b/src/views/home/alarm/count/components/overallAlarm.vue
@@ -5,39 +5,64 @@
-->
-
+
{{ item.name }}
@@ -63,18 +88,26 @@
border-left: 4px solid #f24d4d;
width: 18%;
padding: 10px;
+ padding-top: 15px;
+ padding-bottom: 15px;
.top {
padding-left: 10px;
+ font-size: 22px;
+ font-weight: 700;
}
.bottom {
text-align: center;
.value {
- font-size: 18px;
+ font-size: 22px;
font-weight: 700;
}
+
+ .unit {
+ font-size: 20px;
+ }
}
}
}
diff --git a/src/views/home/alarm/count/components/trendAnalysis.vue b/src/views/home/alarm/count/components/trendAnalysis.vue
index cea2495..73e18b0 100644
--- a/src/views/home/alarm/count/components/trendAnalysis.vue
+++ b/src/views/home/alarm/count/components/trendAnalysis.vue
@@ -131,8 +131,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/device/device/index.vue b/src/views/home/device/device/index.vue
index 55f12a9..df2cf32 100644
--- a/src/views/home/device/device/index.vue
+++ b/src/views/home/device/device/index.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
const $router = useRouter()
const useStatusList = ref<{ id: string; name: string; value: string }[]>([]) // 设备在用情况
+const deviceTypeList = ref<{ id: string; name: string; value: string }[]>([]) // 设备类型
// 表格数据
const list = ref
([])
const total = ref(0)
@@ -20,18 +21,18 @@
const columns = ref([
{ text: '状态', value: 'onlineState', align: 'center', isCustom: true, width: '55' },
{ text: '设备编号', value: 'devcode', align: 'center', isRequired: true },
- { text: '设备类型', value: 'deviceType', align: 'center', isRequired: true },
- { text: '监测对象', value: 'watchObject', align: 'center' },
+ { text: '设备类型', value: 'deviceTypeName', align: 'center', isRequired: true },
+ { text: '监测对象', value: 'watchObject', align: 'center', width: '85' },
{ text: '设备型号', value: 'deviceModel', align: 'center' },
{ text: '厂商', value: 'manufactureName', align: 'center', isRequired: true },
- { text: '安装位号', value: 'tagNumber', align: 'center', isRequired: true },
+ { text: '安装位号', value: 'tagNumber', align: 'center', isRequired: true, width: '110' },
{ text: '详细位置', value: 'position', align: 'center', isRequired: true },
{ text: '管理单位', value: 'deptName', align: 'center', isRequired: true },
- { text: '在用情况', value: 'validName', align: 'center', isRequired: true },
+ { text: '在用情况', value: 'validName', align: 'center', isRequired: true, width: '85' },
// { text: '布防状态', value: '', align: 'center', isRequired: true },
- { text: '电量', value: 'cell', align: 'center', isRequired: true },
- { text: '最新上报时间', value: 'logtime', align: 'center', isRequired: true },
- { text: '安装日期', value: 'installDate', align: 'center', isRequired: true },
+ { text: '电量', value: 'cell', align: 'center', isRequired: true, width: '70' },
+ { text: '最新上报时间', value: 'logtime', align: 'center', isRequired: true, width: '180' },
+ { text: '安装日期', value: 'installDate', align: 'center', isRequired: true, width: '180' },
])
// 最终展示列
const columnsConfig = ref([])
@@ -75,6 +76,7 @@
list.value = res.data.rows.map((item: any) => ({
...item,
validName: useStatusList.value.length ? useStatusList.value[useStatusList.value.findIndex(citem => item.valid === citem.value)].name : '',
+ deviceTypeName: deviceTypeList.value.length ? deviceTypeList.value[deviceTypeList.value.findIndex(citem => item.deviceType === citem.value)].name : '',
}))
total.value = res.data.total
loadingTable.value = false
@@ -178,7 +180,7 @@
ElMessage.warning('敬请期待')
}
const isUsed = ref<{ id: string; name: string; value: string }[]>([]) // 是否启用
-const deviceTypeList = ref<{ id: string; name: string; value: string }[]>([]) // 设备类型
+
const manufacturerList = ref<{ id: string; name: string; value: string }[]>([]) // 厂商列表
const cellList = ref<{ id: string; name: string; value: string }[]>([]) // 厂商列表
@@ -217,6 +219,12 @@
// 设备类型
getDeviceTypeListPage({ limit: 9999, offset: 1 }).then((res) => {
deviceTypeList.value = res.data.rows.map((item: any) => ({ id: item.id, name: item.typeName, value: item.id }))
+ if (list.value.length) {
+ list.value = list.value.map((item: any) => ({
+ ...item,
+ deviceTypeName: deviceTypeList.value.length ? deviceTypeList.value[deviceTypeList.value.findIndex(citem => item.deviceType === citem.value)].name : '',
+ }))
+ }
})
// 厂商
getManufacturerListPage().then((res) => {
diff --git a/src/views/home/pipeline/components/detailInfoDialog.vue b/src/views/home/pipeline/components/detailInfoDialog.vue
index 31f5635..1662e6e 100644
--- a/src/views/home/pipeline/components/detailInfoDialog.vue
+++ b/src/views/home/pipeline/components/detailInfoDialog.vue
@@ -123,44 +123,39 @@
x
-
-
-
-
- {{ item.text }}
-
-
- {{ detailInfo[item.value] || '' }}
-
-
+
+
+
+ {{ item.text }}
+
+
+ {{ detailInfo[item.value] || '' }}
+
+
+
diff --git a/src/views/home/pipeline/components/map.vue b/src/views/home/pipeline/components/map.vue
index b956aa0..c7c37be 100644
--- a/src/views/home/pipeline/components/map.vue
+++ b/src/views/home/pipeline/components/map.vue
@@ -176,7 +176,10 @@
setTimeout(() => {
// mapRef.value.map.setZoom(14)
// mapRef.value.map.setFitView()
- mapRef.value.map.setCenter(data.event.data.lnglat)
+ // mapRef.value.map.setCenter(data.event.data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.event.data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
// 关联的管线高亮
const line = $props.pipe.filter((item: any) => item.pipeCode === data.event.data.row.pipeCode)
@@ -218,7 +221,10 @@
info: data,
map: mapRef.value.map,
})
- mapRef.value.map.setCenter(data.lnglat)
+ // mapRef.value.map.setCenter(data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
}
// 重置标记点
diff --git a/src/views/home/pipeline/index.vue b/src/views/home/pipeline/index.vue
index 9ef5426..7eb2f1d 100644
--- a/src/views/home/pipeline/index.vue
+++ b/src/views/home/pipeline/index.vue
@@ -12,8 +12,9 @@
import { getDictByCode } from '@/api/system/dict'
// 表格标识 地图或普通
const mapRef = ref()
-const tableFlag = ref('normal')
+const tableFlag = ref('map')
const mapLoading = ref(true)
+const mapLoad = ref(false)
// 表格数据
const list = ref([])
const total = ref(0)
@@ -58,7 +59,6 @@
// 查询数据
const fetchData = () => {
loadingTable.value = true
- mapLoading.value = true
// 判断是否有查询条件(是地图展示20条 否地图展示所有)
const queryList = [] as Boolean[] // 长度大于2 即为是
for (const i in listQuery.value) {
@@ -82,13 +82,13 @@
}
}).catch(() => {
loadingTable.value = false
- if (queryList.length <= 2) {
- mapLoading.value = false
- }
+ mapLoading.value = false
})
- if (queryList.length > 2) { return }
+ if (queryList.length > 2 || mapLoad.value) { return }
+ mapLoading.value = true
// 获取地图全部数据
getPipelineList(listQuery.value).then((res) => {
+ mapLoad.value = true
// 管线
pipeData.value = res.data.map((item: any) => ({
pipeCode: item.PIPE_CODE,
@@ -104,6 +104,7 @@
}, 500)
})
getPipelineDeviceList(listQuery.value).then((res) => {
+ mapLoad.value = true
mapList.value = res.data.map((item: { [key: string]: string }) => ({
deviceTypeName: item.TYPE_NAME,
tagNumber: item.TAG_NUMBER,
@@ -126,6 +127,7 @@
}
// 重置查询条件f
const reset = () => {
+ mapLoad.value = false
listQuery.value = {
limit: 20,
offset: 1,
@@ -239,6 +241,19 @@
},
})
}
+// 表格高度
+const tableHeight = ref(window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10)
+window.addEventListener('resize', () => {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+})
+watch(() => tableFlag.value, (newVal) => {
+ if (newVal === 'map') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+ }
+ else if (newVal === 'normal') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 98 - 10 - 52 - 52 - 10
+ }
+})
@@ -247,11 +262,9 @@
-
-
@@ -260,7 +273,7 @@
@@ -319,8 +332,6 @@
-
-
@@ -382,7 +393,7 @@
.icon {
position: fixed;
- top: 550px;
+ top: 450px;
left: 50%;
// transform: translateX(-50%);
z-index: 901;
diff --git a/src/views/home/rule/alarm/components/alarmLevelList.vue b/src/views/home/rule/alarm/components/alarmLevelList.vue
index c1b129d..40c1e43 100644
--- a/src/views/home/rule/alarm/components/alarmLevelList.vue
+++ b/src/views/home/rule/alarm/components/alarmLevelList.vue
@@ -18,7 +18,7 @@
{ text: '报警提示方式', value: 'alarmNoteMethodName', align: 'center' },
{ text: '报警音效', value: 'isSoundName', align: 'center' },
{ text: '报警推送', value: 'isSendName', align: 'center' },
- { text: '报警短信', value: 'isTextName', align: 'center' },
+ // { text: '报警短信', value: 'isTextName', align: 'center' },
])
const loadingTable = ref(true)
// 查询条件
diff --git a/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue b/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
index fe60451..757a42c 100644
--- a/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
+++ b/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
@@ -168,11 +168,11 @@
-
+
diff --git a/src/views/home/rule/alarm/components/editDialog.vue b/src/views/home/rule/alarm/components/editDialog.vue
index a8c565f..3bd2958 100644
--- a/src/views/home/rule/alarm/components/editDialog.vue
+++ b/src/views/home/rule/alarm/components/editDialog.vue
@@ -226,6 +226,9 @@
else {
alarmEventList.value = []
}
+ if (newVal) {
+ dataForm.value.alarmThreshold = ''
+ }
}, {
deep: true,
immediate: true,
diff --git a/src/views/home/rule/alarm/index.vue b/src/views/home/rule/alarm/index.vue
index fef4bf0..99084a0 100644
--- a/src/views/home/rule/alarm/index.vue
+++ b/src/views/home/rule/alarm/index.vue
@@ -147,7 +147,7 @@
}))
const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 })
- alarmTypeList.value = uniqueMultiArray(res.data.rows.map((item: any) => ({
+ alarmTypeList.value = uniqueMultiArray(res2.data.rows.map((item: any) => ({
name: item.alarmType,
value: item.id,
id: item.id,
diff --git a/src/views/home/station/control/components/control.vue b/src/views/home/station/control/components/control.vue
index 8d1f867..5ec4b26 100644
--- a/src/views/home/station/control/components/control.vue
+++ b/src/views/home/station/control/components/control.vue
@@ -129,7 +129,7 @@
flex-wrap: wrap;
.left {
- width: 62%;
+ width: 55%;
// background-color: aqua;
display: flex;
justify-content: space-around;
@@ -152,7 +152,7 @@
}
.right {
- width: 37%;
+ width: 34%;
// background-color: chartreuse;
display: flex;
justify-content: space-around;
diff --git a/src/views/home/station/station/components/detailInfoDialog.vue b/src/views/home/station/station/components/detailInfoDialog.vue
index f44be1a..53bf430 100644
--- a/src/views/home/station/station/components/detailInfoDialog.vue
+++ b/src/views/home/station/station/components/detailInfoDialog.vue
@@ -127,44 +127,39 @@
x
-
-
-
-
- {{ item.text }}
-
-
- {{ detailInfo[item.value] || '' }}
-
-
+
+
+
+ {{ item.text }}
+
+
+ {{ detailInfo[item.value] || '' }}
+
+
+
diff --git a/src/api/home/alarm/count.ts b/src/api/home/alarm/count.ts
new file mode 100644
index 0000000..1f4b59a
--- /dev/null
+++ b/src/api/home/alarm/count.ts
@@ -0,0 +1,36 @@
+/**
+ * 报警统计
+ */
+import request from '@/api/index'
+
+// 报警总体情况
+export function getOverallAlarm() {
+ return request({
+ url: '/statics/alarmRecords/overall',
+ method: 'post',
+ })
+}
+// 各类报警统计
+export function getAlarmType(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmType',
+ method: 'post',
+ data,
+ })
+}
+// 各单位报警统计
+export function getAlarmCompany(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmCompany',
+ method: 'post',
+ data,
+ })
+}
+// 异常位置分析
+export function getAlarmPosition(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmPosition',
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/views/home/alarm/count/components/alarmStatistics.vue b/src/views/home/alarm/count/components/alarmStatistics.vue
index b009891..b088de2 100644
--- a/src/views/home/alarm/count/components/alarmStatistics.vue
+++ b/src/views/home/alarm/count/components/alarmStatistics.vue
@@ -5,30 +5,79 @@
-->
@@ -37,26 +86,22 @@
- 今日
-
-
本周
本月
-
+
+
+
-
+
搜索
-
+
+
@@ -110,8 +164,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/alarm/count/components/deptCount.vue b/src/views/home/alarm/count/components/deptCount.vue
index 1579231..1ca5482 100644
--- a/src/views/home/alarm/count/components/deptCount.vue
+++ b/src/views/home/alarm/count/components/deptCount.vue
@@ -122,8 +122,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/alarm/count/components/overallAlarm.vue b/src/views/home/alarm/count/components/overallAlarm.vue
index f14ee15..476add8 100644
--- a/src/views/home/alarm/count/components/overallAlarm.vue
+++ b/src/views/home/alarm/count/components/overallAlarm.vue
@@ -5,39 +5,64 @@
-->
-
+
{{ item.name }}
@@ -63,18 +88,26 @@
border-left: 4px solid #f24d4d;
width: 18%;
padding: 10px;
+ padding-top: 15px;
+ padding-bottom: 15px;
.top {
padding-left: 10px;
+ font-size: 22px;
+ font-weight: 700;
}
.bottom {
text-align: center;
.value {
- font-size: 18px;
+ font-size: 22px;
font-weight: 700;
}
+
+ .unit {
+ font-size: 20px;
+ }
}
}
}
diff --git a/src/views/home/alarm/count/components/trendAnalysis.vue b/src/views/home/alarm/count/components/trendAnalysis.vue
index cea2495..73e18b0 100644
--- a/src/views/home/alarm/count/components/trendAnalysis.vue
+++ b/src/views/home/alarm/count/components/trendAnalysis.vue
@@ -131,8 +131,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/device/device/index.vue b/src/views/home/device/device/index.vue
index 55f12a9..df2cf32 100644
--- a/src/views/home/device/device/index.vue
+++ b/src/views/home/device/device/index.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
const $router = useRouter()
const useStatusList = ref<{ id: string; name: string; value: string }[]>([]) // 设备在用情况
+const deviceTypeList = ref<{ id: string; name: string; value: string }[]>([]) // 设备类型
// 表格数据
const list = ref
([])
const total = ref(0)
@@ -20,18 +21,18 @@
const columns = ref([
{ text: '状态', value: 'onlineState', align: 'center', isCustom: true, width: '55' },
{ text: '设备编号', value: 'devcode', align: 'center', isRequired: true },
- { text: '设备类型', value: 'deviceType', align: 'center', isRequired: true },
- { text: '监测对象', value: 'watchObject', align: 'center' },
+ { text: '设备类型', value: 'deviceTypeName', align: 'center', isRequired: true },
+ { text: '监测对象', value: 'watchObject', align: 'center', width: '85' },
{ text: '设备型号', value: 'deviceModel', align: 'center' },
{ text: '厂商', value: 'manufactureName', align: 'center', isRequired: true },
- { text: '安装位号', value: 'tagNumber', align: 'center', isRequired: true },
+ { text: '安装位号', value: 'tagNumber', align: 'center', isRequired: true, width: '110' },
{ text: '详细位置', value: 'position', align: 'center', isRequired: true },
{ text: '管理单位', value: 'deptName', align: 'center', isRequired: true },
- { text: '在用情况', value: 'validName', align: 'center', isRequired: true },
+ { text: '在用情况', value: 'validName', align: 'center', isRequired: true, width: '85' },
// { text: '布防状态', value: '', align: 'center', isRequired: true },
- { text: '电量', value: 'cell', align: 'center', isRequired: true },
- { text: '最新上报时间', value: 'logtime', align: 'center', isRequired: true },
- { text: '安装日期', value: 'installDate', align: 'center', isRequired: true },
+ { text: '电量', value: 'cell', align: 'center', isRequired: true, width: '70' },
+ { text: '最新上报时间', value: 'logtime', align: 'center', isRequired: true, width: '180' },
+ { text: '安装日期', value: 'installDate', align: 'center', isRequired: true, width: '180' },
])
// 最终展示列
const columnsConfig = ref([])
@@ -75,6 +76,7 @@
list.value = res.data.rows.map((item: any) => ({
...item,
validName: useStatusList.value.length ? useStatusList.value[useStatusList.value.findIndex(citem => item.valid === citem.value)].name : '',
+ deviceTypeName: deviceTypeList.value.length ? deviceTypeList.value[deviceTypeList.value.findIndex(citem => item.deviceType === citem.value)].name : '',
}))
total.value = res.data.total
loadingTable.value = false
@@ -178,7 +180,7 @@
ElMessage.warning('敬请期待')
}
const isUsed = ref<{ id: string; name: string; value: string }[]>([]) // 是否启用
-const deviceTypeList = ref<{ id: string; name: string; value: string }[]>([]) // 设备类型
+
const manufacturerList = ref<{ id: string; name: string; value: string }[]>([]) // 厂商列表
const cellList = ref<{ id: string; name: string; value: string }[]>([]) // 厂商列表
@@ -217,6 +219,12 @@
// 设备类型
getDeviceTypeListPage({ limit: 9999, offset: 1 }).then((res) => {
deviceTypeList.value = res.data.rows.map((item: any) => ({ id: item.id, name: item.typeName, value: item.id }))
+ if (list.value.length) {
+ list.value = list.value.map((item: any) => ({
+ ...item,
+ deviceTypeName: deviceTypeList.value.length ? deviceTypeList.value[deviceTypeList.value.findIndex(citem => item.deviceType === citem.value)].name : '',
+ }))
+ }
})
// 厂商
getManufacturerListPage().then((res) => {
diff --git a/src/views/home/pipeline/components/detailInfoDialog.vue b/src/views/home/pipeline/components/detailInfoDialog.vue
index 31f5635..1662e6e 100644
--- a/src/views/home/pipeline/components/detailInfoDialog.vue
+++ b/src/views/home/pipeline/components/detailInfoDialog.vue
@@ -123,44 +123,39 @@
x
-
-
-
-
- {{ item.text }}
-
-
- {{ detailInfo[item.value] || '' }}
-
-
+
+
+
+ {{ item.text }}
+
+
+ {{ detailInfo[item.value] || '' }}
+
+
+
diff --git a/src/views/home/pipeline/components/map.vue b/src/views/home/pipeline/components/map.vue
index b956aa0..c7c37be 100644
--- a/src/views/home/pipeline/components/map.vue
+++ b/src/views/home/pipeline/components/map.vue
@@ -176,7 +176,10 @@
setTimeout(() => {
// mapRef.value.map.setZoom(14)
// mapRef.value.map.setFitView()
- mapRef.value.map.setCenter(data.event.data.lnglat)
+ // mapRef.value.map.setCenter(data.event.data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.event.data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
// 关联的管线高亮
const line = $props.pipe.filter((item: any) => item.pipeCode === data.event.data.row.pipeCode)
@@ -218,7 +221,10 @@
info: data,
map: mapRef.value.map,
})
- mapRef.value.map.setCenter(data.lnglat)
+ // mapRef.value.map.setCenter(data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
}
// 重置标记点
diff --git a/src/views/home/pipeline/index.vue b/src/views/home/pipeline/index.vue
index 9ef5426..7eb2f1d 100644
--- a/src/views/home/pipeline/index.vue
+++ b/src/views/home/pipeline/index.vue
@@ -12,8 +12,9 @@
import { getDictByCode } from '@/api/system/dict'
// 表格标识 地图或普通
const mapRef = ref()
-const tableFlag = ref('normal')
+const tableFlag = ref('map')
const mapLoading = ref(true)
+const mapLoad = ref(false)
// 表格数据
const list = ref([])
const total = ref(0)
@@ -58,7 +59,6 @@
// 查询数据
const fetchData = () => {
loadingTable.value = true
- mapLoading.value = true
// 判断是否有查询条件(是地图展示20条 否地图展示所有)
const queryList = [] as Boolean[] // 长度大于2 即为是
for (const i in listQuery.value) {
@@ -82,13 +82,13 @@
}
}).catch(() => {
loadingTable.value = false
- if (queryList.length <= 2) {
- mapLoading.value = false
- }
+ mapLoading.value = false
})
- if (queryList.length > 2) { return }
+ if (queryList.length > 2 || mapLoad.value) { return }
+ mapLoading.value = true
// 获取地图全部数据
getPipelineList(listQuery.value).then((res) => {
+ mapLoad.value = true
// 管线
pipeData.value = res.data.map((item: any) => ({
pipeCode: item.PIPE_CODE,
@@ -104,6 +104,7 @@
}, 500)
})
getPipelineDeviceList(listQuery.value).then((res) => {
+ mapLoad.value = true
mapList.value = res.data.map((item: { [key: string]: string }) => ({
deviceTypeName: item.TYPE_NAME,
tagNumber: item.TAG_NUMBER,
@@ -126,6 +127,7 @@
}
// 重置查询条件f
const reset = () => {
+ mapLoad.value = false
listQuery.value = {
limit: 20,
offset: 1,
@@ -239,6 +241,19 @@
},
})
}
+// 表格高度
+const tableHeight = ref(window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10)
+window.addEventListener('resize', () => {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+})
+watch(() => tableFlag.value, (newVal) => {
+ if (newVal === 'map') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+ }
+ else if (newVal === 'normal') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 98 - 10 - 52 - 52 - 10
+ }
+})
@@ -247,11 +262,9 @@
-
-
@@ -260,7 +273,7 @@
@@ -319,8 +332,6 @@
-
-
@@ -382,7 +393,7 @@
.icon {
position: fixed;
- top: 550px;
+ top: 450px;
left: 50%;
// transform: translateX(-50%);
z-index: 901;
diff --git a/src/views/home/rule/alarm/components/alarmLevelList.vue b/src/views/home/rule/alarm/components/alarmLevelList.vue
index c1b129d..40c1e43 100644
--- a/src/views/home/rule/alarm/components/alarmLevelList.vue
+++ b/src/views/home/rule/alarm/components/alarmLevelList.vue
@@ -18,7 +18,7 @@
{ text: '报警提示方式', value: 'alarmNoteMethodName', align: 'center' },
{ text: '报警音效', value: 'isSoundName', align: 'center' },
{ text: '报警推送', value: 'isSendName', align: 'center' },
- { text: '报警短信', value: 'isTextName', align: 'center' },
+ // { text: '报警短信', value: 'isTextName', align: 'center' },
])
const loadingTable = ref(true)
// 查询条件
diff --git a/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue b/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
index fe60451..757a42c 100644
--- a/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
+++ b/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
@@ -168,11 +168,11 @@
-
+
diff --git a/src/views/home/rule/alarm/components/editDialog.vue b/src/views/home/rule/alarm/components/editDialog.vue
index a8c565f..3bd2958 100644
--- a/src/views/home/rule/alarm/components/editDialog.vue
+++ b/src/views/home/rule/alarm/components/editDialog.vue
@@ -226,6 +226,9 @@
else {
alarmEventList.value = []
}
+ if (newVal) {
+ dataForm.value.alarmThreshold = ''
+ }
}, {
deep: true,
immediate: true,
diff --git a/src/views/home/rule/alarm/index.vue b/src/views/home/rule/alarm/index.vue
index fef4bf0..99084a0 100644
--- a/src/views/home/rule/alarm/index.vue
+++ b/src/views/home/rule/alarm/index.vue
@@ -147,7 +147,7 @@
}))
const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 })
- alarmTypeList.value = uniqueMultiArray(res.data.rows.map((item: any) => ({
+ alarmTypeList.value = uniqueMultiArray(res2.data.rows.map((item: any) => ({
name: item.alarmType,
value: item.id,
id: item.id,
diff --git a/src/views/home/station/control/components/control.vue b/src/views/home/station/control/components/control.vue
index 8d1f867..5ec4b26 100644
--- a/src/views/home/station/control/components/control.vue
+++ b/src/views/home/station/control/components/control.vue
@@ -129,7 +129,7 @@
flex-wrap: wrap;
.left {
- width: 62%;
+ width: 55%;
// background-color: aqua;
display: flex;
justify-content: space-around;
@@ -152,7 +152,7 @@
}
.right {
- width: 37%;
+ width: 34%;
// background-color: chartreuse;
display: flex;
justify-content: space-around;
diff --git a/src/views/home/station/station/components/detailInfoDialog.vue b/src/views/home/station/station/components/detailInfoDialog.vue
index f44be1a..53bf430 100644
--- a/src/views/home/station/station/components/detailInfoDialog.vue
+++ b/src/views/home/station/station/components/detailInfoDialog.vue
@@ -127,44 +127,39 @@
x
-
-
-
-
- {{ item.text }}
-
-
- {{ detailInfo[item.value] || '' }}
-
-
+
+
+
+ {{ item.text }}
+
+
+ {{ detailInfo[item.value] || '' }}
+
+
+
diff --git a/src/views/home/station/station/components/map.vue b/src/views/home/station/station/components/map.vue
index 2351a1d..1c5a64c 100644
--- a/src/views/home/station/station/components/map.vue
+++ b/src/views/home/station/station/components/map.vue
@@ -139,8 +139,11 @@
})
setTimeout(() => {
// mapRef.value.map.setZoom(14)
- mapRef.value.map.setFitView()
- mapRef.value.map.setCenter(data.event.data.lnglat)
+ // mapRef.value.map.setFitView()
+ // mapRef.value.map.setCenter(data.event.data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.event.data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
}
@@ -164,7 +167,11 @@
info: data,
map: mapRef.value.map,
})
- mapRef.value.map.setCenter(data.lnglat)
+ // mapRef.value.map.setCenter(data.lnglat)
+ // mapRef.value.map.setFitView()
+ const center = JSON.parse(JSON.stringify(data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
}
diff --git a/src/api/home/alarm/count.ts b/src/api/home/alarm/count.ts
new file mode 100644
index 0000000..1f4b59a
--- /dev/null
+++ b/src/api/home/alarm/count.ts
@@ -0,0 +1,36 @@
+/**
+ * 报警统计
+ */
+import request from '@/api/index'
+
+// 报警总体情况
+export function getOverallAlarm() {
+ return request({
+ url: '/statics/alarmRecords/overall',
+ method: 'post',
+ })
+}
+// 各类报警统计
+export function getAlarmType(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmType',
+ method: 'post',
+ data,
+ })
+}
+// 各单位报警统计
+export function getAlarmCompany(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmCompany',
+ method: 'post',
+ data,
+ })
+}
+// 异常位置分析
+export function getAlarmPosition(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmPosition',
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/views/home/alarm/count/components/alarmStatistics.vue b/src/views/home/alarm/count/components/alarmStatistics.vue
index b009891..b088de2 100644
--- a/src/views/home/alarm/count/components/alarmStatistics.vue
+++ b/src/views/home/alarm/count/components/alarmStatistics.vue
@@ -5,30 +5,79 @@
-->
@@ -37,26 +86,22 @@
- 今日
-
-
本周
本月
-
+
+
+
-
+
搜索
-
+
+
@@ -110,8 +164,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/alarm/count/components/deptCount.vue b/src/views/home/alarm/count/components/deptCount.vue
index 1579231..1ca5482 100644
--- a/src/views/home/alarm/count/components/deptCount.vue
+++ b/src/views/home/alarm/count/components/deptCount.vue
@@ -122,8 +122,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/alarm/count/components/overallAlarm.vue b/src/views/home/alarm/count/components/overallAlarm.vue
index f14ee15..476add8 100644
--- a/src/views/home/alarm/count/components/overallAlarm.vue
+++ b/src/views/home/alarm/count/components/overallAlarm.vue
@@ -5,39 +5,64 @@
-->
-
+
{{ item.name }}
@@ -63,18 +88,26 @@
border-left: 4px solid #f24d4d;
width: 18%;
padding: 10px;
+ padding-top: 15px;
+ padding-bottom: 15px;
.top {
padding-left: 10px;
+ font-size: 22px;
+ font-weight: 700;
}
.bottom {
text-align: center;
.value {
- font-size: 18px;
+ font-size: 22px;
font-weight: 700;
}
+
+ .unit {
+ font-size: 20px;
+ }
}
}
}
diff --git a/src/views/home/alarm/count/components/trendAnalysis.vue b/src/views/home/alarm/count/components/trendAnalysis.vue
index cea2495..73e18b0 100644
--- a/src/views/home/alarm/count/components/trendAnalysis.vue
+++ b/src/views/home/alarm/count/components/trendAnalysis.vue
@@ -131,8 +131,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/device/device/index.vue b/src/views/home/device/device/index.vue
index 55f12a9..df2cf32 100644
--- a/src/views/home/device/device/index.vue
+++ b/src/views/home/device/device/index.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
const $router = useRouter()
const useStatusList = ref<{ id: string; name: string; value: string }[]>([]) // 设备在用情况
+const deviceTypeList = ref<{ id: string; name: string; value: string }[]>([]) // 设备类型
// 表格数据
const list = ref
([])
const total = ref(0)
@@ -20,18 +21,18 @@
const columns = ref([
{ text: '状态', value: 'onlineState', align: 'center', isCustom: true, width: '55' },
{ text: '设备编号', value: 'devcode', align: 'center', isRequired: true },
- { text: '设备类型', value: 'deviceType', align: 'center', isRequired: true },
- { text: '监测对象', value: 'watchObject', align: 'center' },
+ { text: '设备类型', value: 'deviceTypeName', align: 'center', isRequired: true },
+ { text: '监测对象', value: 'watchObject', align: 'center', width: '85' },
{ text: '设备型号', value: 'deviceModel', align: 'center' },
{ text: '厂商', value: 'manufactureName', align: 'center', isRequired: true },
- { text: '安装位号', value: 'tagNumber', align: 'center', isRequired: true },
+ { text: '安装位号', value: 'tagNumber', align: 'center', isRequired: true, width: '110' },
{ text: '详细位置', value: 'position', align: 'center', isRequired: true },
{ text: '管理单位', value: 'deptName', align: 'center', isRequired: true },
- { text: '在用情况', value: 'validName', align: 'center', isRequired: true },
+ { text: '在用情况', value: 'validName', align: 'center', isRequired: true, width: '85' },
// { text: '布防状态', value: '', align: 'center', isRequired: true },
- { text: '电量', value: 'cell', align: 'center', isRequired: true },
- { text: '最新上报时间', value: 'logtime', align: 'center', isRequired: true },
- { text: '安装日期', value: 'installDate', align: 'center', isRequired: true },
+ { text: '电量', value: 'cell', align: 'center', isRequired: true, width: '70' },
+ { text: '最新上报时间', value: 'logtime', align: 'center', isRequired: true, width: '180' },
+ { text: '安装日期', value: 'installDate', align: 'center', isRequired: true, width: '180' },
])
// 最终展示列
const columnsConfig = ref([])
@@ -75,6 +76,7 @@
list.value = res.data.rows.map((item: any) => ({
...item,
validName: useStatusList.value.length ? useStatusList.value[useStatusList.value.findIndex(citem => item.valid === citem.value)].name : '',
+ deviceTypeName: deviceTypeList.value.length ? deviceTypeList.value[deviceTypeList.value.findIndex(citem => item.deviceType === citem.value)].name : '',
}))
total.value = res.data.total
loadingTable.value = false
@@ -178,7 +180,7 @@
ElMessage.warning('敬请期待')
}
const isUsed = ref<{ id: string; name: string; value: string }[]>([]) // 是否启用
-const deviceTypeList = ref<{ id: string; name: string; value: string }[]>([]) // 设备类型
+
const manufacturerList = ref<{ id: string; name: string; value: string }[]>([]) // 厂商列表
const cellList = ref<{ id: string; name: string; value: string }[]>([]) // 厂商列表
@@ -217,6 +219,12 @@
// 设备类型
getDeviceTypeListPage({ limit: 9999, offset: 1 }).then((res) => {
deviceTypeList.value = res.data.rows.map((item: any) => ({ id: item.id, name: item.typeName, value: item.id }))
+ if (list.value.length) {
+ list.value = list.value.map((item: any) => ({
+ ...item,
+ deviceTypeName: deviceTypeList.value.length ? deviceTypeList.value[deviceTypeList.value.findIndex(citem => item.deviceType === citem.value)].name : '',
+ }))
+ }
})
// 厂商
getManufacturerListPage().then((res) => {
diff --git a/src/views/home/pipeline/components/detailInfoDialog.vue b/src/views/home/pipeline/components/detailInfoDialog.vue
index 31f5635..1662e6e 100644
--- a/src/views/home/pipeline/components/detailInfoDialog.vue
+++ b/src/views/home/pipeline/components/detailInfoDialog.vue
@@ -123,44 +123,39 @@
x
-
-
-
-
- {{ item.text }}
-
-
- {{ detailInfo[item.value] || '' }}
-
-
+
+
+
+ {{ item.text }}
+
+
+ {{ detailInfo[item.value] || '' }}
+
+
+
diff --git a/src/views/home/pipeline/components/map.vue b/src/views/home/pipeline/components/map.vue
index b956aa0..c7c37be 100644
--- a/src/views/home/pipeline/components/map.vue
+++ b/src/views/home/pipeline/components/map.vue
@@ -176,7 +176,10 @@
setTimeout(() => {
// mapRef.value.map.setZoom(14)
// mapRef.value.map.setFitView()
- mapRef.value.map.setCenter(data.event.data.lnglat)
+ // mapRef.value.map.setCenter(data.event.data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.event.data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
// 关联的管线高亮
const line = $props.pipe.filter((item: any) => item.pipeCode === data.event.data.row.pipeCode)
@@ -218,7 +221,10 @@
info: data,
map: mapRef.value.map,
})
- mapRef.value.map.setCenter(data.lnglat)
+ // mapRef.value.map.setCenter(data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
}
// 重置标记点
diff --git a/src/views/home/pipeline/index.vue b/src/views/home/pipeline/index.vue
index 9ef5426..7eb2f1d 100644
--- a/src/views/home/pipeline/index.vue
+++ b/src/views/home/pipeline/index.vue
@@ -12,8 +12,9 @@
import { getDictByCode } from '@/api/system/dict'
// 表格标识 地图或普通
const mapRef = ref()
-const tableFlag = ref('normal')
+const tableFlag = ref('map')
const mapLoading = ref(true)
+const mapLoad = ref(false)
// 表格数据
const list = ref([])
const total = ref(0)
@@ -58,7 +59,6 @@
// 查询数据
const fetchData = () => {
loadingTable.value = true
- mapLoading.value = true
// 判断是否有查询条件(是地图展示20条 否地图展示所有)
const queryList = [] as Boolean[] // 长度大于2 即为是
for (const i in listQuery.value) {
@@ -82,13 +82,13 @@
}
}).catch(() => {
loadingTable.value = false
- if (queryList.length <= 2) {
- mapLoading.value = false
- }
+ mapLoading.value = false
})
- if (queryList.length > 2) { return }
+ if (queryList.length > 2 || mapLoad.value) { return }
+ mapLoading.value = true
// 获取地图全部数据
getPipelineList(listQuery.value).then((res) => {
+ mapLoad.value = true
// 管线
pipeData.value = res.data.map((item: any) => ({
pipeCode: item.PIPE_CODE,
@@ -104,6 +104,7 @@
}, 500)
})
getPipelineDeviceList(listQuery.value).then((res) => {
+ mapLoad.value = true
mapList.value = res.data.map((item: { [key: string]: string }) => ({
deviceTypeName: item.TYPE_NAME,
tagNumber: item.TAG_NUMBER,
@@ -126,6 +127,7 @@
}
// 重置查询条件f
const reset = () => {
+ mapLoad.value = false
listQuery.value = {
limit: 20,
offset: 1,
@@ -239,6 +241,19 @@
},
})
}
+// 表格高度
+const tableHeight = ref(window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10)
+window.addEventListener('resize', () => {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+})
+watch(() => tableFlag.value, (newVal) => {
+ if (newVal === 'map') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+ }
+ else if (newVal === 'normal') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 98 - 10 - 52 - 52 - 10
+ }
+})
@@ -247,11 +262,9 @@
-
-
@@ -260,7 +273,7 @@
@@ -319,8 +332,6 @@
-
-
@@ -382,7 +393,7 @@
.icon {
position: fixed;
- top: 550px;
+ top: 450px;
left: 50%;
// transform: translateX(-50%);
z-index: 901;
diff --git a/src/views/home/rule/alarm/components/alarmLevelList.vue b/src/views/home/rule/alarm/components/alarmLevelList.vue
index c1b129d..40c1e43 100644
--- a/src/views/home/rule/alarm/components/alarmLevelList.vue
+++ b/src/views/home/rule/alarm/components/alarmLevelList.vue
@@ -18,7 +18,7 @@
{ text: '报警提示方式', value: 'alarmNoteMethodName', align: 'center' },
{ text: '报警音效', value: 'isSoundName', align: 'center' },
{ text: '报警推送', value: 'isSendName', align: 'center' },
- { text: '报警短信', value: 'isTextName', align: 'center' },
+ // { text: '报警短信', value: 'isTextName', align: 'center' },
])
const loadingTable = ref(true)
// 查询条件
diff --git a/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue b/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
index fe60451..757a42c 100644
--- a/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
+++ b/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
@@ -168,11 +168,11 @@
-
+
diff --git a/src/views/home/rule/alarm/components/editDialog.vue b/src/views/home/rule/alarm/components/editDialog.vue
index a8c565f..3bd2958 100644
--- a/src/views/home/rule/alarm/components/editDialog.vue
+++ b/src/views/home/rule/alarm/components/editDialog.vue
@@ -226,6 +226,9 @@
else {
alarmEventList.value = []
}
+ if (newVal) {
+ dataForm.value.alarmThreshold = ''
+ }
}, {
deep: true,
immediate: true,
diff --git a/src/views/home/rule/alarm/index.vue b/src/views/home/rule/alarm/index.vue
index fef4bf0..99084a0 100644
--- a/src/views/home/rule/alarm/index.vue
+++ b/src/views/home/rule/alarm/index.vue
@@ -147,7 +147,7 @@
}))
const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 })
- alarmTypeList.value = uniqueMultiArray(res.data.rows.map((item: any) => ({
+ alarmTypeList.value = uniqueMultiArray(res2.data.rows.map((item: any) => ({
name: item.alarmType,
value: item.id,
id: item.id,
diff --git a/src/views/home/station/control/components/control.vue b/src/views/home/station/control/components/control.vue
index 8d1f867..5ec4b26 100644
--- a/src/views/home/station/control/components/control.vue
+++ b/src/views/home/station/control/components/control.vue
@@ -129,7 +129,7 @@
flex-wrap: wrap;
.left {
- width: 62%;
+ width: 55%;
// background-color: aqua;
display: flex;
justify-content: space-around;
@@ -152,7 +152,7 @@
}
.right {
- width: 37%;
+ width: 34%;
// background-color: chartreuse;
display: flex;
justify-content: space-around;
diff --git a/src/views/home/station/station/components/detailInfoDialog.vue b/src/views/home/station/station/components/detailInfoDialog.vue
index f44be1a..53bf430 100644
--- a/src/views/home/station/station/components/detailInfoDialog.vue
+++ b/src/views/home/station/station/components/detailInfoDialog.vue
@@ -127,44 +127,39 @@
x
-
-
-
-
- {{ item.text }}
-
-
- {{ detailInfo[item.value] || '' }}
-
-
+
+
+
+ {{ item.text }}
+
+
+ {{ detailInfo[item.value] || '' }}
+
+
+
diff --git a/src/views/home/station/station/components/map.vue b/src/views/home/station/station/components/map.vue
index 2351a1d..1c5a64c 100644
--- a/src/views/home/station/station/components/map.vue
+++ b/src/views/home/station/station/components/map.vue
@@ -139,8 +139,11 @@
})
setTimeout(() => {
// mapRef.value.map.setZoom(14)
- mapRef.value.map.setFitView()
- mapRef.value.map.setCenter(data.event.data.lnglat)
+ // mapRef.value.map.setFitView()
+ // mapRef.value.map.setCenter(data.event.data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.event.data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
}
@@ -164,7 +167,11 @@
info: data,
map: mapRef.value.map,
})
- mapRef.value.map.setCenter(data.lnglat)
+ // mapRef.value.map.setCenter(data.lnglat)
+ // mapRef.value.map.setFitView()
+ const center = JSON.parse(JSON.stringify(data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
}
diff --git a/src/views/home/station/station/index.vue b/src/views/home/station/station/index.vue
index 636cbad..0b2599e 100644
--- a/src/views/home/station/station/index.vue
+++ b/src/views/home/station/station/index.vue
@@ -12,8 +12,9 @@
import { getDictByCode } from '@/api/system/dict'
// 表格标识 地图或普通
const mapRef = ref()
-const tableFlag = ref('normal')
+const tableFlag = ref('map')
const mapLoading = ref(true)
+const mapLoad = ref(false)
// 表格数据
const list = ref([])
const total = ref(0)
@@ -56,7 +57,6 @@
// 查询数据
const fetchData = () => {
loadingTable.value = true
- mapLoading.value = true
// 判断是否有查询条件(是地图展示20条 否地图展示所有)
const queryList = [] as Boolean[] // 长度大于2 即为是
for (const i in listQuery.value) {
@@ -79,13 +79,13 @@
}
}).catch(() => {
loadingTable.value = false
- if (queryList.length <= 2) {
- mapLoading.value = false
- }
+ mapLoading.value = false
})
- if (queryList.length > 2) { return }
+ if (queryList.length > 2 || mapLoad.value) { return }
// 获取地图全部数据
+ mapLoading.value = true
getStationList(listQuery.value).then((res) => {
+ mapLoad.value = true
mapList.value = res.data
setTimeout(() => {
if (tableFlag.value === 'map') {
@@ -99,6 +99,7 @@
}
// 重置查询条件f
const reset = () => {
+ mapLoad.value = false
listQuery.value = {
limit: 20,
offset: 1,
@@ -179,6 +180,19 @@
},
})
}
+// 表格高度
+const tableHeight = ref(window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10)
+window.addEventListener('resize', () => {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+})
+watch(() => tableFlag.value, (newVal) => {
+ if (newVal === 'map') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+ }
+ else if (newVal === 'normal') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 98 - 10 - 52 - 52 - 10
+ }
+})
@@ -186,9 +200,7 @@
-
-
-
+
@@ -197,7 +209,7 @@
@@ -229,8 +241,6 @@
-
-
@@ -292,7 +302,7 @@
.icon {
position: fixed;
- top: 550px;
+ top: 450px;
left: 50%;
// transform: translateX(-50%);
z-index: 901;
diff --git a/src/api/home/alarm/count.ts b/src/api/home/alarm/count.ts
new file mode 100644
index 0000000..1f4b59a
--- /dev/null
+++ b/src/api/home/alarm/count.ts
@@ -0,0 +1,36 @@
+/**
+ * 报警统计
+ */
+import request from '@/api/index'
+
+// 报警总体情况
+export function getOverallAlarm() {
+ return request({
+ url: '/statics/alarmRecords/overall',
+ method: 'post',
+ })
+}
+// 各类报警统计
+export function getAlarmType(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmType',
+ method: 'post',
+ data,
+ })
+}
+// 各单位报警统计
+export function getAlarmCompany(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmCompany',
+ method: 'post',
+ data,
+ })
+}
+// 异常位置分析
+export function getAlarmPosition(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmPosition',
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/views/home/alarm/count/components/alarmStatistics.vue b/src/views/home/alarm/count/components/alarmStatistics.vue
index b009891..b088de2 100644
--- a/src/views/home/alarm/count/components/alarmStatistics.vue
+++ b/src/views/home/alarm/count/components/alarmStatistics.vue
@@ -5,30 +5,79 @@
-->
@@ -37,26 +86,22 @@
- 今日
-
-
本周
本月
-
+
+
+
-
+
搜索
-
+
+
@@ -110,8 +164,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/alarm/count/components/deptCount.vue b/src/views/home/alarm/count/components/deptCount.vue
index 1579231..1ca5482 100644
--- a/src/views/home/alarm/count/components/deptCount.vue
+++ b/src/views/home/alarm/count/components/deptCount.vue
@@ -122,8 +122,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/alarm/count/components/overallAlarm.vue b/src/views/home/alarm/count/components/overallAlarm.vue
index f14ee15..476add8 100644
--- a/src/views/home/alarm/count/components/overallAlarm.vue
+++ b/src/views/home/alarm/count/components/overallAlarm.vue
@@ -5,39 +5,64 @@
-->
-
+
{{ item.name }}
@@ -63,18 +88,26 @@
border-left: 4px solid #f24d4d;
width: 18%;
padding: 10px;
+ padding-top: 15px;
+ padding-bottom: 15px;
.top {
padding-left: 10px;
+ font-size: 22px;
+ font-weight: 700;
}
.bottom {
text-align: center;
.value {
- font-size: 18px;
+ font-size: 22px;
font-weight: 700;
}
+
+ .unit {
+ font-size: 20px;
+ }
}
}
}
diff --git a/src/views/home/alarm/count/components/trendAnalysis.vue b/src/views/home/alarm/count/components/trendAnalysis.vue
index cea2495..73e18b0 100644
--- a/src/views/home/alarm/count/components/trendAnalysis.vue
+++ b/src/views/home/alarm/count/components/trendAnalysis.vue
@@ -131,8 +131,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/device/device/index.vue b/src/views/home/device/device/index.vue
index 55f12a9..df2cf32 100644
--- a/src/views/home/device/device/index.vue
+++ b/src/views/home/device/device/index.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
const $router = useRouter()
const useStatusList = ref<{ id: string; name: string; value: string }[]>([]) // 设备在用情况
+const deviceTypeList = ref<{ id: string; name: string; value: string }[]>([]) // 设备类型
// 表格数据
const list = ref
([])
const total = ref(0)
@@ -20,18 +21,18 @@
const columns = ref([
{ text: '状态', value: 'onlineState', align: 'center', isCustom: true, width: '55' },
{ text: '设备编号', value: 'devcode', align: 'center', isRequired: true },
- { text: '设备类型', value: 'deviceType', align: 'center', isRequired: true },
- { text: '监测对象', value: 'watchObject', align: 'center' },
+ { text: '设备类型', value: 'deviceTypeName', align: 'center', isRequired: true },
+ { text: '监测对象', value: 'watchObject', align: 'center', width: '85' },
{ text: '设备型号', value: 'deviceModel', align: 'center' },
{ text: '厂商', value: 'manufactureName', align: 'center', isRequired: true },
- { text: '安装位号', value: 'tagNumber', align: 'center', isRequired: true },
+ { text: '安装位号', value: 'tagNumber', align: 'center', isRequired: true, width: '110' },
{ text: '详细位置', value: 'position', align: 'center', isRequired: true },
{ text: '管理单位', value: 'deptName', align: 'center', isRequired: true },
- { text: '在用情况', value: 'validName', align: 'center', isRequired: true },
+ { text: '在用情况', value: 'validName', align: 'center', isRequired: true, width: '85' },
// { text: '布防状态', value: '', align: 'center', isRequired: true },
- { text: '电量', value: 'cell', align: 'center', isRequired: true },
- { text: '最新上报时间', value: 'logtime', align: 'center', isRequired: true },
- { text: '安装日期', value: 'installDate', align: 'center', isRequired: true },
+ { text: '电量', value: 'cell', align: 'center', isRequired: true, width: '70' },
+ { text: '最新上报时间', value: 'logtime', align: 'center', isRequired: true, width: '180' },
+ { text: '安装日期', value: 'installDate', align: 'center', isRequired: true, width: '180' },
])
// 最终展示列
const columnsConfig = ref([])
@@ -75,6 +76,7 @@
list.value = res.data.rows.map((item: any) => ({
...item,
validName: useStatusList.value.length ? useStatusList.value[useStatusList.value.findIndex(citem => item.valid === citem.value)].name : '',
+ deviceTypeName: deviceTypeList.value.length ? deviceTypeList.value[deviceTypeList.value.findIndex(citem => item.deviceType === citem.value)].name : '',
}))
total.value = res.data.total
loadingTable.value = false
@@ -178,7 +180,7 @@
ElMessage.warning('敬请期待')
}
const isUsed = ref<{ id: string; name: string; value: string }[]>([]) // 是否启用
-const deviceTypeList = ref<{ id: string; name: string; value: string }[]>([]) // 设备类型
+
const manufacturerList = ref<{ id: string; name: string; value: string }[]>([]) // 厂商列表
const cellList = ref<{ id: string; name: string; value: string }[]>([]) // 厂商列表
@@ -217,6 +219,12 @@
// 设备类型
getDeviceTypeListPage({ limit: 9999, offset: 1 }).then((res) => {
deviceTypeList.value = res.data.rows.map((item: any) => ({ id: item.id, name: item.typeName, value: item.id }))
+ if (list.value.length) {
+ list.value = list.value.map((item: any) => ({
+ ...item,
+ deviceTypeName: deviceTypeList.value.length ? deviceTypeList.value[deviceTypeList.value.findIndex(citem => item.deviceType === citem.value)].name : '',
+ }))
+ }
})
// 厂商
getManufacturerListPage().then((res) => {
diff --git a/src/views/home/pipeline/components/detailInfoDialog.vue b/src/views/home/pipeline/components/detailInfoDialog.vue
index 31f5635..1662e6e 100644
--- a/src/views/home/pipeline/components/detailInfoDialog.vue
+++ b/src/views/home/pipeline/components/detailInfoDialog.vue
@@ -123,44 +123,39 @@
x
-
-
-
-
- {{ item.text }}
-
-
- {{ detailInfo[item.value] || '' }}
-
-
+
+
+
+ {{ item.text }}
+
+
+ {{ detailInfo[item.value] || '' }}
+
+
+
diff --git a/src/views/home/pipeline/components/map.vue b/src/views/home/pipeline/components/map.vue
index b956aa0..c7c37be 100644
--- a/src/views/home/pipeline/components/map.vue
+++ b/src/views/home/pipeline/components/map.vue
@@ -176,7 +176,10 @@
setTimeout(() => {
// mapRef.value.map.setZoom(14)
// mapRef.value.map.setFitView()
- mapRef.value.map.setCenter(data.event.data.lnglat)
+ // mapRef.value.map.setCenter(data.event.data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.event.data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
// 关联的管线高亮
const line = $props.pipe.filter((item: any) => item.pipeCode === data.event.data.row.pipeCode)
@@ -218,7 +221,10 @@
info: data,
map: mapRef.value.map,
})
- mapRef.value.map.setCenter(data.lnglat)
+ // mapRef.value.map.setCenter(data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
}
// 重置标记点
diff --git a/src/views/home/pipeline/index.vue b/src/views/home/pipeline/index.vue
index 9ef5426..7eb2f1d 100644
--- a/src/views/home/pipeline/index.vue
+++ b/src/views/home/pipeline/index.vue
@@ -12,8 +12,9 @@
import { getDictByCode } from '@/api/system/dict'
// 表格标识 地图或普通
const mapRef = ref()
-const tableFlag = ref('normal')
+const tableFlag = ref('map')
const mapLoading = ref(true)
+const mapLoad = ref(false)
// 表格数据
const list = ref([])
const total = ref(0)
@@ -58,7 +59,6 @@
// 查询数据
const fetchData = () => {
loadingTable.value = true
- mapLoading.value = true
// 判断是否有查询条件(是地图展示20条 否地图展示所有)
const queryList = [] as Boolean[] // 长度大于2 即为是
for (const i in listQuery.value) {
@@ -82,13 +82,13 @@
}
}).catch(() => {
loadingTable.value = false
- if (queryList.length <= 2) {
- mapLoading.value = false
- }
+ mapLoading.value = false
})
- if (queryList.length > 2) { return }
+ if (queryList.length > 2 || mapLoad.value) { return }
+ mapLoading.value = true
// 获取地图全部数据
getPipelineList(listQuery.value).then((res) => {
+ mapLoad.value = true
// 管线
pipeData.value = res.data.map((item: any) => ({
pipeCode: item.PIPE_CODE,
@@ -104,6 +104,7 @@
}, 500)
})
getPipelineDeviceList(listQuery.value).then((res) => {
+ mapLoad.value = true
mapList.value = res.data.map((item: { [key: string]: string }) => ({
deviceTypeName: item.TYPE_NAME,
tagNumber: item.TAG_NUMBER,
@@ -126,6 +127,7 @@
}
// 重置查询条件f
const reset = () => {
+ mapLoad.value = false
listQuery.value = {
limit: 20,
offset: 1,
@@ -239,6 +241,19 @@
},
})
}
+// 表格高度
+const tableHeight = ref(window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10)
+window.addEventListener('resize', () => {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+})
+watch(() => tableFlag.value, (newVal) => {
+ if (newVal === 'map') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+ }
+ else if (newVal === 'normal') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 98 - 10 - 52 - 52 - 10
+ }
+})
@@ -247,11 +262,9 @@
-
-
@@ -260,7 +273,7 @@
@@ -319,8 +332,6 @@
-
-
@@ -382,7 +393,7 @@
.icon {
position: fixed;
- top: 550px;
+ top: 450px;
left: 50%;
// transform: translateX(-50%);
z-index: 901;
diff --git a/src/views/home/rule/alarm/components/alarmLevelList.vue b/src/views/home/rule/alarm/components/alarmLevelList.vue
index c1b129d..40c1e43 100644
--- a/src/views/home/rule/alarm/components/alarmLevelList.vue
+++ b/src/views/home/rule/alarm/components/alarmLevelList.vue
@@ -18,7 +18,7 @@
{ text: '报警提示方式', value: 'alarmNoteMethodName', align: 'center' },
{ text: '报警音效', value: 'isSoundName', align: 'center' },
{ text: '报警推送', value: 'isSendName', align: 'center' },
- { text: '报警短信', value: 'isTextName', align: 'center' },
+ // { text: '报警短信', value: 'isTextName', align: 'center' },
])
const loadingTable = ref(true)
// 查询条件
diff --git a/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue b/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
index fe60451..757a42c 100644
--- a/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
+++ b/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
@@ -168,11 +168,11 @@
-
+
diff --git a/src/views/home/rule/alarm/components/editDialog.vue b/src/views/home/rule/alarm/components/editDialog.vue
index a8c565f..3bd2958 100644
--- a/src/views/home/rule/alarm/components/editDialog.vue
+++ b/src/views/home/rule/alarm/components/editDialog.vue
@@ -226,6 +226,9 @@
else {
alarmEventList.value = []
}
+ if (newVal) {
+ dataForm.value.alarmThreshold = ''
+ }
}, {
deep: true,
immediate: true,
diff --git a/src/views/home/rule/alarm/index.vue b/src/views/home/rule/alarm/index.vue
index fef4bf0..99084a0 100644
--- a/src/views/home/rule/alarm/index.vue
+++ b/src/views/home/rule/alarm/index.vue
@@ -147,7 +147,7 @@
}))
const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 })
- alarmTypeList.value = uniqueMultiArray(res.data.rows.map((item: any) => ({
+ alarmTypeList.value = uniqueMultiArray(res2.data.rows.map((item: any) => ({
name: item.alarmType,
value: item.id,
id: item.id,
diff --git a/src/views/home/station/control/components/control.vue b/src/views/home/station/control/components/control.vue
index 8d1f867..5ec4b26 100644
--- a/src/views/home/station/control/components/control.vue
+++ b/src/views/home/station/control/components/control.vue
@@ -129,7 +129,7 @@
flex-wrap: wrap;
.left {
- width: 62%;
+ width: 55%;
// background-color: aqua;
display: flex;
justify-content: space-around;
@@ -152,7 +152,7 @@
}
.right {
- width: 37%;
+ width: 34%;
// background-color: chartreuse;
display: flex;
justify-content: space-around;
diff --git a/src/views/home/station/station/components/detailInfoDialog.vue b/src/views/home/station/station/components/detailInfoDialog.vue
index f44be1a..53bf430 100644
--- a/src/views/home/station/station/components/detailInfoDialog.vue
+++ b/src/views/home/station/station/components/detailInfoDialog.vue
@@ -127,44 +127,39 @@
x
-
-
-
-
- {{ item.text }}
-
-
- {{ detailInfo[item.value] || '' }}
-
-
+
+
+
+ {{ item.text }}
+
+
+ {{ detailInfo[item.value] || '' }}
+
+
+
diff --git a/src/views/home/station/station/components/map.vue b/src/views/home/station/station/components/map.vue
index 2351a1d..1c5a64c 100644
--- a/src/views/home/station/station/components/map.vue
+++ b/src/views/home/station/station/components/map.vue
@@ -139,8 +139,11 @@
})
setTimeout(() => {
// mapRef.value.map.setZoom(14)
- mapRef.value.map.setFitView()
- mapRef.value.map.setCenter(data.event.data.lnglat)
+ // mapRef.value.map.setFitView()
+ // mapRef.value.map.setCenter(data.event.data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.event.data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
}
@@ -164,7 +167,11 @@
info: data,
map: mapRef.value.map,
})
- mapRef.value.map.setCenter(data.lnglat)
+ // mapRef.value.map.setCenter(data.lnglat)
+ // mapRef.value.map.setFitView()
+ const center = JSON.parse(JSON.stringify(data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
}
diff --git a/src/views/home/station/station/index.vue b/src/views/home/station/station/index.vue
index 636cbad..0b2599e 100644
--- a/src/views/home/station/station/index.vue
+++ b/src/views/home/station/station/index.vue
@@ -12,8 +12,9 @@
import { getDictByCode } from '@/api/system/dict'
// 表格标识 地图或普通
const mapRef = ref()
-const tableFlag = ref('normal')
+const tableFlag = ref('map')
const mapLoading = ref(true)
+const mapLoad = ref(false)
// 表格数据
const list = ref([])
const total = ref(0)
@@ -56,7 +57,6 @@
// 查询数据
const fetchData = () => {
loadingTable.value = true
- mapLoading.value = true
// 判断是否有查询条件(是地图展示20条 否地图展示所有)
const queryList = [] as Boolean[] // 长度大于2 即为是
for (const i in listQuery.value) {
@@ -79,13 +79,13 @@
}
}).catch(() => {
loadingTable.value = false
- if (queryList.length <= 2) {
- mapLoading.value = false
- }
+ mapLoading.value = false
})
- if (queryList.length > 2) { return }
+ if (queryList.length > 2 || mapLoad.value) { return }
// 获取地图全部数据
+ mapLoading.value = true
getStationList(listQuery.value).then((res) => {
+ mapLoad.value = true
mapList.value = res.data
setTimeout(() => {
if (tableFlag.value === 'map') {
@@ -99,6 +99,7 @@
}
// 重置查询条件f
const reset = () => {
+ mapLoad.value = false
listQuery.value = {
limit: 20,
offset: 1,
@@ -179,6 +180,19 @@
},
})
}
+// 表格高度
+const tableHeight = ref(window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10)
+window.addEventListener('resize', () => {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+})
+watch(() => tableFlag.value, (newVal) => {
+ if (newVal === 'map') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+ }
+ else if (newVal === 'normal') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 98 - 10 - 52 - 52 - 10
+ }
+})
@@ -186,9 +200,7 @@
-
-
-
+
@@ -197,7 +209,7 @@
@@ -229,8 +241,6 @@
-
-
@@ -292,7 +302,7 @@
.icon {
position: fixed;
- top: 550px;
+ top: 450px;
left: 50%;
// transform: translateX(-50%);
z-index: 901;
diff --git a/src/views/home/well/components/detailInfoDialog.vue b/src/views/home/well/components/detailInfoDialog.vue
index 5d33d05..d0d4242 100644
--- a/src/views/home/well/components/detailInfoDialog.vue
+++ b/src/views/home/well/components/detailInfoDialog.vue
@@ -128,71 +128,39 @@
x
-
-
-
-
- {{ item.text }}
-
-
-
+
+
+
+ {{ item.text }}
+
+
{{ detailInfo[item.value] || '' }}
-
-
-
+
+
+
diff --git a/src/api/home/alarm/count.ts b/src/api/home/alarm/count.ts
new file mode 100644
index 0000000..1f4b59a
--- /dev/null
+++ b/src/api/home/alarm/count.ts
@@ -0,0 +1,36 @@
+/**
+ * 报警统计
+ */
+import request from '@/api/index'
+
+// 报警总体情况
+export function getOverallAlarm() {
+ return request({
+ url: '/statics/alarmRecords/overall',
+ method: 'post',
+ })
+}
+// 各类报警统计
+export function getAlarmType(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmType',
+ method: 'post',
+ data,
+ })
+}
+// 各单位报警统计
+export function getAlarmCompany(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmCompany',
+ method: 'post',
+ data,
+ })
+}
+// 异常位置分析
+export function getAlarmPosition(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmPosition',
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/views/home/alarm/count/components/alarmStatistics.vue b/src/views/home/alarm/count/components/alarmStatistics.vue
index b009891..b088de2 100644
--- a/src/views/home/alarm/count/components/alarmStatistics.vue
+++ b/src/views/home/alarm/count/components/alarmStatistics.vue
@@ -5,30 +5,79 @@
-->
@@ -37,26 +86,22 @@
- 今日
-
-
本周
本月
-
+
+
+
-
+
搜索
-
+
+
@@ -110,8 +164,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/alarm/count/components/deptCount.vue b/src/views/home/alarm/count/components/deptCount.vue
index 1579231..1ca5482 100644
--- a/src/views/home/alarm/count/components/deptCount.vue
+++ b/src/views/home/alarm/count/components/deptCount.vue
@@ -122,8 +122,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/alarm/count/components/overallAlarm.vue b/src/views/home/alarm/count/components/overallAlarm.vue
index f14ee15..476add8 100644
--- a/src/views/home/alarm/count/components/overallAlarm.vue
+++ b/src/views/home/alarm/count/components/overallAlarm.vue
@@ -5,39 +5,64 @@
-->
-
+
{{ item.name }}
@@ -63,18 +88,26 @@
border-left: 4px solid #f24d4d;
width: 18%;
padding: 10px;
+ padding-top: 15px;
+ padding-bottom: 15px;
.top {
padding-left: 10px;
+ font-size: 22px;
+ font-weight: 700;
}
.bottom {
text-align: center;
.value {
- font-size: 18px;
+ font-size: 22px;
font-weight: 700;
}
+
+ .unit {
+ font-size: 20px;
+ }
}
}
}
diff --git a/src/views/home/alarm/count/components/trendAnalysis.vue b/src/views/home/alarm/count/components/trendAnalysis.vue
index cea2495..73e18b0 100644
--- a/src/views/home/alarm/count/components/trendAnalysis.vue
+++ b/src/views/home/alarm/count/components/trendAnalysis.vue
@@ -131,8 +131,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/device/device/index.vue b/src/views/home/device/device/index.vue
index 55f12a9..df2cf32 100644
--- a/src/views/home/device/device/index.vue
+++ b/src/views/home/device/device/index.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
const $router = useRouter()
const useStatusList = ref<{ id: string; name: string; value: string }[]>([]) // 设备在用情况
+const deviceTypeList = ref<{ id: string; name: string; value: string }[]>([]) // 设备类型
// 表格数据
const list = ref
([])
const total = ref(0)
@@ -20,18 +21,18 @@
const columns = ref([
{ text: '状态', value: 'onlineState', align: 'center', isCustom: true, width: '55' },
{ text: '设备编号', value: 'devcode', align: 'center', isRequired: true },
- { text: '设备类型', value: 'deviceType', align: 'center', isRequired: true },
- { text: '监测对象', value: 'watchObject', align: 'center' },
+ { text: '设备类型', value: 'deviceTypeName', align: 'center', isRequired: true },
+ { text: '监测对象', value: 'watchObject', align: 'center', width: '85' },
{ text: '设备型号', value: 'deviceModel', align: 'center' },
{ text: '厂商', value: 'manufactureName', align: 'center', isRequired: true },
- { text: '安装位号', value: 'tagNumber', align: 'center', isRequired: true },
+ { text: '安装位号', value: 'tagNumber', align: 'center', isRequired: true, width: '110' },
{ text: '详细位置', value: 'position', align: 'center', isRequired: true },
{ text: '管理单位', value: 'deptName', align: 'center', isRequired: true },
- { text: '在用情况', value: 'validName', align: 'center', isRequired: true },
+ { text: '在用情况', value: 'validName', align: 'center', isRequired: true, width: '85' },
// { text: '布防状态', value: '', align: 'center', isRequired: true },
- { text: '电量', value: 'cell', align: 'center', isRequired: true },
- { text: '最新上报时间', value: 'logtime', align: 'center', isRequired: true },
- { text: '安装日期', value: 'installDate', align: 'center', isRequired: true },
+ { text: '电量', value: 'cell', align: 'center', isRequired: true, width: '70' },
+ { text: '最新上报时间', value: 'logtime', align: 'center', isRequired: true, width: '180' },
+ { text: '安装日期', value: 'installDate', align: 'center', isRequired: true, width: '180' },
])
// 最终展示列
const columnsConfig = ref([])
@@ -75,6 +76,7 @@
list.value = res.data.rows.map((item: any) => ({
...item,
validName: useStatusList.value.length ? useStatusList.value[useStatusList.value.findIndex(citem => item.valid === citem.value)].name : '',
+ deviceTypeName: deviceTypeList.value.length ? deviceTypeList.value[deviceTypeList.value.findIndex(citem => item.deviceType === citem.value)].name : '',
}))
total.value = res.data.total
loadingTable.value = false
@@ -178,7 +180,7 @@
ElMessage.warning('敬请期待')
}
const isUsed = ref<{ id: string; name: string; value: string }[]>([]) // 是否启用
-const deviceTypeList = ref<{ id: string; name: string; value: string }[]>([]) // 设备类型
+
const manufacturerList = ref<{ id: string; name: string; value: string }[]>([]) // 厂商列表
const cellList = ref<{ id: string; name: string; value: string }[]>([]) // 厂商列表
@@ -217,6 +219,12 @@
// 设备类型
getDeviceTypeListPage({ limit: 9999, offset: 1 }).then((res) => {
deviceTypeList.value = res.data.rows.map((item: any) => ({ id: item.id, name: item.typeName, value: item.id }))
+ if (list.value.length) {
+ list.value = list.value.map((item: any) => ({
+ ...item,
+ deviceTypeName: deviceTypeList.value.length ? deviceTypeList.value[deviceTypeList.value.findIndex(citem => item.deviceType === citem.value)].name : '',
+ }))
+ }
})
// 厂商
getManufacturerListPage().then((res) => {
diff --git a/src/views/home/pipeline/components/detailInfoDialog.vue b/src/views/home/pipeline/components/detailInfoDialog.vue
index 31f5635..1662e6e 100644
--- a/src/views/home/pipeline/components/detailInfoDialog.vue
+++ b/src/views/home/pipeline/components/detailInfoDialog.vue
@@ -123,44 +123,39 @@
x
-
-
-
-
- {{ item.text }}
-
-
- {{ detailInfo[item.value] || '' }}
-
-
+
+
+
+ {{ item.text }}
+
+
+ {{ detailInfo[item.value] || '' }}
+
+
+
diff --git a/src/views/home/pipeline/components/map.vue b/src/views/home/pipeline/components/map.vue
index b956aa0..c7c37be 100644
--- a/src/views/home/pipeline/components/map.vue
+++ b/src/views/home/pipeline/components/map.vue
@@ -176,7 +176,10 @@
setTimeout(() => {
// mapRef.value.map.setZoom(14)
// mapRef.value.map.setFitView()
- mapRef.value.map.setCenter(data.event.data.lnglat)
+ // mapRef.value.map.setCenter(data.event.data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.event.data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
// 关联的管线高亮
const line = $props.pipe.filter((item: any) => item.pipeCode === data.event.data.row.pipeCode)
@@ -218,7 +221,10 @@
info: data,
map: mapRef.value.map,
})
- mapRef.value.map.setCenter(data.lnglat)
+ // mapRef.value.map.setCenter(data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
}
// 重置标记点
diff --git a/src/views/home/pipeline/index.vue b/src/views/home/pipeline/index.vue
index 9ef5426..7eb2f1d 100644
--- a/src/views/home/pipeline/index.vue
+++ b/src/views/home/pipeline/index.vue
@@ -12,8 +12,9 @@
import { getDictByCode } from '@/api/system/dict'
// 表格标识 地图或普通
const mapRef = ref()
-const tableFlag = ref('normal')
+const tableFlag = ref('map')
const mapLoading = ref(true)
+const mapLoad = ref(false)
// 表格数据
const list = ref([])
const total = ref(0)
@@ -58,7 +59,6 @@
// 查询数据
const fetchData = () => {
loadingTable.value = true
- mapLoading.value = true
// 判断是否有查询条件(是地图展示20条 否地图展示所有)
const queryList = [] as Boolean[] // 长度大于2 即为是
for (const i in listQuery.value) {
@@ -82,13 +82,13 @@
}
}).catch(() => {
loadingTable.value = false
- if (queryList.length <= 2) {
- mapLoading.value = false
- }
+ mapLoading.value = false
})
- if (queryList.length > 2) { return }
+ if (queryList.length > 2 || mapLoad.value) { return }
+ mapLoading.value = true
// 获取地图全部数据
getPipelineList(listQuery.value).then((res) => {
+ mapLoad.value = true
// 管线
pipeData.value = res.data.map((item: any) => ({
pipeCode: item.PIPE_CODE,
@@ -104,6 +104,7 @@
}, 500)
})
getPipelineDeviceList(listQuery.value).then((res) => {
+ mapLoad.value = true
mapList.value = res.data.map((item: { [key: string]: string }) => ({
deviceTypeName: item.TYPE_NAME,
tagNumber: item.TAG_NUMBER,
@@ -126,6 +127,7 @@
}
// 重置查询条件f
const reset = () => {
+ mapLoad.value = false
listQuery.value = {
limit: 20,
offset: 1,
@@ -239,6 +241,19 @@
},
})
}
+// 表格高度
+const tableHeight = ref(window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10)
+window.addEventListener('resize', () => {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+})
+watch(() => tableFlag.value, (newVal) => {
+ if (newVal === 'map') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+ }
+ else if (newVal === 'normal') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 98 - 10 - 52 - 52 - 10
+ }
+})
@@ -247,11 +262,9 @@
-
-
@@ -260,7 +273,7 @@
@@ -319,8 +332,6 @@
-
-
@@ -382,7 +393,7 @@
.icon {
position: fixed;
- top: 550px;
+ top: 450px;
left: 50%;
// transform: translateX(-50%);
z-index: 901;
diff --git a/src/views/home/rule/alarm/components/alarmLevelList.vue b/src/views/home/rule/alarm/components/alarmLevelList.vue
index c1b129d..40c1e43 100644
--- a/src/views/home/rule/alarm/components/alarmLevelList.vue
+++ b/src/views/home/rule/alarm/components/alarmLevelList.vue
@@ -18,7 +18,7 @@
{ text: '报警提示方式', value: 'alarmNoteMethodName', align: 'center' },
{ text: '报警音效', value: 'isSoundName', align: 'center' },
{ text: '报警推送', value: 'isSendName', align: 'center' },
- { text: '报警短信', value: 'isTextName', align: 'center' },
+ // { text: '报警短信', value: 'isTextName', align: 'center' },
])
const loadingTable = ref(true)
// 查询条件
diff --git a/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue b/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
index fe60451..757a42c 100644
--- a/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
+++ b/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
@@ -168,11 +168,11 @@
-
+
diff --git a/src/views/home/rule/alarm/components/editDialog.vue b/src/views/home/rule/alarm/components/editDialog.vue
index a8c565f..3bd2958 100644
--- a/src/views/home/rule/alarm/components/editDialog.vue
+++ b/src/views/home/rule/alarm/components/editDialog.vue
@@ -226,6 +226,9 @@
else {
alarmEventList.value = []
}
+ if (newVal) {
+ dataForm.value.alarmThreshold = ''
+ }
}, {
deep: true,
immediate: true,
diff --git a/src/views/home/rule/alarm/index.vue b/src/views/home/rule/alarm/index.vue
index fef4bf0..99084a0 100644
--- a/src/views/home/rule/alarm/index.vue
+++ b/src/views/home/rule/alarm/index.vue
@@ -147,7 +147,7 @@
}))
const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 })
- alarmTypeList.value = uniqueMultiArray(res.data.rows.map((item: any) => ({
+ alarmTypeList.value = uniqueMultiArray(res2.data.rows.map((item: any) => ({
name: item.alarmType,
value: item.id,
id: item.id,
diff --git a/src/views/home/station/control/components/control.vue b/src/views/home/station/control/components/control.vue
index 8d1f867..5ec4b26 100644
--- a/src/views/home/station/control/components/control.vue
+++ b/src/views/home/station/control/components/control.vue
@@ -129,7 +129,7 @@
flex-wrap: wrap;
.left {
- width: 62%;
+ width: 55%;
// background-color: aqua;
display: flex;
justify-content: space-around;
@@ -152,7 +152,7 @@
}
.right {
- width: 37%;
+ width: 34%;
// background-color: chartreuse;
display: flex;
justify-content: space-around;
diff --git a/src/views/home/station/station/components/detailInfoDialog.vue b/src/views/home/station/station/components/detailInfoDialog.vue
index f44be1a..53bf430 100644
--- a/src/views/home/station/station/components/detailInfoDialog.vue
+++ b/src/views/home/station/station/components/detailInfoDialog.vue
@@ -127,44 +127,39 @@
x
-
-
-
-
- {{ item.text }}
-
-
- {{ detailInfo[item.value] || '' }}
-
-
+
+
+
+ {{ item.text }}
+
+
+ {{ detailInfo[item.value] || '' }}
+
+
+
diff --git a/src/views/home/station/station/components/map.vue b/src/views/home/station/station/components/map.vue
index 2351a1d..1c5a64c 100644
--- a/src/views/home/station/station/components/map.vue
+++ b/src/views/home/station/station/components/map.vue
@@ -139,8 +139,11 @@
})
setTimeout(() => {
// mapRef.value.map.setZoom(14)
- mapRef.value.map.setFitView()
- mapRef.value.map.setCenter(data.event.data.lnglat)
+ // mapRef.value.map.setFitView()
+ // mapRef.value.map.setCenter(data.event.data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.event.data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
}
@@ -164,7 +167,11 @@
info: data,
map: mapRef.value.map,
})
- mapRef.value.map.setCenter(data.lnglat)
+ // mapRef.value.map.setCenter(data.lnglat)
+ // mapRef.value.map.setFitView()
+ const center = JSON.parse(JSON.stringify(data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
}
diff --git a/src/views/home/station/station/index.vue b/src/views/home/station/station/index.vue
index 636cbad..0b2599e 100644
--- a/src/views/home/station/station/index.vue
+++ b/src/views/home/station/station/index.vue
@@ -12,8 +12,9 @@
import { getDictByCode } from '@/api/system/dict'
// 表格标识 地图或普通
const mapRef = ref()
-const tableFlag = ref('normal')
+const tableFlag = ref('map')
const mapLoading = ref(true)
+const mapLoad = ref(false)
// 表格数据
const list = ref([])
const total = ref(0)
@@ -56,7 +57,6 @@
// 查询数据
const fetchData = () => {
loadingTable.value = true
- mapLoading.value = true
// 判断是否有查询条件(是地图展示20条 否地图展示所有)
const queryList = [] as Boolean[] // 长度大于2 即为是
for (const i in listQuery.value) {
@@ -79,13 +79,13 @@
}
}).catch(() => {
loadingTable.value = false
- if (queryList.length <= 2) {
- mapLoading.value = false
- }
+ mapLoading.value = false
})
- if (queryList.length > 2) { return }
+ if (queryList.length > 2 || mapLoad.value) { return }
// 获取地图全部数据
+ mapLoading.value = true
getStationList(listQuery.value).then((res) => {
+ mapLoad.value = true
mapList.value = res.data
setTimeout(() => {
if (tableFlag.value === 'map') {
@@ -99,6 +99,7 @@
}
// 重置查询条件f
const reset = () => {
+ mapLoad.value = false
listQuery.value = {
limit: 20,
offset: 1,
@@ -179,6 +180,19 @@
},
})
}
+// 表格高度
+const tableHeight = ref(window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10)
+window.addEventListener('resize', () => {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+})
+watch(() => tableFlag.value, (newVal) => {
+ if (newVal === 'map') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+ }
+ else if (newVal === 'normal') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 98 - 10 - 52 - 52 - 10
+ }
+})
@@ -186,9 +200,7 @@
-
-
-
+
@@ -197,7 +209,7 @@
@@ -229,8 +241,6 @@
-
-
@@ -292,7 +302,7 @@
.icon {
position: fixed;
- top: 550px;
+ top: 450px;
left: 50%;
// transform: translateX(-50%);
z-index: 901;
diff --git a/src/views/home/well/components/detailInfoDialog.vue b/src/views/home/well/components/detailInfoDialog.vue
index 5d33d05..d0d4242 100644
--- a/src/views/home/well/components/detailInfoDialog.vue
+++ b/src/views/home/well/components/detailInfoDialog.vue
@@ -128,71 +128,39 @@
x
-
-
-
-
- {{ item.text }}
-
-
-
+
+
+
+ {{ item.text }}
+
+
{{ detailInfo[item.value] || '' }}
-
-
-
+
+
+
diff --git a/src/views/home/well/components/map.vue b/src/views/home/well/components/map.vue
index fa2634a..5d9ec48 100644
--- a/src/views/home/well/components/map.vue
+++ b/src/views/home/well/components/map.vue
@@ -139,8 +139,11 @@
})
setTimeout(() => {
// mapRef.value.map.setZoom(14)
- mapRef.value.map.setFitView()
- mapRef.value.map.setCenter(data.event.data.lnglat)
+ // mapRef.value.map.setFitView()
+ // mapRef.value.map.setCenter(data.event.data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.event.data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
}
@@ -164,7 +167,9 @@
info: data,
map: mapRef.value.map,
})
- mapRef.value.map.setCenter(data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
}
diff --git a/src/api/home/alarm/count.ts b/src/api/home/alarm/count.ts
new file mode 100644
index 0000000..1f4b59a
--- /dev/null
+++ b/src/api/home/alarm/count.ts
@@ -0,0 +1,36 @@
+/**
+ * 报警统计
+ */
+import request from '@/api/index'
+
+// 报警总体情况
+export function getOverallAlarm() {
+ return request({
+ url: '/statics/alarmRecords/overall',
+ method: 'post',
+ })
+}
+// 各类报警统计
+export function getAlarmType(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmType',
+ method: 'post',
+ data,
+ })
+}
+// 各单位报警统计
+export function getAlarmCompany(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmCompany',
+ method: 'post',
+ data,
+ })
+}
+// 异常位置分析
+export function getAlarmPosition(data: any) {
+ return request({
+ url: '/statics/alarmRecords/alarmPosition',
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/views/home/alarm/count/components/alarmStatistics.vue b/src/views/home/alarm/count/components/alarmStatistics.vue
index b009891..b088de2 100644
--- a/src/views/home/alarm/count/components/alarmStatistics.vue
+++ b/src/views/home/alarm/count/components/alarmStatistics.vue
@@ -5,30 +5,79 @@
-->
@@ -37,26 +86,22 @@
- 今日
-
-
本周
本月
-
+
+
+
-
+
搜索
-
+
+
@@ -110,8 +164,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/alarm/count/components/deptCount.vue b/src/views/home/alarm/count/components/deptCount.vue
index 1579231..1ca5482 100644
--- a/src/views/home/alarm/count/components/deptCount.vue
+++ b/src/views/home/alarm/count/components/deptCount.vue
@@ -122,8 +122,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/alarm/count/components/overallAlarm.vue b/src/views/home/alarm/count/components/overallAlarm.vue
index f14ee15..476add8 100644
--- a/src/views/home/alarm/count/components/overallAlarm.vue
+++ b/src/views/home/alarm/count/components/overallAlarm.vue
@@ -5,39 +5,64 @@
-->
-
+
{{ item.name }}
@@ -63,18 +88,26 @@
border-left: 4px solid #f24d4d;
width: 18%;
padding: 10px;
+ padding-top: 15px;
+ padding-bottom: 15px;
.top {
padding-left: 10px;
+ font-size: 22px;
+ font-weight: 700;
}
.bottom {
text-align: center;
.value {
- font-size: 18px;
+ font-size: 22px;
font-weight: 700;
}
+
+ .unit {
+ font-size: 20px;
+ }
}
}
}
diff --git a/src/views/home/alarm/count/components/trendAnalysis.vue b/src/views/home/alarm/count/components/trendAnalysis.vue
index cea2495..73e18b0 100644
--- a/src/views/home/alarm/count/components/trendAnalysis.vue
+++ b/src/views/home/alarm/count/components/trendAnalysis.vue
@@ -131,8 +131,9 @@
}
.table {
- width: 40%;
+ width: 38%;
padding: 10px;
+ margin-left: 20px;
}
}
diff --git a/src/views/home/device/device/index.vue b/src/views/home/device/device/index.vue
index 55f12a9..df2cf32 100644
--- a/src/views/home/device/device/index.vue
+++ b/src/views/home/device/device/index.vue
@@ -13,6 +13,7 @@
import { exportFile } from '@/utils/exportUtils'
const $router = useRouter()
const useStatusList = ref<{ id: string; name: string; value: string }[]>([]) // 设备在用情况
+const deviceTypeList = ref<{ id: string; name: string; value: string }[]>([]) // 设备类型
// 表格数据
const list = ref
([])
const total = ref(0)
@@ -20,18 +21,18 @@
const columns = ref([
{ text: '状态', value: 'onlineState', align: 'center', isCustom: true, width: '55' },
{ text: '设备编号', value: 'devcode', align: 'center', isRequired: true },
- { text: '设备类型', value: 'deviceType', align: 'center', isRequired: true },
- { text: '监测对象', value: 'watchObject', align: 'center' },
+ { text: '设备类型', value: 'deviceTypeName', align: 'center', isRequired: true },
+ { text: '监测对象', value: 'watchObject', align: 'center', width: '85' },
{ text: '设备型号', value: 'deviceModel', align: 'center' },
{ text: '厂商', value: 'manufactureName', align: 'center', isRequired: true },
- { text: '安装位号', value: 'tagNumber', align: 'center', isRequired: true },
+ { text: '安装位号', value: 'tagNumber', align: 'center', isRequired: true, width: '110' },
{ text: '详细位置', value: 'position', align: 'center', isRequired: true },
{ text: '管理单位', value: 'deptName', align: 'center', isRequired: true },
- { text: '在用情况', value: 'validName', align: 'center', isRequired: true },
+ { text: '在用情况', value: 'validName', align: 'center', isRequired: true, width: '85' },
// { text: '布防状态', value: '', align: 'center', isRequired: true },
- { text: '电量', value: 'cell', align: 'center', isRequired: true },
- { text: '最新上报时间', value: 'logtime', align: 'center', isRequired: true },
- { text: '安装日期', value: 'installDate', align: 'center', isRequired: true },
+ { text: '电量', value: 'cell', align: 'center', isRequired: true, width: '70' },
+ { text: '最新上报时间', value: 'logtime', align: 'center', isRequired: true, width: '180' },
+ { text: '安装日期', value: 'installDate', align: 'center', isRequired: true, width: '180' },
])
// 最终展示列
const columnsConfig = ref([])
@@ -75,6 +76,7 @@
list.value = res.data.rows.map((item: any) => ({
...item,
validName: useStatusList.value.length ? useStatusList.value[useStatusList.value.findIndex(citem => item.valid === citem.value)].name : '',
+ deviceTypeName: deviceTypeList.value.length ? deviceTypeList.value[deviceTypeList.value.findIndex(citem => item.deviceType === citem.value)].name : '',
}))
total.value = res.data.total
loadingTable.value = false
@@ -178,7 +180,7 @@
ElMessage.warning('敬请期待')
}
const isUsed = ref<{ id: string; name: string; value: string }[]>([]) // 是否启用
-const deviceTypeList = ref<{ id: string; name: string; value: string }[]>([]) // 设备类型
+
const manufacturerList = ref<{ id: string; name: string; value: string }[]>([]) // 厂商列表
const cellList = ref<{ id: string; name: string; value: string }[]>([]) // 厂商列表
@@ -217,6 +219,12 @@
// 设备类型
getDeviceTypeListPage({ limit: 9999, offset: 1 }).then((res) => {
deviceTypeList.value = res.data.rows.map((item: any) => ({ id: item.id, name: item.typeName, value: item.id }))
+ if (list.value.length) {
+ list.value = list.value.map((item: any) => ({
+ ...item,
+ deviceTypeName: deviceTypeList.value.length ? deviceTypeList.value[deviceTypeList.value.findIndex(citem => item.deviceType === citem.value)].name : '',
+ }))
+ }
})
// 厂商
getManufacturerListPage().then((res) => {
diff --git a/src/views/home/pipeline/components/detailInfoDialog.vue b/src/views/home/pipeline/components/detailInfoDialog.vue
index 31f5635..1662e6e 100644
--- a/src/views/home/pipeline/components/detailInfoDialog.vue
+++ b/src/views/home/pipeline/components/detailInfoDialog.vue
@@ -123,44 +123,39 @@
x
-
-
-
-
- {{ item.text }}
-
-
- {{ detailInfo[item.value] || '' }}
-
-
+
+
+
+ {{ item.text }}
+
+
+ {{ detailInfo[item.value] || '' }}
+
+
+
diff --git a/src/views/home/pipeline/components/map.vue b/src/views/home/pipeline/components/map.vue
index b956aa0..c7c37be 100644
--- a/src/views/home/pipeline/components/map.vue
+++ b/src/views/home/pipeline/components/map.vue
@@ -176,7 +176,10 @@
setTimeout(() => {
// mapRef.value.map.setZoom(14)
// mapRef.value.map.setFitView()
- mapRef.value.map.setCenter(data.event.data.lnglat)
+ // mapRef.value.map.setCenter(data.event.data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.event.data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
// 关联的管线高亮
const line = $props.pipe.filter((item: any) => item.pipeCode === data.event.data.row.pipeCode)
@@ -218,7 +221,10 @@
info: data,
map: mapRef.value.map,
})
- mapRef.value.map.setCenter(data.lnglat)
+ // mapRef.value.map.setCenter(data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
}
// 重置标记点
diff --git a/src/views/home/pipeline/index.vue b/src/views/home/pipeline/index.vue
index 9ef5426..7eb2f1d 100644
--- a/src/views/home/pipeline/index.vue
+++ b/src/views/home/pipeline/index.vue
@@ -12,8 +12,9 @@
import { getDictByCode } from '@/api/system/dict'
// 表格标识 地图或普通
const mapRef = ref()
-const tableFlag = ref('normal')
+const tableFlag = ref('map')
const mapLoading = ref(true)
+const mapLoad = ref(false)
// 表格数据
const list = ref([])
const total = ref(0)
@@ -58,7 +59,6 @@
// 查询数据
const fetchData = () => {
loadingTable.value = true
- mapLoading.value = true
// 判断是否有查询条件(是地图展示20条 否地图展示所有)
const queryList = [] as Boolean[] // 长度大于2 即为是
for (const i in listQuery.value) {
@@ -82,13 +82,13 @@
}
}).catch(() => {
loadingTable.value = false
- if (queryList.length <= 2) {
- mapLoading.value = false
- }
+ mapLoading.value = false
})
- if (queryList.length > 2) { return }
+ if (queryList.length > 2 || mapLoad.value) { return }
+ mapLoading.value = true
// 获取地图全部数据
getPipelineList(listQuery.value).then((res) => {
+ mapLoad.value = true
// 管线
pipeData.value = res.data.map((item: any) => ({
pipeCode: item.PIPE_CODE,
@@ -104,6 +104,7 @@
}, 500)
})
getPipelineDeviceList(listQuery.value).then((res) => {
+ mapLoad.value = true
mapList.value = res.data.map((item: { [key: string]: string }) => ({
deviceTypeName: item.TYPE_NAME,
tagNumber: item.TAG_NUMBER,
@@ -126,6 +127,7 @@
}
// 重置查询条件f
const reset = () => {
+ mapLoad.value = false
listQuery.value = {
limit: 20,
offset: 1,
@@ -239,6 +241,19 @@
},
})
}
+// 表格高度
+const tableHeight = ref(window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10)
+window.addEventListener('resize', () => {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+})
+watch(() => tableFlag.value, (newVal) => {
+ if (newVal === 'map') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+ }
+ else if (newVal === 'normal') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 98 - 10 - 52 - 52 - 10
+ }
+})
@@ -247,11 +262,9 @@
-
-
@@ -260,7 +273,7 @@
@@ -319,8 +332,6 @@
-
-
@@ -382,7 +393,7 @@
.icon {
position: fixed;
- top: 550px;
+ top: 450px;
left: 50%;
// transform: translateX(-50%);
z-index: 901;
diff --git a/src/views/home/rule/alarm/components/alarmLevelList.vue b/src/views/home/rule/alarm/components/alarmLevelList.vue
index c1b129d..40c1e43 100644
--- a/src/views/home/rule/alarm/components/alarmLevelList.vue
+++ b/src/views/home/rule/alarm/components/alarmLevelList.vue
@@ -18,7 +18,7 @@
{ text: '报警提示方式', value: 'alarmNoteMethodName', align: 'center' },
{ text: '报警音效', value: 'isSoundName', align: 'center' },
{ text: '报警推送', value: 'isSendName', align: 'center' },
- { text: '报警短信', value: 'isTextName', align: 'center' },
+ // { text: '报警短信', value: 'isTextName', align: 'center' },
])
const loadingTable = ref(true)
// 查询条件
diff --git a/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue b/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
index fe60451..757a42c 100644
--- a/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
+++ b/src/views/home/rule/alarm/components/editAlarmLevelDialog.vue
@@ -168,11 +168,11 @@
-
+
diff --git a/src/views/home/rule/alarm/components/editDialog.vue b/src/views/home/rule/alarm/components/editDialog.vue
index a8c565f..3bd2958 100644
--- a/src/views/home/rule/alarm/components/editDialog.vue
+++ b/src/views/home/rule/alarm/components/editDialog.vue
@@ -226,6 +226,9 @@
else {
alarmEventList.value = []
}
+ if (newVal) {
+ dataForm.value.alarmThreshold = ''
+ }
}, {
deep: true,
immediate: true,
diff --git a/src/views/home/rule/alarm/index.vue b/src/views/home/rule/alarm/index.vue
index fef4bf0..99084a0 100644
--- a/src/views/home/rule/alarm/index.vue
+++ b/src/views/home/rule/alarm/index.vue
@@ -147,7 +147,7 @@
}))
const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 })
- alarmTypeList.value = uniqueMultiArray(res.data.rows.map((item: any) => ({
+ alarmTypeList.value = uniqueMultiArray(res2.data.rows.map((item: any) => ({
name: item.alarmType,
value: item.id,
id: item.id,
diff --git a/src/views/home/station/control/components/control.vue b/src/views/home/station/control/components/control.vue
index 8d1f867..5ec4b26 100644
--- a/src/views/home/station/control/components/control.vue
+++ b/src/views/home/station/control/components/control.vue
@@ -129,7 +129,7 @@
flex-wrap: wrap;
.left {
- width: 62%;
+ width: 55%;
// background-color: aqua;
display: flex;
justify-content: space-around;
@@ -152,7 +152,7 @@
}
.right {
- width: 37%;
+ width: 34%;
// background-color: chartreuse;
display: flex;
justify-content: space-around;
diff --git a/src/views/home/station/station/components/detailInfoDialog.vue b/src/views/home/station/station/components/detailInfoDialog.vue
index f44be1a..53bf430 100644
--- a/src/views/home/station/station/components/detailInfoDialog.vue
+++ b/src/views/home/station/station/components/detailInfoDialog.vue
@@ -127,44 +127,39 @@
x
-
-
-
-
- {{ item.text }}
-
-
- {{ detailInfo[item.value] || '' }}
-
-
+
+
+
+ {{ item.text }}
+
+
+ {{ detailInfo[item.value] || '' }}
+
+
+
diff --git a/src/views/home/station/station/components/map.vue b/src/views/home/station/station/components/map.vue
index 2351a1d..1c5a64c 100644
--- a/src/views/home/station/station/components/map.vue
+++ b/src/views/home/station/station/components/map.vue
@@ -139,8 +139,11 @@
})
setTimeout(() => {
// mapRef.value.map.setZoom(14)
- mapRef.value.map.setFitView()
- mapRef.value.map.setCenter(data.event.data.lnglat)
+ // mapRef.value.map.setFitView()
+ // mapRef.value.map.setCenter(data.event.data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.event.data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
}
@@ -164,7 +167,11 @@
info: data,
map: mapRef.value.map,
})
- mapRef.value.map.setCenter(data.lnglat)
+ // mapRef.value.map.setCenter(data.lnglat)
+ // mapRef.value.map.setFitView()
+ const center = JSON.parse(JSON.stringify(data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
}
diff --git a/src/views/home/station/station/index.vue b/src/views/home/station/station/index.vue
index 636cbad..0b2599e 100644
--- a/src/views/home/station/station/index.vue
+++ b/src/views/home/station/station/index.vue
@@ -12,8 +12,9 @@
import { getDictByCode } from '@/api/system/dict'
// 表格标识 地图或普通
const mapRef = ref()
-const tableFlag = ref('normal')
+const tableFlag = ref('map')
const mapLoading = ref(true)
+const mapLoad = ref(false)
// 表格数据
const list = ref([])
const total = ref(0)
@@ -56,7 +57,6 @@
// 查询数据
const fetchData = () => {
loadingTable.value = true
- mapLoading.value = true
// 判断是否有查询条件(是地图展示20条 否地图展示所有)
const queryList = [] as Boolean[] // 长度大于2 即为是
for (const i in listQuery.value) {
@@ -79,13 +79,13 @@
}
}).catch(() => {
loadingTable.value = false
- if (queryList.length <= 2) {
- mapLoading.value = false
- }
+ mapLoading.value = false
})
- if (queryList.length > 2) { return }
+ if (queryList.length > 2 || mapLoad.value) { return }
// 获取地图全部数据
+ mapLoading.value = true
getStationList(listQuery.value).then((res) => {
+ mapLoad.value = true
mapList.value = res.data
setTimeout(() => {
if (tableFlag.value === 'map') {
@@ -99,6 +99,7 @@
}
// 重置查询条件f
const reset = () => {
+ mapLoad.value = false
listQuery.value = {
limit: 20,
offset: 1,
@@ -179,6 +180,19 @@
},
})
}
+// 表格高度
+const tableHeight = ref(window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10)
+window.addEventListener('resize', () => {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+})
+watch(() => tableFlag.value, (newVal) => {
+ if (newVal === 'map') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+ }
+ else if (newVal === 'normal') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 98 - 10 - 52 - 52 - 10
+ }
+})
@@ -186,9 +200,7 @@
-
-
-
+
@@ -197,7 +209,7 @@
@@ -229,8 +241,6 @@
-
-
@@ -292,7 +302,7 @@
.icon {
position: fixed;
- top: 550px;
+ top: 450px;
left: 50%;
// transform: translateX(-50%);
z-index: 901;
diff --git a/src/views/home/well/components/detailInfoDialog.vue b/src/views/home/well/components/detailInfoDialog.vue
index 5d33d05..d0d4242 100644
--- a/src/views/home/well/components/detailInfoDialog.vue
+++ b/src/views/home/well/components/detailInfoDialog.vue
@@ -128,71 +128,39 @@
x
-
-
-
-
- {{ item.text }}
-
-
-
+
+
+
+ {{ item.text }}
+
+
{{ detailInfo[item.value] || '' }}
-
-
-
+
+
+
diff --git a/src/views/home/well/components/map.vue b/src/views/home/well/components/map.vue
index fa2634a..5d9ec48 100644
--- a/src/views/home/well/components/map.vue
+++ b/src/views/home/well/components/map.vue
@@ -139,8 +139,11 @@
})
setTimeout(() => {
// mapRef.value.map.setZoom(14)
- mapRef.value.map.setFitView()
- mapRef.value.map.setCenter(data.event.data.lnglat)
+ // mapRef.value.map.setFitView()
+ // mapRef.value.map.setCenter(data.event.data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.event.data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
}
@@ -164,7 +167,9 @@
info: data,
map: mapRef.value.map,
})
- mapRef.value.map.setCenter(data.lnglat)
+ const center = JSON.parse(JSON.stringify(data.lnglat))
+ center[1] = Number(center[1]) + 0.0035
+ mapRef.value.map.setCenter(center)
})
}
diff --git a/src/views/home/well/index.vue b/src/views/home/well/index.vue
index f9294e5..30163be 100644
--- a/src/views/home/well/index.vue
+++ b/src/views/home/well/index.vue
@@ -12,8 +12,9 @@
import { getDictByCode } from '@/api/system/dict'
// 表格标识 地图或普通
const mapRef = ref()
-const tableFlag = ref('normal')
+const tableFlag = ref('map')
const mapLoading = ref(true)
+const mapLoad = ref(false)
// 表格数据
const list = ref([])
const total = ref(0)
@@ -59,7 +60,6 @@
// 查询数据
const fetchData = () => {
loadingTable.value = true
- mapLoading.value = true
// 判断是否有查询条件(是地图展示20条 否地图展示所有)
const queryList = [] as Boolean[] // 长度大于2 即为是
for (const i in listQuery.value) {
@@ -67,6 +67,7 @@
queryList.push(true)
}
}
+ console.log(queryList.length, 'queryList')
getWellListPage(listQuery.value).then((res) => {
list.value = res.data.rows.map((item: any) => ({ ...item, bfztName: item.bfzt === '1' ? '布防' : '撤防' }))
total.value = res.data.total
@@ -75,24 +76,24 @@
mapList.value = list.value
setTimeout(() => {
if (tableFlag.value === 'map') {
- mapRef.value.resetDraw()
+ mapRef.value?.resetDraw()
}
mapLoading.value = false
}, 500)
}
}).catch(() => {
loadingTable.value = false
- if (queryList.length <= 2) {
- mapLoading.value = false
- }
+ mapLoading.value = false
})
- if (queryList.length > 2) { return }
+ if (queryList.length > 2 || mapLoad.value) { return }
// 获取地图全部数据
+ mapLoading.value = true
getWellList(listQuery.value).then((res) => {
mapList.value = res.data
+ mapLoad.value = true
setTimeout(() => {
if (tableFlag.value === 'map') {
- mapRef.value.resetDraw()
+ mapRef.value?.resetDraw()
}
mapLoading.value = false
}, 500)
@@ -102,6 +103,7 @@
}
// 重置查询条件f
const reset = () => {
+ mapLoad.value = false
listQuery.value = {
limit: 20,
offset: 1,
@@ -210,6 +212,19 @@
},
})
}
+// 表格高度
+const tableHeight = ref(window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10)
+window.addEventListener('resize', () => {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+})
+watch(() => tableFlag.value, (newVal) => {
+ if (newVal === 'map') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 350 - 98 - 10 - 52 - 52 - 10
+ }
+ else if (newVal === 'normal') {
+ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 98 - 10 - 52 - 52 - 10
+ }
+})
@@ -217,9 +232,7 @@
-
-
-
+
@@ -227,10 +240,7 @@
-
+
@@ -270,8 +280,6 @@
-
-