xiaohuo 8 months ago
commit 1403426e9f
  1. BIN
      ALOps_sys_fe/alops-ui/public/favicon.ico
  2. 1
      ALOps_sys_fe/alops-ui/public/index.html
  3. 10
      ALOps_sys_fe/alops-ui/src/api/QandA/Aiassistant.js
  4. BIN
      ALOps_sys_fe/alops-ui/src/assets/logo/logo.png
  5. 2
      ALOps_sys_fe/alops-ui/src/views/QandA/Aiassistant/index.vue
  6. 107
      ALOps_sys_fe/alops-ui/src/views/device/deviceInformation/index.vue
  7. 8
      ALOps_sys_fe/alops-ui/src/views/device/files/index.vue
  8. 4
      ALOps_sys_fe/alops-ui/src/views/inMonitoring/devicesState/cardItem.vue
  9. 9
      ALOps_sys_fe/alops-ui/src/views/inMonitoring/devicesState/detail.vue
  10. 5
      ALOps_sys_fe/alops-ui/src/views/inMonitoring/devicesState/interface.vue
  11. 69
      ALOps_sys_fe/alops-ui/src/views/inMonitoring/inMonitor/message/index.vue
  12. 2
      ALOps_sys_fe/alops-ui/src/views/inMonitoring/inMonitor/rules/index.vue
  13. 70
      ALOps_sys_fe/alops-ui/src/views/index.vue
  14. 2
      ALOps_sys_fe/alops-ui/src/views/message/index.vue

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

@ -5,7 +5,6 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit"> <meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<title><%= webpackConfig.name %></title> <title><%= webpackConfig.name %></title>
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]--> <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->

