diff --git a/src/App.vue b/src/App.vue index cde81b3..8a00f5d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -125,7 +125,7 @@ '--g-sub-sidebar-actual-width': subSidebarActualWidth, }" /> - + diff --git a/src/App.vue b/src/App.vue index cde81b3..8a00f5d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -125,7 +125,7 @@ '--g-sub-sidebar-actual-width': subSidebarActualWidth, }" /> - + diff --git a/src/layouts/components/Tools/alarmDialog.vue b/src/layouts/components/Tools/alarmDialog.vue index 1828375..df89ab8 100644 --- a/src/layouts/components/Tools/alarmDialog.vue +++ b/src/layouts/components/Tools/alarmDialog.vue @@ -116,7 +116,7 @@ diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/App.vue b/src/App.vue index cde81b3..8a00f5d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -125,7 +125,7 @@ '--g-sub-sidebar-actual-width': subSidebarActualWidth, }" /> - + diff --git a/src/layouts/components/Tools/alarmDialog.vue b/src/layouts/components/Tools/alarmDialog.vue index 1828375..df89ab8 100644 --- a/src/layouts/components/Tools/alarmDialog.vue +++ b/src/layouts/components/Tools/alarmDialog.vue @@ -116,7 +116,7 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ @@ -214,7 +204,7 @@ - + 查看更多 diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue index 9f2d41f..61f9707 100644 --- a/src/layouts/components/Tools/index.vue +++ b/src/layouts/components/Tools/index.vue @@ -79,6 +79,7 @@ // 断开 websocket // websocket.destroyWebSocket() }) +const { proxy } = getCurrentInstance() as any @@ -89,18 +90,18 @@ - + - + - + diff --git a/src/layouts/components/Topbar/index.vue b/src/layouts/components/Topbar/index.vue index 2863cef..4e3120e 100644 --- a/src/layouts/components/Topbar/index.vue +++ b/src/layouts/components/Topbar/index.vue @@ -67,7 +67,7 @@ - + diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ @@ -336,7 +337,7 @@ - + 查看 diff --git a/src/App.vue b/src/App.vue index cde81b3..8a00f5d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -125,7 +125,7 @@ '--g-sub-sidebar-actual-width': subSidebarActualWidth, }" /> - + diff --git a/src/layouts/components/Tools/alarmDialog.vue b/src/layouts/components/Tools/alarmDialog.vue index 1828375..df89ab8 100644 --- a/src/layouts/components/Tools/alarmDialog.vue +++ b/src/layouts/components/Tools/alarmDialog.vue @@ -116,7 +116,7 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ @@ -336,7 +337,7 @@ - + 查看 diff --git a/src/views/home/operation/history/index.vue b/src/views/home/operation/history/index.vue index 5c04ff7..d96ac57 100644 --- a/src/views/home/operation/history/index.vue +++ b/src/views/home/operation/history/index.vue @@ -78,6 +78,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -161,6 +162,7 @@ fetchData() }) }) +const { proxy } = getCurrentInstance() as any @@ -218,7 +220,7 @@ - + 导出 @@ -241,7 +243,7 @@ - + 查看 diff --git a/src/App.vue b/src/App.vue index cde81b3..8a00f5d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -125,7 +125,7 @@ '--g-sub-sidebar-actual-width': subSidebarActualWidth, }" /> - + diff --git a/src/layouts/components/Tools/alarmDialog.vue b/src/layouts/components/Tools/alarmDialog.vue index 1828375..df89ab8 100644 --- a/src/layouts/components/Tools/alarmDialog.vue +++ b/src/layouts/components/Tools/alarmDialog.vue @@ -116,7 +116,7 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ @@ -336,7 +337,7 @@ - + 查看 diff --git a/src/views/home/operation/history/index.vue b/src/views/home/operation/history/index.vue index 5c04ff7..d96ac57 100644 --- a/src/views/home/operation/history/index.vue +++ b/src/views/home/operation/history/index.vue @@ -78,6 +78,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -161,6 +162,7 @@ fetchData() }) }) +const { proxy } = getCurrentInstance() as any @@ -218,7 +220,7 @@ - + 导出 @@ -241,7 +243,7 @@ - + 查看 diff --git a/src/views/home/operation/manufacturer/index.vue b/src/views/home/operation/manufacturer/index.vue index 4a5816a..5f647c3 100644 --- a/src/views/home/operation/manufacturer/index.vue +++ b/src/views/home/operation/manufacturer/index.vue @@ -75,6 +75,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -125,6 +126,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -178,7 +180,7 @@ - + 导出 diff --git a/src/App.vue b/src/App.vue index cde81b3..8a00f5d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -125,7 +125,7 @@ '--g-sub-sidebar-actual-width': subSidebarActualWidth, }" /> - + diff --git a/src/layouts/components/Tools/alarmDialog.vue b/src/layouts/components/Tools/alarmDialog.vue index 1828375..df89ab8 100644 --- a/src/layouts/components/Tools/alarmDialog.vue +++ b/src/layouts/components/Tools/alarmDialog.vue @@ -116,7 +116,7 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ @@ -336,7 +337,7 @@ - + 查看 diff --git a/src/views/home/operation/history/index.vue b/src/views/home/operation/history/index.vue index 5c04ff7..d96ac57 100644 --- a/src/views/home/operation/history/index.vue +++ b/src/views/home/operation/history/index.vue @@ -78,6 +78,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -161,6 +162,7 @@ fetchData() }) }) +const { proxy } = getCurrentInstance() as any @@ -218,7 +220,7 @@ - + 导出 @@ -241,7 +243,7 @@ - + 查看 diff --git a/src/views/home/operation/manufacturer/index.vue b/src/views/home/operation/manufacturer/index.vue index 4a5816a..5f647c3 100644 --- a/src/views/home/operation/manufacturer/index.vue +++ b/src/views/home/operation/manufacturer/index.vue @@ -75,6 +75,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -125,6 +126,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -178,7 +180,7 @@ - + 导出 diff --git a/src/views/home/operation/trajectory/index.vue b/src/views/home/operation/trajectory/index.vue index 9312fd7..606958e 100644 --- a/src/views/home/operation/trajectory/index.vue +++ b/src/views/home/operation/trajectory/index.vue @@ -65,6 +65,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -114,6 +115,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -175,7 +177,7 @@ - + 查看 diff --git a/src/App.vue b/src/App.vue index cde81b3..8a00f5d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -125,7 +125,7 @@ '--g-sub-sidebar-actual-width': subSidebarActualWidth, }" /> - + diff --git a/src/layouts/components/Tools/alarmDialog.vue b/src/layouts/components/Tools/alarmDialog.vue index 1828375..df89ab8 100644 --- a/src/layouts/components/Tools/alarmDialog.vue +++ b/src/layouts/components/Tools/alarmDialog.vue @@ -116,7 +116,7 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ @@ -336,7 +337,7 @@ - + 查看 diff --git a/src/views/home/operation/history/index.vue b/src/views/home/operation/history/index.vue index 5c04ff7..d96ac57 100644 --- a/src/views/home/operation/history/index.vue +++ b/src/views/home/operation/history/index.vue @@ -78,6 +78,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -161,6 +162,7 @@ fetchData() }) }) +const { proxy } = getCurrentInstance() as any @@ -218,7 +220,7 @@ - + 导出 @@ -241,7 +243,7 @@ - + 查看 diff --git a/src/views/home/operation/manufacturer/index.vue b/src/views/home/operation/manufacturer/index.vue index 4a5816a..5f647c3 100644 --- a/src/views/home/operation/manufacturer/index.vue +++ b/src/views/home/operation/manufacturer/index.vue @@ -75,6 +75,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -125,6 +126,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -178,7 +180,7 @@ - + 导出 diff --git a/src/views/home/operation/trajectory/index.vue b/src/views/home/operation/trajectory/index.vue index 9312fd7..606958e 100644 --- a/src/views/home/operation/trajectory/index.vue +++ b/src/views/home/operation/trajectory/index.vue @@ -65,6 +65,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -114,6 +115,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -175,7 +177,7 @@ - + 查看 diff --git a/src/views/home/pipeline/components/detailData.vue b/src/views/home/pipeline/components/detailData.vue index 80b6886..760b1c5 100644 --- a/src/views/home/pipeline/components/detailData.vue +++ b/src/views/home/pipeline/components/detailData.vue @@ -7,7 +7,13 @@ import type { TabsPaneContext } from 'element-plus' import monitorData from './monitorDataList.vue' import maintenanceRecord from '@/views/home/well/components/maintenanceRecord.vue' -const activeName = ref('监控数据') +const { proxy } = getCurrentInstance() as any +const activeName = ref( + proxy.hasPerm('/pipeline/monitor/data') + ? '监控数据' + : proxy.hasPerm('/pipeline/monitor/maintenance') + ? '监控设备维护记录' + : '') const handleClick = (tab: TabsPaneContext, event: Event) => { // console.log(tab, event) } @@ -15,10 +21,10 @@ - + - + diff --git a/src/App.vue b/src/App.vue index cde81b3..8a00f5d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -125,7 +125,7 @@ '--g-sub-sidebar-actual-width': subSidebarActualWidth, }" /> - + diff --git a/src/layouts/components/Tools/alarmDialog.vue b/src/layouts/components/Tools/alarmDialog.vue index 1828375..df89ab8 100644 --- a/src/layouts/components/Tools/alarmDialog.vue +++ b/src/layouts/components/Tools/alarmDialog.vue @@ -116,7 +116,7 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ @@ -336,7 +337,7 @@ - + 查看 diff --git a/src/views/home/operation/history/index.vue b/src/views/home/operation/history/index.vue index 5c04ff7..d96ac57 100644 --- a/src/views/home/operation/history/index.vue +++ b/src/views/home/operation/history/index.vue @@ -78,6 +78,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -161,6 +162,7 @@ fetchData() }) }) +const { proxy } = getCurrentInstance() as any @@ -218,7 +220,7 @@ - + 导出 @@ -241,7 +243,7 @@ - + 查看 diff --git a/src/views/home/operation/manufacturer/index.vue b/src/views/home/operation/manufacturer/index.vue index 4a5816a..5f647c3 100644 --- a/src/views/home/operation/manufacturer/index.vue +++ b/src/views/home/operation/manufacturer/index.vue @@ -75,6 +75,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -125,6 +126,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -178,7 +180,7 @@ - + 导出 diff --git a/src/views/home/operation/trajectory/index.vue b/src/views/home/operation/trajectory/index.vue index 9312fd7..606958e 100644 --- a/src/views/home/operation/trajectory/index.vue +++ b/src/views/home/operation/trajectory/index.vue @@ -65,6 +65,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -114,6 +115,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -175,7 +177,7 @@ - + 查看 diff --git a/src/views/home/pipeline/components/detailData.vue b/src/views/home/pipeline/components/detailData.vue index 80b6886..760b1c5 100644 --- a/src/views/home/pipeline/components/detailData.vue +++ b/src/views/home/pipeline/components/detailData.vue @@ -7,7 +7,13 @@ import type { TabsPaneContext } from 'element-plus' import monitorData from './monitorDataList.vue' import maintenanceRecord from '@/views/home/well/components/maintenanceRecord.vue' -const activeName = ref('监控数据') +const { proxy } = getCurrentInstance() as any +const activeName = ref( + proxy.hasPerm('/pipeline/monitor/data') + ? '监控数据' + : proxy.hasPerm('/pipeline/monitor/maintenance') + ? '监控设备维护记录' + : '') const handleClick = (tab: TabsPaneContext, event: Event) => { // console.log(tab, event) } @@ -15,10 +21,10 @@ - + - + diff --git a/src/views/home/pipeline/index.vue b/src/views/home/pipeline/index.vue index 90baef0..4d66e51 100644 --- a/src/views/home/pipeline/index.vue +++ b/src/views/home/pipeline/index.vue @@ -254,6 +254,7 @@ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 98 - 10 - 52 - 52 - 10 } }) +const { proxy } = getCurrentInstance() as any @@ -348,7 +349,7 @@ - + 导出 @@ -368,7 +369,7 @@ - + 查看 diff --git a/src/layouts/components/Tools/alarmDialog.vue b/src/layouts/components/Tools/alarmDialog.vue index 1828375..df89ab8 100644 --- a/src/layouts/components/Tools/alarmDialog.vue +++ b/src/layouts/components/Tools/alarmDialog.vue @@ -116,7 +116,7 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ @@ -336,7 +337,7 @@ - + 查看 diff --git a/src/views/home/operation/history/index.vue b/src/views/home/operation/history/index.vue index 5c04ff7..d96ac57 100644 --- a/src/views/home/operation/history/index.vue +++ b/src/views/home/operation/history/index.vue @@ -78,6 +78,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -161,6 +162,7 @@ fetchData() }) }) +const { proxy } = getCurrentInstance() as any @@ -218,7 +220,7 @@ - + 导出 @@ -241,7 +243,7 @@ - + 查看 diff --git a/src/views/home/operation/manufacturer/index.vue b/src/views/home/operation/manufacturer/index.vue index 4a5816a..5f647c3 100644 --- a/src/views/home/operation/manufacturer/index.vue +++ b/src/views/home/operation/manufacturer/index.vue @@ -75,6 +75,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -125,6 +126,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -178,7 +180,7 @@ - + 导出 diff --git a/src/views/home/operation/trajectory/index.vue b/src/views/home/operation/trajectory/index.vue index 9312fd7..606958e 100644 --- a/src/views/home/operation/trajectory/index.vue +++ b/src/views/home/operation/trajectory/index.vue @@ -65,6 +65,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -114,6 +115,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -175,7 +177,7 @@ - + 查看 diff --git a/src/views/home/pipeline/components/detailData.vue b/src/views/home/pipeline/components/detailData.vue index 80b6886..760b1c5 100644 --- a/src/views/home/pipeline/components/detailData.vue +++ b/src/views/home/pipeline/components/detailData.vue @@ -7,7 +7,13 @@ import type { TabsPaneContext } from 'element-plus' import monitorData from './monitorDataList.vue' import maintenanceRecord from '@/views/home/well/components/maintenanceRecord.vue' -const activeName = ref('监控数据') +const { proxy } = getCurrentInstance() as any +const activeName = ref( + proxy.hasPerm('/pipeline/monitor/data') + ? '监控数据' + : proxy.hasPerm('/pipeline/monitor/maintenance') + ? '监控设备维护记录' + : '') const handleClick = (tab: TabsPaneContext, event: Event) => { // console.log(tab, event) } @@ -15,10 +21,10 @@ - + - + diff --git a/src/views/home/pipeline/index.vue b/src/views/home/pipeline/index.vue index 90baef0..4d66e51 100644 --- a/src/views/home/pipeline/index.vue +++ b/src/views/home/pipeline/index.vue @@ -254,6 +254,7 @@ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 98 - 10 - 52 - 52 - 10 } }) +const { proxy } = getCurrentInstance() as any @@ -348,7 +349,7 @@ - + 导出 @@ -368,7 +369,7 @@ - + 查看 - + 新建 @@ -139,10 +140,10 @@ - + 编辑 - + 删除 diff --git a/src/App.vue b/src/App.vue index cde81b3..8a00f5d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -125,7 +125,7 @@ '--g-sub-sidebar-actual-width': subSidebarActualWidth, }" /> - + diff --git a/src/layouts/components/Tools/alarmDialog.vue b/src/layouts/components/Tools/alarmDialog.vue index 1828375..df89ab8 100644 --- a/src/layouts/components/Tools/alarmDialog.vue +++ b/src/layouts/components/Tools/alarmDialog.vue @@ -116,7 +116,7 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ @@ -336,7 +337,7 @@ - + 查看 diff --git a/src/views/home/operation/history/index.vue b/src/views/home/operation/history/index.vue index 5c04ff7..d96ac57 100644 --- a/src/views/home/operation/history/index.vue +++ b/src/views/home/operation/history/index.vue @@ -78,6 +78,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -161,6 +162,7 @@ fetchData() }) }) +const { proxy } = getCurrentInstance() as any @@ -218,7 +220,7 @@ - + 导出 @@ -241,7 +243,7 @@ - + 查看 diff --git a/src/views/home/operation/manufacturer/index.vue b/src/views/home/operation/manufacturer/index.vue index 4a5816a..5f647c3 100644 --- a/src/views/home/operation/manufacturer/index.vue +++ b/src/views/home/operation/manufacturer/index.vue @@ -75,6 +75,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -125,6 +126,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -178,7 +180,7 @@ - + 导出 diff --git a/src/views/home/operation/trajectory/index.vue b/src/views/home/operation/trajectory/index.vue index 9312fd7..606958e 100644 --- a/src/views/home/operation/trajectory/index.vue +++ b/src/views/home/operation/trajectory/index.vue @@ -65,6 +65,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -114,6 +115,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -175,7 +177,7 @@ - + 查看 diff --git a/src/views/home/pipeline/components/detailData.vue b/src/views/home/pipeline/components/detailData.vue index 80b6886..760b1c5 100644 --- a/src/views/home/pipeline/components/detailData.vue +++ b/src/views/home/pipeline/components/detailData.vue @@ -7,7 +7,13 @@ import type { TabsPaneContext } from 'element-plus' import monitorData from './monitorDataList.vue' import maintenanceRecord from '@/views/home/well/components/maintenanceRecord.vue' -const activeName = ref('监控数据') +const { proxy } = getCurrentInstance() as any +const activeName = ref( + proxy.hasPerm('/pipeline/monitor/data') + ? '监控数据' + : proxy.hasPerm('/pipeline/monitor/maintenance') + ? '监控设备维护记录' + : '') const handleClick = (tab: TabsPaneContext, event: Event) => { // console.log(tab, event) } @@ -15,10 +21,10 @@ - + - + diff --git a/src/views/home/pipeline/index.vue b/src/views/home/pipeline/index.vue index 90baef0..4d66e51 100644 --- a/src/views/home/pipeline/index.vue +++ b/src/views/home/pipeline/index.vue @@ -254,6 +254,7 @@ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 98 - 10 - 52 - 52 - 10 } }) +const { proxy } = getCurrentInstance() as any @@ -348,7 +349,7 @@ - + 导出 @@ -368,7 +369,7 @@ - + 查看 - + 新建 @@ -139,10 +140,10 @@ - + 编辑 - + 删除 diff --git a/src/views/home/rule/alarm/components/alarmLevelList.vue b/src/views/home/rule/alarm/components/alarmLevelList.vue index c8ffb7d..6c337c4 100644 --- a/src/views/home/rule/alarm/components/alarmLevelList.vue +++ b/src/views/home/rule/alarm/components/alarmLevelList.vue @@ -87,6 +87,7 @@ const cancel = () => { dialogFormVisible.value = false } +const { proxy } = getCurrentInstance() as any @@ -97,7 +98,7 @@ - + 新增 @@ -117,10 +118,10 @@ - + 编辑 - + 删除 diff --git a/src/App.vue b/src/App.vue index cde81b3..8a00f5d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -125,7 +125,7 @@ '--g-sub-sidebar-actual-width': subSidebarActualWidth, }" /> - + diff --git a/src/layouts/components/Tools/alarmDialog.vue b/src/layouts/components/Tools/alarmDialog.vue index 1828375..df89ab8 100644 --- a/src/layouts/components/Tools/alarmDialog.vue +++ b/src/layouts/components/Tools/alarmDialog.vue @@ -116,7 +116,7 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ @@ -336,7 +337,7 @@ - + 查看 diff --git a/src/views/home/operation/history/index.vue b/src/views/home/operation/history/index.vue index 5c04ff7..d96ac57 100644 --- a/src/views/home/operation/history/index.vue +++ b/src/views/home/operation/history/index.vue @@ -78,6 +78,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -161,6 +162,7 @@ fetchData() }) }) +const { proxy } = getCurrentInstance() as any @@ -218,7 +220,7 @@ - + 导出 @@ -241,7 +243,7 @@ - + 查看 diff --git a/src/views/home/operation/manufacturer/index.vue b/src/views/home/operation/manufacturer/index.vue index 4a5816a..5f647c3 100644 --- a/src/views/home/operation/manufacturer/index.vue +++ b/src/views/home/operation/manufacturer/index.vue @@ -75,6 +75,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -125,6 +126,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -178,7 +180,7 @@ - + 导出 diff --git a/src/views/home/operation/trajectory/index.vue b/src/views/home/operation/trajectory/index.vue index 9312fd7..606958e 100644 --- a/src/views/home/operation/trajectory/index.vue +++ b/src/views/home/operation/trajectory/index.vue @@ -65,6 +65,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -114,6 +115,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -175,7 +177,7 @@ - + 查看 diff --git a/src/views/home/pipeline/components/detailData.vue b/src/views/home/pipeline/components/detailData.vue index 80b6886..760b1c5 100644 --- a/src/views/home/pipeline/components/detailData.vue +++ b/src/views/home/pipeline/components/detailData.vue @@ -7,7 +7,13 @@ import type { TabsPaneContext } from 'element-plus' import monitorData from './monitorDataList.vue' import maintenanceRecord from '@/views/home/well/components/maintenanceRecord.vue' -const activeName = ref('监控数据') +const { proxy } = getCurrentInstance() as any +const activeName = ref( + proxy.hasPerm('/pipeline/monitor/data') + ? '监控数据' + : proxy.hasPerm('/pipeline/monitor/maintenance') + ? '监控设备维护记录' + : '') const handleClick = (tab: TabsPaneContext, event: Event) => { // console.log(tab, event) } @@ -15,10 +21,10 @@ - + - + diff --git a/src/views/home/pipeline/index.vue b/src/views/home/pipeline/index.vue index 90baef0..4d66e51 100644 --- a/src/views/home/pipeline/index.vue +++ b/src/views/home/pipeline/index.vue @@ -254,6 +254,7 @@ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 98 - 10 - 52 - 52 - 10 } }) +const { proxy } = getCurrentInstance() as any @@ -348,7 +349,7 @@ - + 导出 @@ -368,7 +369,7 @@ - + 查看 - + 新建 @@ -139,10 +140,10 @@ - + 编辑 - + 删除 diff --git a/src/views/home/rule/alarm/components/alarmLevelList.vue b/src/views/home/rule/alarm/components/alarmLevelList.vue index c8ffb7d..6c337c4 100644 --- a/src/views/home/rule/alarm/components/alarmLevelList.vue +++ b/src/views/home/rule/alarm/components/alarmLevelList.vue @@ -87,6 +87,7 @@ const cancel = () => { dialogFormVisible.value = false } +const { proxy } = getCurrentInstance() as any @@ -97,7 +98,7 @@ - + 新增 @@ -117,10 +118,10 @@ - + 编辑 - + 删除 diff --git a/src/views/home/rule/alarm/components/alarmTypeList.vue b/src/views/home/rule/alarm/components/alarmTypeList.vue index 2cbf110..aa0cfed 100644 --- a/src/views/home/rule/alarm/components/alarmTypeList.vue +++ b/src/views/home/rule/alarm/components/alarmTypeList.vue @@ -80,6 +80,7 @@ const cancel = () => { dialogFormVisible.value = false } +const { proxy } = getCurrentInstance() as any @@ -90,7 +91,7 @@ - + 新增 @@ -110,10 +111,10 @@ - + 编辑 - + 删除 diff --git a/src/App.vue b/src/App.vue index cde81b3..8a00f5d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -125,7 +125,7 @@ '--g-sub-sidebar-actual-width': subSidebarActualWidth, }" /> - + diff --git a/src/layouts/components/Tools/alarmDialog.vue b/src/layouts/components/Tools/alarmDialog.vue index 1828375..df89ab8 100644 --- a/src/layouts/components/Tools/alarmDialog.vue +++ b/src/layouts/components/Tools/alarmDialog.vue @@ -116,7 +116,7 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ @@ -336,7 +337,7 @@ - + 查看 diff --git a/src/views/home/operation/history/index.vue b/src/views/home/operation/history/index.vue index 5c04ff7..d96ac57 100644 --- a/src/views/home/operation/history/index.vue +++ b/src/views/home/operation/history/index.vue @@ -78,6 +78,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -161,6 +162,7 @@ fetchData() }) }) +const { proxy } = getCurrentInstance() as any @@ -218,7 +220,7 @@ - + 导出 @@ -241,7 +243,7 @@ - + 查看 diff --git a/src/views/home/operation/manufacturer/index.vue b/src/views/home/operation/manufacturer/index.vue index 4a5816a..5f647c3 100644 --- a/src/views/home/operation/manufacturer/index.vue +++ b/src/views/home/operation/manufacturer/index.vue @@ -75,6 +75,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -125,6 +126,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -178,7 +180,7 @@ - + 导出 diff --git a/src/views/home/operation/trajectory/index.vue b/src/views/home/operation/trajectory/index.vue index 9312fd7..606958e 100644 --- a/src/views/home/operation/trajectory/index.vue +++ b/src/views/home/operation/trajectory/index.vue @@ -65,6 +65,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -114,6 +115,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -175,7 +177,7 @@ - + 查看 diff --git a/src/views/home/pipeline/components/detailData.vue b/src/views/home/pipeline/components/detailData.vue index 80b6886..760b1c5 100644 --- a/src/views/home/pipeline/components/detailData.vue +++ b/src/views/home/pipeline/components/detailData.vue @@ -7,7 +7,13 @@ import type { TabsPaneContext } from 'element-plus' import monitorData from './monitorDataList.vue' import maintenanceRecord from '@/views/home/well/components/maintenanceRecord.vue' -const activeName = ref('监控数据') +const { proxy } = getCurrentInstance() as any +const activeName = ref( + proxy.hasPerm('/pipeline/monitor/data') + ? '监控数据' + : proxy.hasPerm('/pipeline/monitor/maintenance') + ? '监控设备维护记录' + : '') const handleClick = (tab: TabsPaneContext, event: Event) => { // console.log(tab, event) } @@ -15,10 +21,10 @@ - + - + diff --git a/src/views/home/pipeline/index.vue b/src/views/home/pipeline/index.vue index 90baef0..4d66e51 100644 --- a/src/views/home/pipeline/index.vue +++ b/src/views/home/pipeline/index.vue @@ -254,6 +254,7 @@ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 98 - 10 - 52 - 52 - 10 } }) +const { proxy } = getCurrentInstance() as any @@ -348,7 +349,7 @@ - + 导出 @@ -368,7 +369,7 @@ - + 查看 - + 新建 @@ -139,10 +140,10 @@ - + 编辑 - + 删除 diff --git a/src/views/home/rule/alarm/components/alarmLevelList.vue b/src/views/home/rule/alarm/components/alarmLevelList.vue index c8ffb7d..6c337c4 100644 --- a/src/views/home/rule/alarm/components/alarmLevelList.vue +++ b/src/views/home/rule/alarm/components/alarmLevelList.vue @@ -87,6 +87,7 @@ const cancel = () => { dialogFormVisible.value = false } +const { proxy } = getCurrentInstance() as any @@ -97,7 +98,7 @@ - + 新增 @@ -117,10 +118,10 @@ - + 编辑 - + 删除 diff --git a/src/views/home/rule/alarm/components/alarmTypeList.vue b/src/views/home/rule/alarm/components/alarmTypeList.vue index 2cbf110..aa0cfed 100644 --- a/src/views/home/rule/alarm/components/alarmTypeList.vue +++ b/src/views/home/rule/alarm/components/alarmTypeList.vue @@ -80,6 +80,7 @@ const cancel = () => { dialogFormVisible.value = false } +const { proxy } = getCurrentInstance() as any @@ -90,7 +91,7 @@ - + 新增 @@ -110,10 +111,10 @@ - + 编辑 - + 删除 diff --git a/src/views/home/rule/alarm/index.vue b/src/views/home/rule/alarm/index.vue index 110030c..4e66a34 100644 --- a/src/views/home/rule/alarm/index.vue +++ b/src/views/home/rule/alarm/index.vue @@ -20,11 +20,14 @@ // 初始展示列 const columns = ref([ { text: '报警类型', value: 'alarmTypeName', align: 'center' }, - { text: '报警名称', value: 'alarmName', align: 'center' }, - { text: '报警等级', value: 'alarmLevelName', align: 'center' }, - { text: '报警提示方式', value: 'alarmNoteMethodName', align: 'center' }, - { text: '状态', value: 'stateName', align: 'center', width: '130' }, - { text: '创建时间', value: 'ts', align: 'center' }, + { text: '设备类型', value: 'typeName', align: 'center' }, + { text: '产品', value: 'productName', align: 'center' }, + { text: '厂商', value: 'manufacturerName', align: 'center' }, + // { text: '报警名称', value: 'alarmName', align: 'center' }, + { text: '报警等级', value: 'alarmLevelName', align: 'center', width: '100' }, + { text: '报警提示方式', value: 'alarmNoteMethodName', align: 'center', width: '130', isCustom: true }, + { text: '状态', value: 'stateName', align: 'center', width: '100', isCustom: true }, + { text: '创建时间', value: 'ts', align: 'center', width: '200' }, ]) // 最终展示列 const columnsConfig = ref([]) @@ -158,6 +161,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -191,13 +195,13 @@ - + 报警类型管理 - + 报警等级管理 - + 新增 @@ -214,16 +218,28 @@ + + + + 消息提醒 + 弹窗提醒 + + + + 启用 + 未启用 + + - + {{ scope.row.state === '1' ? '停用' : '启用' }} - + 编辑 - + 删除 diff --git a/src/App.vue b/src/App.vue index cde81b3..8a00f5d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -125,7 +125,7 @@ '--g-sub-sidebar-actual-width': subSidebarActualWidth, }" /> - + diff --git a/src/layouts/components/Tools/alarmDialog.vue b/src/layouts/components/Tools/alarmDialog.vue index 1828375..df89ab8 100644 --- a/src/layouts/components/Tools/alarmDialog.vue +++ b/src/layouts/components/Tools/alarmDialog.vue @@ -116,7 +116,7 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ @@ -336,7 +337,7 @@ - + 查看 diff --git a/src/views/home/operation/history/index.vue b/src/views/home/operation/history/index.vue index 5c04ff7..d96ac57 100644 --- a/src/views/home/operation/history/index.vue +++ b/src/views/home/operation/history/index.vue @@ -78,6 +78,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -161,6 +162,7 @@ fetchData() }) }) +const { proxy } = getCurrentInstance() as any @@ -218,7 +220,7 @@ - + 导出 @@ -241,7 +243,7 @@ - + 查看 diff --git a/src/views/home/operation/manufacturer/index.vue b/src/views/home/operation/manufacturer/index.vue index 4a5816a..5f647c3 100644 --- a/src/views/home/operation/manufacturer/index.vue +++ b/src/views/home/operation/manufacturer/index.vue @@ -75,6 +75,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -125,6 +126,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -178,7 +180,7 @@ - + 导出 diff --git a/src/views/home/operation/trajectory/index.vue b/src/views/home/operation/trajectory/index.vue index 9312fd7..606958e 100644 --- a/src/views/home/operation/trajectory/index.vue +++ b/src/views/home/operation/trajectory/index.vue @@ -65,6 +65,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -114,6 +115,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -175,7 +177,7 @@ - + 查看 diff --git a/src/views/home/pipeline/components/detailData.vue b/src/views/home/pipeline/components/detailData.vue index 80b6886..760b1c5 100644 --- a/src/views/home/pipeline/components/detailData.vue +++ b/src/views/home/pipeline/components/detailData.vue @@ -7,7 +7,13 @@ import type { TabsPaneContext } from 'element-plus' import monitorData from './monitorDataList.vue' import maintenanceRecord from '@/views/home/well/components/maintenanceRecord.vue' -const activeName = ref('监控数据') +const { proxy } = getCurrentInstance() as any +const activeName = ref( + proxy.hasPerm('/pipeline/monitor/data') + ? '监控数据' + : proxy.hasPerm('/pipeline/monitor/maintenance') + ? '监控设备维护记录' + : '') const handleClick = (tab: TabsPaneContext, event: Event) => { // console.log(tab, event) } @@ -15,10 +21,10 @@ - + - + diff --git a/src/views/home/pipeline/index.vue b/src/views/home/pipeline/index.vue index 90baef0..4d66e51 100644 --- a/src/views/home/pipeline/index.vue +++ b/src/views/home/pipeline/index.vue @@ -254,6 +254,7 @@ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 98 - 10 - 52 - 52 - 10 } }) +const { proxy } = getCurrentInstance() as any @@ -348,7 +349,7 @@ - + 导出 @@ -368,7 +369,7 @@ - + 查看 - + 新建 @@ -139,10 +140,10 @@ - + 编辑 - + 删除 diff --git a/src/views/home/rule/alarm/components/alarmLevelList.vue b/src/views/home/rule/alarm/components/alarmLevelList.vue index c8ffb7d..6c337c4 100644 --- a/src/views/home/rule/alarm/components/alarmLevelList.vue +++ b/src/views/home/rule/alarm/components/alarmLevelList.vue @@ -87,6 +87,7 @@ const cancel = () => { dialogFormVisible.value = false } +const { proxy } = getCurrentInstance() as any @@ -97,7 +98,7 @@ - + 新增 @@ -117,10 +118,10 @@ - + 编辑 - + 删除 diff --git a/src/views/home/rule/alarm/components/alarmTypeList.vue b/src/views/home/rule/alarm/components/alarmTypeList.vue index 2cbf110..aa0cfed 100644 --- a/src/views/home/rule/alarm/components/alarmTypeList.vue +++ b/src/views/home/rule/alarm/components/alarmTypeList.vue @@ -80,6 +80,7 @@ const cancel = () => { dialogFormVisible.value = false } +const { proxy } = getCurrentInstance() as any @@ -90,7 +91,7 @@ - + 新增 @@ -110,10 +111,10 @@ - + 编辑 - + 删除 diff --git a/src/views/home/rule/alarm/index.vue b/src/views/home/rule/alarm/index.vue index 110030c..4e66a34 100644 --- a/src/views/home/rule/alarm/index.vue +++ b/src/views/home/rule/alarm/index.vue @@ -20,11 +20,14 @@ // 初始展示列 const columns = ref([ { text: '报警类型', value: 'alarmTypeName', align: 'center' }, - { text: '报警名称', value: 'alarmName', align: 'center' }, - { text: '报警等级', value: 'alarmLevelName', align: 'center' }, - { text: '报警提示方式', value: 'alarmNoteMethodName', align: 'center' }, - { text: '状态', value: 'stateName', align: 'center', width: '130' }, - { text: '创建时间', value: 'ts', align: 'center' }, + { text: '设备类型', value: 'typeName', align: 'center' }, + { text: '产品', value: 'productName', align: 'center' }, + { text: '厂商', value: 'manufacturerName', align: 'center' }, + // { text: '报警名称', value: 'alarmName', align: 'center' }, + { text: '报警等级', value: 'alarmLevelName', align: 'center', width: '100' }, + { text: '报警提示方式', value: 'alarmNoteMethodName', align: 'center', width: '130', isCustom: true }, + { text: '状态', value: 'stateName', align: 'center', width: '100', isCustom: true }, + { text: '创建时间', value: 'ts', align: 'center', width: '200' }, ]) // 最终展示列 const columnsConfig = ref([]) @@ -158,6 +161,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -191,13 +195,13 @@ - + 报警类型管理 - + 报警等级管理 - + 新增 @@ -214,16 +218,28 @@ + + + + 消息提醒 + 弹窗提醒 + + + + 启用 + 未启用 + + - + {{ scope.row.state === '1' ? '停用' : '启用' }} - + 编辑 - + 删除 diff --git a/src/views/home/rule/special/components/editDialog.vue b/src/views/home/rule/special/components/editDialog.vue index bb494ec..5df205b 100644 --- a/src/views/home/rule/special/components/editDialog.vue +++ b/src/views/home/rule/special/components/editDialog.vue @@ -8,7 +8,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { getDictByCode } from '@/api/system/dict' import { getDeviceTypeListPage } from '@/api/home/device/type' -import { getAlarmLevelListPage, getAlarmRuleListPage } from '@/api/home/rule/alarm' +import { getAlarmLevelListPage, getAlarmTypeListPage } from '@/api/home/rule/alarm' import { addSpecialAlarmRule, editSpecialAlarmRule } from '@/api/home/rule/special' import { getDeviceListPage } from '@/api/home/device/device' import { getProductListPage } from '@/api/home/device/product' @@ -57,13 +57,15 @@ } const list = ref([]) const columns = ref([ - { text: '报警规则', value: 'alarmRule', align: 'center', type: 'select', code: 'alarm-rule', required: true }, + { text: '报警类型', value: 'alarmTypeId', align: 'center', type: 'select', code: 'alarm-rule', required: true }, { text: '报警等级', value: 'alarmLevelId', align: 'center', type: 'select', code: 'alarm-level', required: true }, { text: '报警阈值', value: 'alarmThreshold', align: 'center', type: 'input', required: true }, ]) // 初始化对话框 +const isFirst = ref(true) const initDialog = (dialogStatusValue: string, row: any) => { dialogStatus.value = dialogStatusValue + isFirst.value = true dialogFormVisible.value = true if (dialogStatus.value === 'create') { // 如果是新增,清除验证 resetForm() @@ -83,9 +85,13 @@ alarmRule: row.alarmRule, alarmLevelId: row.alarmLevelId, alarmThreshold: row.alarmThreshold, + alarmTypeId: row.alarmTypeId, }, ] } + setTimeout(() => { + isFirst.value = false + }) } defineExpose({ initDialog, @@ -143,6 +149,7 @@ const saveData = () => { const data = list.value.map((item: any) => ({ alarmLevelId: item.alarmLevelId, + alarmTypeId: item.alarmTypeId, alarmRule: item.alarmRule, alarmRuleName: `${item.alarmRule}[${alarmLevelList.value.filter((citem: any) => citem.id === item.alarmLevelId)[0]?.name || ''}]:${item.alarmThreshold}%LEL`, alarmThreshold: item.alarmThreshold, @@ -151,7 +158,7 @@ position: dataForm.value.position, tagNumber: dataForm.value.tagNumber, devTypeName: deviceList.value.filter((citem: any) => citem.value === dataForm.value.devcode)[0]?.name || '', - alarmTypeId: alarmRuleList.value.filter((citem: any) => citem.name === item.alarmRule)[0]?.alarmTypeId || '', + // alarmTypeId: alarmRuleList.value.filter((citem: any) => citem.name === item.alarmRule)[0]?.alarmTypeId || '', })) if (dialogStatus.value === 'edit') { updateData(data) @@ -207,7 +214,7 @@ // 设备列表 getDeviceListPage({ offset: 1, limit: 9999 }).then((res) => { deviceList.value = res.data.rows.map((item: any) => ({ - name: item.devTypeName, + name: item.typeName, id: item.id, value: item.devcode, productId: item.productId, @@ -223,14 +230,14 @@ })) }) // 报警规则 - getAlarmRuleListPage({ limit: 9999, offset: 1 }).then((res) => { - alarmRuleList.value = res.data.rows.map((item: any) => ({ - name: item.alarmName, - id: item.id, - value: item.id, - alarmTypeId: item.alarmTypeId, - })) - }) + // getAlarmRuleListPage({ limit: 9999, offset: 1 }).then((res) => { + // alarmRuleList.value = res.data.rows.map((item: any) => ({ + // name: item.alarmName, + // id: item.id, + // value: item.id, + // alarmTypeId: item.alarmTypeId, + // })) + // }) // 报警等级 getAlarmLevelListPage({ limit: 9999, offset: 1 }).then((res) => { alarmLevelList.value = res.data.rows.map((item: any) => ({ @@ -247,11 +254,26 @@ watch(() => dataForm.value.devcode, (newVal) => { if (newVal) { const current = deviceList.value.filter((item: any) => item.value === dataForm.value.devcode) + console.log(current, 'current') if (current.length) { dataForm.value.productId = current[0].productId dataForm.value.tagNumber = current[0].tagNumber dataForm.value.position = current[0].position + // 根据设备类型寻找报警类型 + getAlarmTypeListPage({ limit: 9999, offset: 1 }).then((res) => { + alarmRuleList.value = res.data.rows.filter((item: any) => item.deviceTypeName.includes(current[0].name)).map((item: any) => ({ + name: item.alarmType, + id: item.id, + value: item.id, + // alarmTypeId: item.id, + })) + }) } + if (isFirst.value) { + return + } + alarmRuleList.value = [] + list.value = [] } }, { deep: true, @@ -330,12 +352,12 @@ diff --git a/src/App.vue b/src/App.vue index cde81b3..8a00f5d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -125,7 +125,7 @@ '--g-sub-sidebar-actual-width': subSidebarActualWidth, }" /> - + diff --git a/src/layouts/components/Tools/alarmDialog.vue b/src/layouts/components/Tools/alarmDialog.vue index 1828375..df89ab8 100644 --- a/src/layouts/components/Tools/alarmDialog.vue +++ b/src/layouts/components/Tools/alarmDialog.vue @@ -116,7 +116,7 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ @@ -336,7 +337,7 @@ - + 查看 diff --git a/src/views/home/operation/history/index.vue b/src/views/home/operation/history/index.vue index 5c04ff7..d96ac57 100644 --- a/src/views/home/operation/history/index.vue +++ b/src/views/home/operation/history/index.vue @@ -78,6 +78,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -161,6 +162,7 @@ fetchData() }) }) +const { proxy } = getCurrentInstance() as any @@ -218,7 +220,7 @@ - + 导出 @@ -241,7 +243,7 @@ - + 查看 diff --git a/src/views/home/operation/manufacturer/index.vue b/src/views/home/operation/manufacturer/index.vue index 4a5816a..5f647c3 100644 --- a/src/views/home/operation/manufacturer/index.vue +++ b/src/views/home/operation/manufacturer/index.vue @@ -75,6 +75,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -125,6 +126,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -178,7 +180,7 @@ - + 导出 diff --git a/src/views/home/operation/trajectory/index.vue b/src/views/home/operation/trajectory/index.vue index 9312fd7..606958e 100644 --- a/src/views/home/operation/trajectory/index.vue +++ b/src/views/home/operation/trajectory/index.vue @@ -65,6 +65,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -114,6 +115,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -175,7 +177,7 @@ - + 查看 diff --git a/src/views/home/pipeline/components/detailData.vue b/src/views/home/pipeline/components/detailData.vue index 80b6886..760b1c5 100644 --- a/src/views/home/pipeline/components/detailData.vue +++ b/src/views/home/pipeline/components/detailData.vue @@ -7,7 +7,13 @@ import type { TabsPaneContext } from 'element-plus' import monitorData from './monitorDataList.vue' import maintenanceRecord from '@/views/home/well/components/maintenanceRecord.vue' -const activeName = ref('监控数据') +const { proxy } = getCurrentInstance() as any +const activeName = ref( + proxy.hasPerm('/pipeline/monitor/data') + ? '监控数据' + : proxy.hasPerm('/pipeline/monitor/maintenance') + ? '监控设备维护记录' + : '') const handleClick = (tab: TabsPaneContext, event: Event) => { // console.log(tab, event) } @@ -15,10 +21,10 @@ - + - + diff --git a/src/views/home/pipeline/index.vue b/src/views/home/pipeline/index.vue index 90baef0..4d66e51 100644 --- a/src/views/home/pipeline/index.vue +++ b/src/views/home/pipeline/index.vue @@ -254,6 +254,7 @@ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 98 - 10 - 52 - 52 - 10 } }) +const { proxy } = getCurrentInstance() as any @@ -348,7 +349,7 @@ - + 导出 @@ -368,7 +369,7 @@ - + 查看 - + 新建 @@ -139,10 +140,10 @@ - + 编辑 - + 删除 diff --git a/src/views/home/rule/alarm/components/alarmLevelList.vue b/src/views/home/rule/alarm/components/alarmLevelList.vue index c8ffb7d..6c337c4 100644 --- a/src/views/home/rule/alarm/components/alarmLevelList.vue +++ b/src/views/home/rule/alarm/components/alarmLevelList.vue @@ -87,6 +87,7 @@ const cancel = () => { dialogFormVisible.value = false } +const { proxy } = getCurrentInstance() as any @@ -97,7 +98,7 @@ - + 新增 @@ -117,10 +118,10 @@ - + 编辑 - + 删除 diff --git a/src/views/home/rule/alarm/components/alarmTypeList.vue b/src/views/home/rule/alarm/components/alarmTypeList.vue index 2cbf110..aa0cfed 100644 --- a/src/views/home/rule/alarm/components/alarmTypeList.vue +++ b/src/views/home/rule/alarm/components/alarmTypeList.vue @@ -80,6 +80,7 @@ const cancel = () => { dialogFormVisible.value = false } +const { proxy } = getCurrentInstance() as any @@ -90,7 +91,7 @@ - + 新增 @@ -110,10 +111,10 @@ - + 编辑 - + 删除 diff --git a/src/views/home/rule/alarm/index.vue b/src/views/home/rule/alarm/index.vue index 110030c..4e66a34 100644 --- a/src/views/home/rule/alarm/index.vue +++ b/src/views/home/rule/alarm/index.vue @@ -20,11 +20,14 @@ // 初始展示列 const columns = ref([ { text: '报警类型', value: 'alarmTypeName', align: 'center' }, - { text: '报警名称', value: 'alarmName', align: 'center' }, - { text: '报警等级', value: 'alarmLevelName', align: 'center' }, - { text: '报警提示方式', value: 'alarmNoteMethodName', align: 'center' }, - { text: '状态', value: 'stateName', align: 'center', width: '130' }, - { text: '创建时间', value: 'ts', align: 'center' }, + { text: '设备类型', value: 'typeName', align: 'center' }, + { text: '产品', value: 'productName', align: 'center' }, + { text: '厂商', value: 'manufacturerName', align: 'center' }, + // { text: '报警名称', value: 'alarmName', align: 'center' }, + { text: '报警等级', value: 'alarmLevelName', align: 'center', width: '100' }, + { text: '报警提示方式', value: 'alarmNoteMethodName', align: 'center', width: '130', isCustom: true }, + { text: '状态', value: 'stateName', align: 'center', width: '100', isCustom: true }, + { text: '创建时间', value: 'ts', align: 'center', width: '200' }, ]) // 最终展示列 const columnsConfig = ref([]) @@ -158,6 +161,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -191,13 +195,13 @@ - + 报警类型管理 - + 报警等级管理 - + 新增 @@ -214,16 +218,28 @@ + + + + 消息提醒 + 弹窗提醒 + + + + 启用 + 未启用 + + - + {{ scope.row.state === '1' ? '停用' : '启用' }} - + 编辑 - + 删除 diff --git a/src/views/home/rule/special/components/editDialog.vue b/src/views/home/rule/special/components/editDialog.vue index bb494ec..5df205b 100644 --- a/src/views/home/rule/special/components/editDialog.vue +++ b/src/views/home/rule/special/components/editDialog.vue @@ -8,7 +8,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { getDictByCode } from '@/api/system/dict' import { getDeviceTypeListPage } from '@/api/home/device/type' -import { getAlarmLevelListPage, getAlarmRuleListPage } from '@/api/home/rule/alarm' +import { getAlarmLevelListPage, getAlarmTypeListPage } from '@/api/home/rule/alarm' import { addSpecialAlarmRule, editSpecialAlarmRule } from '@/api/home/rule/special' import { getDeviceListPage } from '@/api/home/device/device' import { getProductListPage } from '@/api/home/device/product' @@ -57,13 +57,15 @@ } const list = ref([]) const columns = ref([ - { text: '报警规则', value: 'alarmRule', align: 'center', type: 'select', code: 'alarm-rule', required: true }, + { text: '报警类型', value: 'alarmTypeId', align: 'center', type: 'select', code: 'alarm-rule', required: true }, { text: '报警等级', value: 'alarmLevelId', align: 'center', type: 'select', code: 'alarm-level', required: true }, { text: '报警阈值', value: 'alarmThreshold', align: 'center', type: 'input', required: true }, ]) // 初始化对话框 +const isFirst = ref(true) const initDialog = (dialogStatusValue: string, row: any) => { dialogStatus.value = dialogStatusValue + isFirst.value = true dialogFormVisible.value = true if (dialogStatus.value === 'create') { // 如果是新增,清除验证 resetForm() @@ -83,9 +85,13 @@ alarmRule: row.alarmRule, alarmLevelId: row.alarmLevelId, alarmThreshold: row.alarmThreshold, + alarmTypeId: row.alarmTypeId, }, ] } + setTimeout(() => { + isFirst.value = false + }) } defineExpose({ initDialog, @@ -143,6 +149,7 @@ const saveData = () => { const data = list.value.map((item: any) => ({ alarmLevelId: item.alarmLevelId, + alarmTypeId: item.alarmTypeId, alarmRule: item.alarmRule, alarmRuleName: `${item.alarmRule}[${alarmLevelList.value.filter((citem: any) => citem.id === item.alarmLevelId)[0]?.name || ''}]:${item.alarmThreshold}%LEL`, alarmThreshold: item.alarmThreshold, @@ -151,7 +158,7 @@ position: dataForm.value.position, tagNumber: dataForm.value.tagNumber, devTypeName: deviceList.value.filter((citem: any) => citem.value === dataForm.value.devcode)[0]?.name || '', - alarmTypeId: alarmRuleList.value.filter((citem: any) => citem.name === item.alarmRule)[0]?.alarmTypeId || '', + // alarmTypeId: alarmRuleList.value.filter((citem: any) => citem.name === item.alarmRule)[0]?.alarmTypeId || '', })) if (dialogStatus.value === 'edit') { updateData(data) @@ -207,7 +214,7 @@ // 设备列表 getDeviceListPage({ offset: 1, limit: 9999 }).then((res) => { deviceList.value = res.data.rows.map((item: any) => ({ - name: item.devTypeName, + name: item.typeName, id: item.id, value: item.devcode, productId: item.productId, @@ -223,14 +230,14 @@ })) }) // 报警规则 - getAlarmRuleListPage({ limit: 9999, offset: 1 }).then((res) => { - alarmRuleList.value = res.data.rows.map((item: any) => ({ - name: item.alarmName, - id: item.id, - value: item.id, - alarmTypeId: item.alarmTypeId, - })) - }) + // getAlarmRuleListPage({ limit: 9999, offset: 1 }).then((res) => { + // alarmRuleList.value = res.data.rows.map((item: any) => ({ + // name: item.alarmName, + // id: item.id, + // value: item.id, + // alarmTypeId: item.alarmTypeId, + // })) + // }) // 报警等级 getAlarmLevelListPage({ limit: 9999, offset: 1 }).then((res) => { alarmLevelList.value = res.data.rows.map((item: any) => ({ @@ -247,11 +254,26 @@ watch(() => dataForm.value.devcode, (newVal) => { if (newVal) { const current = deviceList.value.filter((item: any) => item.value === dataForm.value.devcode) + console.log(current, 'current') if (current.length) { dataForm.value.productId = current[0].productId dataForm.value.tagNumber = current[0].tagNumber dataForm.value.position = current[0].position + // 根据设备类型寻找报警类型 + getAlarmTypeListPage({ limit: 9999, offset: 1 }).then((res) => { + alarmRuleList.value = res.data.rows.filter((item: any) => item.deviceTypeName.includes(current[0].name)).map((item: any) => ({ + name: item.alarmType, + id: item.id, + value: item.id, + // alarmTypeId: item.id, + })) + }) } + if (isFirst.value) { + return + } + alarmRuleList.value = [] + list.value = [] } }, { deep: true, @@ -330,12 +352,12 @@ diff --git a/src/views/home/rule/special/index.vue b/src/views/home/rule/special/index.vue index 5c7b67c..7209dfa 100644 --- a/src/views/home/rule/special/index.vue +++ b/src/views/home/rule/special/index.vue @@ -99,6 +99,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -127,7 +128,7 @@ - + 新增 @@ -147,13 +148,13 @@ - + 查看 - + 编辑 - + 删除 diff --git a/src/App.vue b/src/App.vue index cde81b3..8a00f5d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -125,7 +125,7 @@ '--g-sub-sidebar-actual-width': subSidebarActualWidth, }" /> - + diff --git a/src/layouts/components/Tools/alarmDialog.vue b/src/layouts/components/Tools/alarmDialog.vue index 1828375..df89ab8 100644 --- a/src/layouts/components/Tools/alarmDialog.vue +++ b/src/layouts/components/Tools/alarmDialog.vue @@ -116,7 +116,7 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ @@ -336,7 +337,7 @@ - + 查看 diff --git a/src/views/home/operation/history/index.vue b/src/views/home/operation/history/index.vue index 5c04ff7..d96ac57 100644 --- a/src/views/home/operation/history/index.vue +++ b/src/views/home/operation/history/index.vue @@ -78,6 +78,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -161,6 +162,7 @@ fetchData() }) }) +const { proxy } = getCurrentInstance() as any @@ -218,7 +220,7 @@ - + 导出 @@ -241,7 +243,7 @@ - + 查看 diff --git a/src/views/home/operation/manufacturer/index.vue b/src/views/home/operation/manufacturer/index.vue index 4a5816a..5f647c3 100644 --- a/src/views/home/operation/manufacturer/index.vue +++ b/src/views/home/operation/manufacturer/index.vue @@ -75,6 +75,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -125,6 +126,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -178,7 +180,7 @@ - + 导出 diff --git a/src/views/home/operation/trajectory/index.vue b/src/views/home/operation/trajectory/index.vue index 9312fd7..606958e 100644 --- a/src/views/home/operation/trajectory/index.vue +++ b/src/views/home/operation/trajectory/index.vue @@ -65,6 +65,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -114,6 +115,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -175,7 +177,7 @@ - + 查看 diff --git a/src/views/home/pipeline/components/detailData.vue b/src/views/home/pipeline/components/detailData.vue index 80b6886..760b1c5 100644 --- a/src/views/home/pipeline/components/detailData.vue +++ b/src/views/home/pipeline/components/detailData.vue @@ -7,7 +7,13 @@ import type { TabsPaneContext } from 'element-plus' import monitorData from './monitorDataList.vue' import maintenanceRecord from '@/views/home/well/components/maintenanceRecord.vue' -const activeName = ref('监控数据') +const { proxy } = getCurrentInstance() as any +const activeName = ref( + proxy.hasPerm('/pipeline/monitor/data') + ? '监控数据' + : proxy.hasPerm('/pipeline/monitor/maintenance') + ? '监控设备维护记录' + : '') const handleClick = (tab: TabsPaneContext, event: Event) => { // console.log(tab, event) } @@ -15,10 +21,10 @@ - + - + diff --git a/src/views/home/pipeline/index.vue b/src/views/home/pipeline/index.vue index 90baef0..4d66e51 100644 --- a/src/views/home/pipeline/index.vue +++ b/src/views/home/pipeline/index.vue @@ -254,6 +254,7 @@ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 98 - 10 - 52 - 52 - 10 } }) +const { proxy } = getCurrentInstance() as any @@ -348,7 +349,7 @@ - + 导出 @@ -368,7 +369,7 @@ - + 查看 - + 新建 @@ -139,10 +140,10 @@ - + 编辑 - + 删除 diff --git a/src/views/home/rule/alarm/components/alarmLevelList.vue b/src/views/home/rule/alarm/components/alarmLevelList.vue index c8ffb7d..6c337c4 100644 --- a/src/views/home/rule/alarm/components/alarmLevelList.vue +++ b/src/views/home/rule/alarm/components/alarmLevelList.vue @@ -87,6 +87,7 @@ const cancel = () => { dialogFormVisible.value = false } +const { proxy } = getCurrentInstance() as any @@ -97,7 +98,7 @@ - + 新增 @@ -117,10 +118,10 @@ - + 编辑 - + 删除 diff --git a/src/views/home/rule/alarm/components/alarmTypeList.vue b/src/views/home/rule/alarm/components/alarmTypeList.vue index 2cbf110..aa0cfed 100644 --- a/src/views/home/rule/alarm/components/alarmTypeList.vue +++ b/src/views/home/rule/alarm/components/alarmTypeList.vue @@ -80,6 +80,7 @@ const cancel = () => { dialogFormVisible.value = false } +const { proxy } = getCurrentInstance() as any @@ -90,7 +91,7 @@ - + 新增 @@ -110,10 +111,10 @@ - + 编辑 - + 删除 diff --git a/src/views/home/rule/alarm/index.vue b/src/views/home/rule/alarm/index.vue index 110030c..4e66a34 100644 --- a/src/views/home/rule/alarm/index.vue +++ b/src/views/home/rule/alarm/index.vue @@ -20,11 +20,14 @@ // 初始展示列 const columns = ref([ { text: '报警类型', value: 'alarmTypeName', align: 'center' }, - { text: '报警名称', value: 'alarmName', align: 'center' }, - { text: '报警等级', value: 'alarmLevelName', align: 'center' }, - { text: '报警提示方式', value: 'alarmNoteMethodName', align: 'center' }, - { text: '状态', value: 'stateName', align: 'center', width: '130' }, - { text: '创建时间', value: 'ts', align: 'center' }, + { text: '设备类型', value: 'typeName', align: 'center' }, + { text: '产品', value: 'productName', align: 'center' }, + { text: '厂商', value: 'manufacturerName', align: 'center' }, + // { text: '报警名称', value: 'alarmName', align: 'center' }, + { text: '报警等级', value: 'alarmLevelName', align: 'center', width: '100' }, + { text: '报警提示方式', value: 'alarmNoteMethodName', align: 'center', width: '130', isCustom: true }, + { text: '状态', value: 'stateName', align: 'center', width: '100', isCustom: true }, + { text: '创建时间', value: 'ts', align: 'center', width: '200' }, ]) // 最终展示列 const columnsConfig = ref([]) @@ -158,6 +161,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -191,13 +195,13 @@ - + 报警类型管理 - + 报警等级管理 - + 新增 @@ -214,16 +218,28 @@ + + + + 消息提醒 + 弹窗提醒 + + + + 启用 + 未启用 + + - + {{ scope.row.state === '1' ? '停用' : '启用' }} - + 编辑 - + 删除 diff --git a/src/views/home/rule/special/components/editDialog.vue b/src/views/home/rule/special/components/editDialog.vue index bb494ec..5df205b 100644 --- a/src/views/home/rule/special/components/editDialog.vue +++ b/src/views/home/rule/special/components/editDialog.vue @@ -8,7 +8,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { getDictByCode } from '@/api/system/dict' import { getDeviceTypeListPage } from '@/api/home/device/type' -import { getAlarmLevelListPage, getAlarmRuleListPage } from '@/api/home/rule/alarm' +import { getAlarmLevelListPage, getAlarmTypeListPage } from '@/api/home/rule/alarm' import { addSpecialAlarmRule, editSpecialAlarmRule } from '@/api/home/rule/special' import { getDeviceListPage } from '@/api/home/device/device' import { getProductListPage } from '@/api/home/device/product' @@ -57,13 +57,15 @@ } const list = ref([]) const columns = ref([ - { text: '报警规则', value: 'alarmRule', align: 'center', type: 'select', code: 'alarm-rule', required: true }, + { text: '报警类型', value: 'alarmTypeId', align: 'center', type: 'select', code: 'alarm-rule', required: true }, { text: '报警等级', value: 'alarmLevelId', align: 'center', type: 'select', code: 'alarm-level', required: true }, { text: '报警阈值', value: 'alarmThreshold', align: 'center', type: 'input', required: true }, ]) // 初始化对话框 +const isFirst = ref(true) const initDialog = (dialogStatusValue: string, row: any) => { dialogStatus.value = dialogStatusValue + isFirst.value = true dialogFormVisible.value = true if (dialogStatus.value === 'create') { // 如果是新增,清除验证 resetForm() @@ -83,9 +85,13 @@ alarmRule: row.alarmRule, alarmLevelId: row.alarmLevelId, alarmThreshold: row.alarmThreshold, + alarmTypeId: row.alarmTypeId, }, ] } + setTimeout(() => { + isFirst.value = false + }) } defineExpose({ initDialog, @@ -143,6 +149,7 @@ const saveData = () => { const data = list.value.map((item: any) => ({ alarmLevelId: item.alarmLevelId, + alarmTypeId: item.alarmTypeId, alarmRule: item.alarmRule, alarmRuleName: `${item.alarmRule}[${alarmLevelList.value.filter((citem: any) => citem.id === item.alarmLevelId)[0]?.name || ''}]:${item.alarmThreshold}%LEL`, alarmThreshold: item.alarmThreshold, @@ -151,7 +158,7 @@ position: dataForm.value.position, tagNumber: dataForm.value.tagNumber, devTypeName: deviceList.value.filter((citem: any) => citem.value === dataForm.value.devcode)[0]?.name || '', - alarmTypeId: alarmRuleList.value.filter((citem: any) => citem.name === item.alarmRule)[0]?.alarmTypeId || '', + // alarmTypeId: alarmRuleList.value.filter((citem: any) => citem.name === item.alarmRule)[0]?.alarmTypeId || '', })) if (dialogStatus.value === 'edit') { updateData(data) @@ -207,7 +214,7 @@ // 设备列表 getDeviceListPage({ offset: 1, limit: 9999 }).then((res) => { deviceList.value = res.data.rows.map((item: any) => ({ - name: item.devTypeName, + name: item.typeName, id: item.id, value: item.devcode, productId: item.productId, @@ -223,14 +230,14 @@ })) }) // 报警规则 - getAlarmRuleListPage({ limit: 9999, offset: 1 }).then((res) => { - alarmRuleList.value = res.data.rows.map((item: any) => ({ - name: item.alarmName, - id: item.id, - value: item.id, - alarmTypeId: item.alarmTypeId, - })) - }) + // getAlarmRuleListPage({ limit: 9999, offset: 1 }).then((res) => { + // alarmRuleList.value = res.data.rows.map((item: any) => ({ + // name: item.alarmName, + // id: item.id, + // value: item.id, + // alarmTypeId: item.alarmTypeId, + // })) + // }) // 报警等级 getAlarmLevelListPage({ limit: 9999, offset: 1 }).then((res) => { alarmLevelList.value = res.data.rows.map((item: any) => ({ @@ -247,11 +254,26 @@ watch(() => dataForm.value.devcode, (newVal) => { if (newVal) { const current = deviceList.value.filter((item: any) => item.value === dataForm.value.devcode) + console.log(current, 'current') if (current.length) { dataForm.value.productId = current[0].productId dataForm.value.tagNumber = current[0].tagNumber dataForm.value.position = current[0].position + // 根据设备类型寻找报警类型 + getAlarmTypeListPage({ limit: 9999, offset: 1 }).then((res) => { + alarmRuleList.value = res.data.rows.filter((item: any) => item.deviceTypeName.includes(current[0].name)).map((item: any) => ({ + name: item.alarmType, + id: item.id, + value: item.id, + // alarmTypeId: item.id, + })) + }) } + if (isFirst.value) { + return + } + alarmRuleList.value = [] + list.value = [] } }, { deep: true, @@ -330,12 +352,12 @@ diff --git a/src/views/home/rule/special/index.vue b/src/views/home/rule/special/index.vue index 5c7b67c..7209dfa 100644 --- a/src/views/home/rule/special/index.vue +++ b/src/views/home/rule/special/index.vue @@ -99,6 +99,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -127,7 +128,7 @@ - + 新增 @@ -147,13 +148,13 @@ - + 查看 - + 编辑 - + 删除 diff --git a/src/views/home/station/control/index.vue b/src/views/home/station/control/index.vue index 4510922..6657c5d 100644 --- a/src/views/home/station/control/index.vue +++ b/src/views/home/station/control/index.vue @@ -71,6 +71,7 @@ }, ] }) +const { proxy } = getCurrentInstance() as any @@ -114,7 +115,7 @@ - + 云台控制 diff --git a/src/App.vue b/src/App.vue index cde81b3..8a00f5d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -125,7 +125,7 @@ '--g-sub-sidebar-actual-width': subSidebarActualWidth, }" /> - + diff --git a/src/layouts/components/Tools/alarmDialog.vue b/src/layouts/components/Tools/alarmDialog.vue index 1828375..df89ab8 100644 --- a/src/layouts/components/Tools/alarmDialog.vue +++ b/src/layouts/components/Tools/alarmDialog.vue @@ -116,7 +116,7 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@ @@ -336,7 +337,7 @@ - + 查看 diff --git a/src/views/home/operation/history/index.vue b/src/views/home/operation/history/index.vue index 5c04ff7..d96ac57 100644 --- a/src/views/home/operation/history/index.vue +++ b/src/views/home/operation/history/index.vue @@ -78,6 +78,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -161,6 +162,7 @@ fetchData() }) }) +const { proxy } = getCurrentInstance() as any @@ -218,7 +220,7 @@ - + 导出 @@ -241,7 +243,7 @@ - + 查看 diff --git a/src/views/home/operation/manufacturer/index.vue b/src/views/home/operation/manufacturer/index.vue index 4a5816a..5f647c3 100644 --- a/src/views/home/operation/manufacturer/index.vue +++ b/src/views/home/operation/manufacturer/index.vue @@ -75,6 +75,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -125,6 +126,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -178,7 +180,7 @@ - + 导出 diff --git a/src/views/home/operation/trajectory/index.vue b/src/views/home/operation/trajectory/index.vue index 9312fd7..606958e 100644 --- a/src/views/home/operation/trajectory/index.vue +++ b/src/views/home/operation/trajectory/index.vue @@ -65,6 +65,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -114,6 +115,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -175,7 +177,7 @@ - + 查看 diff --git a/src/views/home/pipeline/components/detailData.vue b/src/views/home/pipeline/components/detailData.vue index 80b6886..760b1c5 100644 --- a/src/views/home/pipeline/components/detailData.vue +++ b/src/views/home/pipeline/components/detailData.vue @@ -7,7 +7,13 @@ import type { TabsPaneContext } from 'element-plus' import monitorData from './monitorDataList.vue' import maintenanceRecord from '@/views/home/well/components/maintenanceRecord.vue' -const activeName = ref('监控数据') +const { proxy } = getCurrentInstance() as any +const activeName = ref( + proxy.hasPerm('/pipeline/monitor/data') + ? '监控数据' + : proxy.hasPerm('/pipeline/monitor/maintenance') + ? '监控设备维护记录' + : '') const handleClick = (tab: TabsPaneContext, event: Event) => { // console.log(tab, event) } @@ -15,10 +21,10 @@ - + - + diff --git a/src/views/home/pipeline/index.vue b/src/views/home/pipeline/index.vue index 90baef0..4d66e51 100644 --- a/src/views/home/pipeline/index.vue +++ b/src/views/home/pipeline/index.vue @@ -254,6 +254,7 @@ tableHeight.value = window.innerHeight - 60 - 50 - 10 - 98 - 10 - 52 - 52 - 10 } }) +const { proxy } = getCurrentInstance() as any @@ -348,7 +349,7 @@ - + 导出 @@ -368,7 +369,7 @@ - + 查看 - + 新建 @@ -139,10 +140,10 @@ - + 编辑 - + 删除 diff --git a/src/views/home/rule/alarm/components/alarmLevelList.vue b/src/views/home/rule/alarm/components/alarmLevelList.vue index c8ffb7d..6c337c4 100644 --- a/src/views/home/rule/alarm/components/alarmLevelList.vue +++ b/src/views/home/rule/alarm/components/alarmLevelList.vue @@ -87,6 +87,7 @@ const cancel = () => { dialogFormVisible.value = false } +const { proxy } = getCurrentInstance() as any @@ -97,7 +98,7 @@ - + 新增 @@ -117,10 +118,10 @@ - + 编辑 - + 删除 diff --git a/src/views/home/rule/alarm/components/alarmTypeList.vue b/src/views/home/rule/alarm/components/alarmTypeList.vue index 2cbf110..aa0cfed 100644 --- a/src/views/home/rule/alarm/components/alarmTypeList.vue +++ b/src/views/home/rule/alarm/components/alarmTypeList.vue @@ -80,6 +80,7 @@ const cancel = () => { dialogFormVisible.value = false } +const { proxy } = getCurrentInstance() as any @@ -90,7 +91,7 @@ - + 新增 @@ -110,10 +111,10 @@ - + 编辑 - + 删除 diff --git a/src/views/home/rule/alarm/index.vue b/src/views/home/rule/alarm/index.vue index 110030c..4e66a34 100644 --- a/src/views/home/rule/alarm/index.vue +++ b/src/views/home/rule/alarm/index.vue @@ -20,11 +20,14 @@ // 初始展示列 const columns = ref([ { text: '报警类型', value: 'alarmTypeName', align: 'center' }, - { text: '报警名称', value: 'alarmName', align: 'center' }, - { text: '报警等级', value: 'alarmLevelName', align: 'center' }, - { text: '报警提示方式', value: 'alarmNoteMethodName', align: 'center' }, - { text: '状态', value: 'stateName', align: 'center', width: '130' }, - { text: '创建时间', value: 'ts', align: 'center' }, + { text: '设备类型', value: 'typeName', align: 'center' }, + { text: '产品', value: 'productName', align: 'center' }, + { text: '厂商', value: 'manufacturerName', align: 'center' }, + // { text: '报警名称', value: 'alarmName', align: 'center' }, + { text: '报警等级', value: 'alarmLevelName', align: 'center', width: '100' }, + { text: '报警提示方式', value: 'alarmNoteMethodName', align: 'center', width: '130', isCustom: true }, + { text: '状态', value: 'stateName', align: 'center', width: '100', isCustom: true }, + { text: '创建时间', value: 'ts', align: 'center', width: '200' }, ]) // 最终展示列 const columnsConfig = ref([]) @@ -158,6 +161,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -191,13 +195,13 @@ - + 报警类型管理 - + 报警等级管理 - + 新增 @@ -214,16 +218,28 @@ + + + + 消息提醒 + 弹窗提醒 + + + + 启用 + 未启用 + + - + {{ scope.row.state === '1' ? '停用' : '启用' }} - + 编辑 - + 删除 diff --git a/src/views/home/rule/special/components/editDialog.vue b/src/views/home/rule/special/components/editDialog.vue index bb494ec..5df205b 100644 --- a/src/views/home/rule/special/components/editDialog.vue +++ b/src/views/home/rule/special/components/editDialog.vue @@ -8,7 +8,7 @@ import { ElMessage, ElMessageBox } from 'element-plus' import { getDictByCode } from '@/api/system/dict' import { getDeviceTypeListPage } from '@/api/home/device/type' -import { getAlarmLevelListPage, getAlarmRuleListPage } from '@/api/home/rule/alarm' +import { getAlarmLevelListPage, getAlarmTypeListPage } from '@/api/home/rule/alarm' import { addSpecialAlarmRule, editSpecialAlarmRule } from '@/api/home/rule/special' import { getDeviceListPage } from '@/api/home/device/device' import { getProductListPage } from '@/api/home/device/product' @@ -57,13 +57,15 @@ } const list = ref([]) const columns = ref([ - { text: '报警规则', value: 'alarmRule', align: 'center', type: 'select', code: 'alarm-rule', required: true }, + { text: '报警类型', value: 'alarmTypeId', align: 'center', type: 'select', code: 'alarm-rule', required: true }, { text: '报警等级', value: 'alarmLevelId', align: 'center', type: 'select', code: 'alarm-level', required: true }, { text: '报警阈值', value: 'alarmThreshold', align: 'center', type: 'input', required: true }, ]) // 初始化对话框 +const isFirst = ref(true) const initDialog = (dialogStatusValue: string, row: any) => { dialogStatus.value = dialogStatusValue + isFirst.value = true dialogFormVisible.value = true if (dialogStatus.value === 'create') { // 如果是新增,清除验证 resetForm() @@ -83,9 +85,13 @@ alarmRule: row.alarmRule, alarmLevelId: row.alarmLevelId, alarmThreshold: row.alarmThreshold, + alarmTypeId: row.alarmTypeId, }, ] } + setTimeout(() => { + isFirst.value = false + }) } defineExpose({ initDialog, @@ -143,6 +149,7 @@ const saveData = () => { const data = list.value.map((item: any) => ({ alarmLevelId: item.alarmLevelId, + alarmTypeId: item.alarmTypeId, alarmRule: item.alarmRule, alarmRuleName: `${item.alarmRule}[${alarmLevelList.value.filter((citem: any) => citem.id === item.alarmLevelId)[0]?.name || ''}]:${item.alarmThreshold}%LEL`, alarmThreshold: item.alarmThreshold, @@ -151,7 +158,7 @@ position: dataForm.value.position, tagNumber: dataForm.value.tagNumber, devTypeName: deviceList.value.filter((citem: any) => citem.value === dataForm.value.devcode)[0]?.name || '', - alarmTypeId: alarmRuleList.value.filter((citem: any) => citem.name === item.alarmRule)[0]?.alarmTypeId || '', + // alarmTypeId: alarmRuleList.value.filter((citem: any) => citem.name === item.alarmRule)[0]?.alarmTypeId || '', })) if (dialogStatus.value === 'edit') { updateData(data) @@ -207,7 +214,7 @@ // 设备列表 getDeviceListPage({ offset: 1, limit: 9999 }).then((res) => { deviceList.value = res.data.rows.map((item: any) => ({ - name: item.devTypeName, + name: item.typeName, id: item.id, value: item.devcode, productId: item.productId, @@ -223,14 +230,14 @@ })) }) // 报警规则 - getAlarmRuleListPage({ limit: 9999, offset: 1 }).then((res) => { - alarmRuleList.value = res.data.rows.map((item: any) => ({ - name: item.alarmName, - id: item.id, - value: item.id, - alarmTypeId: item.alarmTypeId, - })) - }) + // getAlarmRuleListPage({ limit: 9999, offset: 1 }).then((res) => { + // alarmRuleList.value = res.data.rows.map((item: any) => ({ + // name: item.alarmName, + // id: item.id, + // value: item.id, + // alarmTypeId: item.alarmTypeId, + // })) + // }) // 报警等级 getAlarmLevelListPage({ limit: 9999, offset: 1 }).then((res) => { alarmLevelList.value = res.data.rows.map((item: any) => ({ @@ -247,11 +254,26 @@ watch(() => dataForm.value.devcode, (newVal) => { if (newVal) { const current = deviceList.value.filter((item: any) => item.value === dataForm.value.devcode) + console.log(current, 'current') if (current.length) { dataForm.value.productId = current[0].productId dataForm.value.tagNumber = current[0].tagNumber dataForm.value.position = current[0].position + // 根据设备类型寻找报警类型 + getAlarmTypeListPage({ limit: 9999, offset: 1 }).then((res) => { + alarmRuleList.value = res.data.rows.filter((item: any) => item.deviceTypeName.includes(current[0].name)).map((item: any) => ({ + name: item.alarmType, + id: item.id, + value: item.id, + // alarmTypeId: item.id, + })) + }) } + if (isFirst.value) { + return + } + alarmRuleList.value = [] + list.value = [] } }, { deep: true, @@ -330,12 +352,12 @@ diff --git a/src/views/home/rule/special/index.vue b/src/views/home/rule/special/index.vue index 5c7b67c..7209dfa 100644 --- a/src/views/home/rule/special/index.vue +++ b/src/views/home/rule/special/index.vue @@ -99,6 +99,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -127,7 +128,7 @@ - + 新增 @@ -147,13 +148,13 @@ - + 查看 - + 编辑 - + 删除 diff --git a/src/views/home/station/control/index.vue b/src/views/home/station/control/index.vue index 4510922..6657c5d 100644 --- a/src/views/home/station/control/index.vue +++ b/src/views/home/station/control/index.vue @@ -71,6 +71,7 @@ }, ] }) +const { proxy } = getCurrentInstance() as any @@ -114,7 +115,7 @@ - + 云台控制 diff --git a/src/views/home/station/operation/index.vue b/src/views/home/station/operation/index.vue index 02a5e44..d3d3d09 100644 --- a/src/views/home/station/operation/index.vue +++ b/src/views/home/station/operation/index.vue @@ -71,6 +71,7 @@ } // 重置查询条件f const reset = () => { + datetimerange.value = [] listQuery.value = { limit: 20, offset: 1, @@ -121,6 +122,7 @@ await fetchDict() fetchData() }) +const { proxy } = getCurrentInstance() as any @@ -160,10 +162,10 @@ - + 新增 - + 导出 diff --git a/src/App.vue b/src/App.vue index cde81b3..8a00f5d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -125,7 +125,7 @@ '--g-sub-sidebar-actual-width': subSidebarActualWidth, }" /> - + diff --git a/src/layouts/components/Tools/alarmDialog.vue b/src/layouts/components/Tools/alarmDialog.vue index 1828375..df89ab8 100644 --- a/src/layouts/components/Tools/alarmDialog.vue +++ b/src/layouts/components/Tools/alarmDialog.vue @@ -116,7 +116,7 @@ diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index aacd6fa..97ced45 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -40,7 +40,7 @@ icon: 'ep:key', sidebar: false, breadcrumb: false, - // auth: '/fullscreen', + auth: '/fullscreen', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well/detail', + auth: '/well', }, }, ], diff --git a/src/views/home/alarm/count/components/locationAnalysis.vue b/src/views/home/alarm/count/components/locationAnalysis.vue index fc75b9e..bff1853 100644 --- a/src/views/home/alarm/count/components/locationAnalysis.vue +++ b/src/views/home/alarm/count/components/locationAnalysis.vue @@ -46,6 +46,7 @@ }) } fetchData() +const { proxy } = getCurrentInstance() as any @@ -75,6 +76,9 @@ 搜索 + + 导出 + diff --git a/src/views/home/alarm/current/components/detail.vue b/src/views/home/alarm/current/components/detail.vue index dd3b31a..4204c92 100644 --- a/src/views/home/alarm/current/components/detail.vue +++ b/src/views/home/alarm/current/components/detail.vue @@ -111,7 +111,7 @@ const res2 = await getAlarmTypeListPage({ offset: 1, limit: 9999 }); ($route.query.type === 'history' ? getAlarmDetail : getAlarmDetail)($route.query.id as string).then((res) => { detailInfo.value = toHumpObject(res.data) - detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '1' ? '报警' : '误报' + detailInfo.value.realAlarmName = detailInfo.value.realAlarm === '0' ? '是' : '否' detailInfo.value.alarmTypeName = res2.data.rows.filter((item: any) => item.id === detailInfo.value.alarmTypeId)[0]?.alarmType || '' detailInfo.value.alarmLevelName = res1.data.rows.filter((item: any) => item.id === detailInfo.value.alarmLevel)[0]?.alarmLevel || '' detailInfo.value.duration = detailInfo.value.ts && detailInfo.value.cancelTime ? getDateDiff(detailInfo.value.ts, detailInfo.value.cancelTime) : '' @@ -139,6 +139,7 @@ } // 点击经纬度展示地图 const mapRef = ref() +const { proxy } = getCurrentInstance() as any const showMap = (data: any) => { console.log(data, 'data') if (data.text === '位置') { @@ -148,6 +149,13 @@ 2: 'StationMonitorDetail', 3: 'PipelineMonitorDetail', } as { [key: string]: string } + // 判断是否有菜单权限 + const watchObjectAuth = { + 1: '/well', + 2: '/station/monitor', + 3: '/pipeline', + } as { [key: string]: string } + if (!proxy.hasPerm(watchObjectAuth[detailInfo.value.watchObject])) { return } $router.push({ name: watchObject[detailInfo.value.watchObject], query: { diff --git a/src/views/home/alarm/current/components/detailInfoDialog.vue b/src/views/home/alarm/current/components/detailInfoDialog.vue index c089449..7fbf06b 100644 --- a/src/views/home/alarm/current/components/detailInfoDialog.vue +++ b/src/views/home/alarm/current/components/detailInfoDialog.vue @@ -114,6 +114,7 @@ }) } defineExpose({ initDialog, close }) +const { proxy } = getCurrentInstance() as any @@ -131,7 +132,7 @@ {{ info.alarmContent }} - >>更多 + >>更多 @@ -162,7 +163,7 @@ 报警设备: {{ info.devcode }} 查看数据 @@ -228,7 +229,7 @@ {{ info.confirmContent }} - + 流程图 @@ -246,17 +247,17 @@