@ -10,6 +10,16 @@ export function getDict() {
}) })
} }
// knowledgeAsk
export function knowledgeAsk(data) {
return request({
url: '/QandA/knowledge/ask',
method: 'post',
data: data
})
}
// 查询列表 // 查询列表
export function list(query) { export function list(query) {
return request({ return request({

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 91 KiB

@ -43,7 +43,7 @@
</template> </template>
<script> <script>
import { knowledgeAsk } from "@/api/inMonitoring/assessment" import { knowledgeAsk } from "@/api/QandA/Aiassistant"
import { getToken } from "@/utils/auth" import { getToken } from "@/utils/auth"
import Treeselect from "@riophae/vue-treeselect" import Treeselect from "@riophae/vue-treeselect"
import "@riophae/vue-treeselect/dist/vue-treeselect.css" import "@riophae/vue-treeselect/dist/vue-treeselect.css"

@ -19,23 +19,32 @@
<el-row v-if="queryParams.ruleType == 0"> <el-row v-if="queryParams.ruleType == 0">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="采集频率" prop="frequency"> <el-form-item label="采集间隔" prop="frequency">
<el-input-number v-model="queryParams.frequency" controls-position="right" :min="1"></el-input-number> <el-input-number v-model="queryParams.frequency" controls-position="right" :min="1"></el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="采集时间限制" prop="dateRange"> <el-form-item label="采集时间限制">
<el-date-picker <el-date-picker
v-model="queryParams.dateRange" v-model="queryParams.startTime"
@change="handleDateRangeChange" @change="handleStartTimeChange"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange" type="datetime"
range-separator="至" placeholder="开始日期"
start-placeholder="开始日期" :required="true"
end-placeholder="结束日期"
:picker-options="{ disabledDate: disablePastDate }" :picker-options="{ disabledDate: disablePastDate }"
> >
</el-date-picker> </el-date-picker>
<span style="margin: 0 10px;"></span>
<el-date-picker
v-model="queryParams.endTime"
@change="handleEndTimeChange"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
placeholder="结束日期"
:picker-options="endDatePickerOptions"
>
</el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -105,17 +114,22 @@ export default {
frequency: 1, frequency: 1,
gatherTime: null, gatherTime: null,
startTime: null, startTime: null,
endTime: null, endTime: null
// },
dateRange: [], //
endDatePickerOptions: {
disabledDate: (time) => {
//
if (this.queryParams.startTime) {
const startDate = new Date(this.queryParams.startTime).getTime();
return time.getTime() < startDate;
}
return false;
}
}, },
// //
rules: { rules: {}
dateRange: [
{ required: true, message: "采集时间不能为空", trigger: "blur" }
],
}
} }
}, },
watch: { watch: {
@ -139,20 +153,33 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm: function() { submitForm: function() {
this.$refs["form"].validate(valid => { //
if (valid) { if (!this.queryParams.startTime) {
this.$message.warning("请选择开始日期");
return;
}
//
if (this.queryParams.endTime && this.queryParams.startTime) {
const endTime = new Date(this.queryParams.endTime).getTime();
const startTime = new Date(this.queryParams.startTime).getTime();
if (endTime < startTime) {
this.$message.warning("结束时间不能早于开始时间");
return;
}
}
addRule(this.queryParams).then(response => { addRule(this.queryParams).then(response => {
this.$modal.msgSuccess("新增成功") this.$modal.msgSuccess("新增成功")
this.open = false this.open = false
this.getList() this.getList()
}) })
}
})
}, },
handleDateRangeChange(value) { //
// handleStartTimeChange(value) {
if (value && value[0]) { if (value) {
const selectedDate = new Date(value[0]); const selectedDate = new Date(value);
const now = new Date(); const now = new Date();
const today = new Date(now.getFullYear(), now.getMonth(), now.getDate()); const today = new Date(now.getFullYear(), now.getMonth(), now.getDate());
const selectedDay = new Date(selectedDate.getFullYear(), selectedDate.getMonth(), selectedDate.getDate()); const selectedDay = new Date(selectedDate.getFullYear(), selectedDate.getMonth(), selectedDate.getDate());
@ -171,18 +198,32 @@ export default {
nextMinute.getMinutes().toString().padStart(2, '0') + ':' + nextMinute.getMinutes().toString().padStart(2, '0') + ':' +
nextMinute.getSeconds().toString().padStart(2, '0'); nextMinute.getSeconds().toString().padStart(2, '0');
// this.queryParams.startTime = formattedDate;
const newRange = [formattedDate, value[1] || formattedDate]; }
this.queryParams.dateRange = newRange;
this.queryParams.startTime = newRange[0]; //
this.queryParams.endTime = newRange[1]; if (this.queryParams.endTime) {
return; const endTime = new Date(this.queryParams.endTime).getTime();
const startTime = new Date(this.queryParams.startTime).getTime();
if (endTime < startTime) {
this.queryParams.endTime = null;
}
} }
} }
},
//
handleEndTimeChange(value) {
//
if (value && this.queryParams.startTime) {
const endTime = new Date(value).getTime();
const startTime = new Date(this.queryParams.startTime).getTime();
// if (endTime < startTime) {
this.queryParams.startTime = value ? value[0] : null; this.queryParams.endTime = this.queryParams.startTime;
this.queryParams.endTime = value ? value[1] : null; }
}
}, },
// //

@ -346,7 +346,8 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
name: undefined, name: undefined,
status: undefined status: undefined,
floor: undefined
}, },
// //
rules: { rules: {
@ -408,6 +409,11 @@ export default {
} }
}, },
created() { created() {
// floor
const floor = this.$route.query.floor;
if (floor) {
this.queryParams.floor = floor;
}
this.getList() this.getList()
this.getDeviceTypeList() this.getDeviceTypeList()
this.getDeviceManuList() this.getDeviceManuList()

@ -10,9 +10,9 @@
<i class="fas fa-network-wired"></i> <i class="fas fa-network-wired"></i>
{{cardData.name}} {{cardData.name}}
</h2> </h2>
<span class="status-badge " :class="cardData.status ? 'status-online' : 'status-danger'"> <span class="status-badge " :class="cardData.status == 1 ? 'status-online' : 'status-danger'">
<i class="fas fa-circle"></i> <i class="fas fa-circle"></i>
{{ cardData.status ? '正常' : '停用' }} {{ cardData.status == 1 ? '在线' : '离线' }}
</span> </span>
</div> </div>

@ -9,9 +9,9 @@
<i class="fas fa-network-wired"></i> <i class="fas fa-network-wired"></i>
{{details.name}} {{details.name}}
</h2> </h2>
<span class="status-badge " :class="details.status ? 'status-online' : 'status-danger'"> <span class="status-badge " :class="details.status == 1 ? 'status-online' : 'status-danger'">
<i class="fas fa-circle"></i> <i class="fas fa-circle"></i>
{{ details.status ? '正常' : '停用' }} {{ details.status == 1 ? '在线' : '离线' }}
</span> </span>
</div> </div>
<div class="top-section-con"> <div class="top-section-con">
@ -112,7 +112,7 @@
<span class="info-label"> <span class="info-label">
<i class="fas fa-layer-group"></i> 安装日期 <i class="fas fa-layer-group"></i> 安装日期
</span> </span>
<span class="info-value">{{parseTime(details.installDate) || '暂无'}}</span> <span class="info-value">{{details.installDate || '暂无'}}</span>
</div> </div>
<div class="info-item"> <div class="info-item">
<span class="info-label"> <span class="info-label">
@ -141,7 +141,7 @@
<span class="info-label"> <span class="info-label">
<i class="fas fa-layer-group"></i> 预警总数 <i class="fas fa-layer-group"></i> 预警总数
</span> </span>
<span class="info-value">{{details.handledAlertCount || '暂无'}}</span> <span class="info-value">{{details.alertCount || '暂无'}}</span>
</div> </div>
</div> </div>
</div> </div>
@ -1050,6 +1050,7 @@ mounted() {
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 600;
color: #2d3748; color: #2d3748;
padding-left: 18px;
} }
.chart-container { .chart-container {

@ -58,6 +58,11 @@
<span>{{ scope.row.rate !== undefined && scope.row.rate !== null ? scope.row.rate : '--' }}</span> <span>{{ scope.row.rate !== undefined && scope.row.rate !== null ? scope.row.rate : '--' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="端口是否运行" align="center" key="running" prop="running" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ scope.row.running == '1' ? 'up' : scope.row.running == '2' ? 'down' : '--' }}</span>
</template>
</el-table-column>
</el-table> </el-table>
</el-col> </el-col>
</el-row> </el-row>

@ -44,27 +44,31 @@
width="60" width="60"
type="index" type="index"
></el-table-column> ></el-table-column>
<el-table-column label="预警时间" align="center" key="occurTime" prop="occurTime" /> <el-table-column label="预警时间" align="center" key="occurTime" prop="occurTime" :show-overflow-tooltip="true" />
<el-table-column label="预警等级" align="center" key="level" prop="level" :show-overflow-tooltip="true" /> <el-table-column label="预警等级" align="center" key="level" prop="level" :show-overflow-tooltip="true" />
<el-table-column label="预警信息" align="center" key="message" prop="message" width="200" /> <el-table-column label="预警信息" align="center" key="message" prop="message" width="200" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span @click="showContentDialog('预警信息', scope.row.message)" class="clickable-cell">{{ scope.row.message || '--' }}</span>
</template>
</el-table-column>
<el-table-column label="预警状态" align="center" key="status"> <el-table-column label="预警状态" align="center" key="status">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.alert_message_status" :value="scope.row.status"/> <dict-tag :options="dict.type.alert_message_status" :value="scope.row.status"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="处理人" align="center" key="handler" prop="handler" width="120" > <el-table-column label="处理人" align="center" key="handler" prop="handler" width="120" :show-overflow-tooltip="true" >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.handler || '--' }}</span> <span>{{ scope.row.handler || '--' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="处理时间" align="center" prop="handleTime" width="160"> <el-table-column label="处理时间" align="center" prop="handleTime" width="160" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.handleTime) || '--' }}</span> <span>{{ parseTime(scope.row.handleTime) || '--' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="解决方案" align="center" key="solution" prop="solution" :show-overflow-tooltip="true" > <el-table-column label="解决方案" align="center" key="solution" prop="solution" :show-overflow-tooltip="true" >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.solution || '--'}}</span> <span @click="showContentDialog('解决方案', scope.row.solution)" class="clickable-cell">{{ scope.row.solution || '--'}}</span>
</template> </template>
</el-table-column> </el-table-column>
@ -98,12 +102,21 @@
</el-row> </el-row>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</span> </span>
</el-dialog>
<!-- 内容查看弹窗 -->
<el-dialog :title="contentDialogTitle" :visible.sync="contentDialogVisible" width="600px" append-to-body :close-on-click-modal="false">
<div class="content-display">
<p v-bind:style="contentStyles">{{ contentDialogContent }}</p>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="contentDialogVisible = false"> </el-button>
</span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -148,6 +161,17 @@ export default {
deptName: undefined, deptName: undefined,
// //
initPassword: undefined, initPassword: undefined,
//
contentDialogVisible: false,
contentDialogTitle: '',
contentDialogContent: '',
//
contentStyles: {
wordBreak: 'break-all',
whiteSpace: 'pre-wrap',
fontSize: '14px',
lineHeight: '1.8'
},
// //
dateRange: [], dateRange: [],
// //
@ -180,7 +204,8 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
name: undefined, name: undefined,
status: undefined status: undefined,
level: undefined
}, },
// //
rules: { rules: {
@ -200,6 +225,11 @@ export default {
} }
}, },
created() { created() {
// level
const level = this.$route.query.level;
if (level) {
this.queryParams.level = level;
}
this.getList() this.getList()
}, },
methods: { methods: {
@ -325,7 +355,32 @@ export default {
// //
submitFileForm() { submitFileForm() {
this.$refs.upload.submit() this.$refs.upload.submit()
},
/** 显示内容弹窗 */
showContentDialog(title, content) {
//
if (content && content.trim() !== '') {
this.contentDialogTitle = title;
this.contentDialogContent = content;
this.contentDialogVisible = true;
}
} }
} }
} }
</script> </script>
<style scoped>
.clickable-cell {
cursor: pointer;
color: #409EFF;
text-decoration: underline;
}
.clickable-cell:hover {
color: #66b1ff;
}
.content-display {
max-height: 400px;
overflow-y: auto;
}
</style>

@ -299,7 +299,7 @@ export default {
}, },
methods: { methods: {
findParamName(paramName) { findParamName(paramName) {
const item = this.byTableData.find(item => item.paramName == paramName); const item = this.byTableData.find(item => item.columnName == paramName);
return item ? item.paramName : ''; return item ? item.paramName : '';
}, },
/** 查询设备列表 */ /** 查询设备列表 */

@ -3,7 +3,7 @@
<div id="app" class="dashboard" style="overflow-x: hidden;"> <div id="app" class="dashboard" style="overflow-x: hidden;">
<div class="header"> <div class="header">
<h1>设备监控中心大屏 - 智能管理版</h1> <h1>唐山烟草网络设备智能监管平台</h1>
<div class="time-display">{{ currentTime }}</div> <div class="time-display">{{ currentTime }}</div>
</div> </div>
@ -37,7 +37,7 @@
<div class="floor-device-grid"> <div class="floor-device-grid">
<div v-for="floor in floorDeviceDistribution" <div v-for="floor in floorDeviceDistribution"
:key="floor.level" :key="floor.level"
class="floor-device-card"> class="floor-device-card" @click="jumpToDeviceFiles(floor.floor)">
<div class="floor-level">{{ floor.floor }}</div> <div class="floor-level">{{ floor.floor }}</div>
<div class="floor-count">{{ floor.count }}</div> <div class="floor-count">{{ floor.count }}</div>
</div> </div>
@ -52,11 +52,11 @@
<div class="panel"> <div class="panel">
<div class="panel-title">设备信息统计</div> <div class="panel-title">设备信息统计</div>
<div class="device-stats-container"> <div class="device-stats-container">
<div class="device-stat-item"> <div class="device-stat-item clickable-item" @click="goToDeviceFiles">
<div class="device-stat-value">{{ totalDevices }}</div> <div class="device-stat-value">{{ totalDevices }}</div>
<div class="device-stat-label">设备总数</div> <div class="device-stat-label">设备总数</div>
</div> </div>
<div class="device-stat-item"> <div class="device-stat-item clickable-item" @click="goToDeviceStateMonitor">
<div class="device-stat-value">{{ onlineDevices }}</div> <div class="device-stat-value">{{ onlineDevices }}</div>
<div class="device-stat-label">在线设备数</div> <div class="device-stat-label">在线设备数</div>
</div> </div>
@ -377,6 +377,19 @@ export default {
this.refreshDeviceStatus(); this.refreshDeviceStatus();
}, 60000); }, 60000);
}, },
activated() {
//
this.refreshDeviceStatus();
this.loadDeviceTypeData();
this.loadAlertStatistics();
this.loadAlertTimes();
this.loadFloorDeviceDistribution();
this.updateTimeDisplay();
//
this.updateTime = this.currentTime;
},
beforeDestroy() { beforeDestroy() {
// //
window.removeEventListener('resize', this.handleResize); window.removeEventListener('resize', this.handleResize);
@ -385,6 +398,14 @@ export default {
} }
}, },
methods: { methods: {
//
goToDeviceFiles() {
this.$router.push('/device/files');
},
//
goToDeviceStateMonitor() {
this.$router.push('/inMonitoring/devicesState');
},
// 23:59:59 // 23:59:59
handleDateRangeChange(range) { handleDateRangeChange(range) {
if (range && range.length === 2) { if (range && range.length === 2) {
@ -868,6 +889,37 @@ export default {
} else { } else {
this.warningLevelFilter = level; this.warningLevelFilter = level;
} }
//
if (level === 'annual') {
this.$router.push('/inMonitoring/inMonitoring/message');
}
// 1-3
else if (level === 'level1') {
this.$router.push({
path: '/inMonitoring/inMonitoring/message',
query: { level: '1' }
});
}
else if (level === 'level2') {
this.$router.push({
path: '/inMonitoring/inMonitoring/message',
query: { level: '2' }
});
}
else if (level === 'level3') {
this.$router.push({
path: '/inMonitoring/inMonitoring/message',
query: { level: '3' }
});
}
},
//
jumpToDeviceFiles(floor) {
this.$router.push({
path: '/device/files',
query: { floor: floor }
});
}, },
refreshDeviceStatus() { refreshDeviceStatus() {
@ -992,6 +1044,16 @@ export default {
box-sizing: border-box; box-sizing: border-box;
} }
/* 可点击元素的样式 */
.clickable-item {
cursor: pointer;
transition: all 0.3s;
}
.clickable-item:hover {
background-color: #f0f9ff;
}
.dashboard { .dashboard {
width: 100%; width: 100%;
min-height: 100%; min-height: 100%;

@ -82,7 +82,7 @@ export default {
getList() { getList() {
this.loading = true this.loading = true
messageList(this.queryParams).then(response => { messageList(this.queryParams).then(response => {
this.dataList = response.data || [] this.dataList = response.rows || []
this.total = response.data?.length || 0 this.total = response.data?.length || 0
this.loading = false this.loading = false
} }

Loading…
Cancel
Save