Merge branch 'master-dev' of http://git.hivekion.com:3000/xiaoguangbin/AnalysisSystemForRadionuclide_vue into master-dev
This commit is contained in:
commit
2a0be5104b
|
@ -13,9 +13,7 @@ import xss from "xss"
|
||||||
<a-button v-if="record.openType === 'url'" type="primary" @click="toHandle">去处理</a-button>
|
<a-button v-if="record.openType === 'url'" type="primary" @click="toHandle">去处理</a-button>
|
||||||
</template>
|
</template>
|
||||||
<a-card class="daily-article" :loading="loading">
|
<a-card class="daily-article" :loading="loading">
|
||||||
<a-card-meta
|
<a-card-meta :title="record.titile" :description="'发布人:' + record.sender + ' 发布时间: ' + record.sendTime">
|
||||||
:title="record.titile"
|
|
||||||
:description="'发布人:'+record.sender + ' 发布时间: ' + record.sendTime">
|
|
||||||
</a-card-meta>
|
</a-card-meta>
|
||||||
<a-divider />
|
<a-divider />
|
||||||
<span v-html="record.msgContent" class="article-content"></span>
|
<span v-html="record.msgContent" class="article-content"></span>
|
||||||
|
@ -27,12 +25,11 @@ import xss from "xss"
|
||||||
import { getUserList } from '@/api/api'
|
import { getUserList } from '@/api/api'
|
||||||
import xss from 'xss'
|
import xss from 'xss'
|
||||||
export default {
|
export default {
|
||||||
name: "SysAnnouncementModal",
|
name: 'SysAnnouncementModal',
|
||||||
components: {
|
components: {},
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title:"通知消息",
|
title: '通知消息',
|
||||||
record: {},
|
record: {},
|
||||||
labelCol: {
|
labelCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
|
@ -46,41 +43,39 @@ import xss from "xss"
|
||||||
switchFullscreen: true,
|
switchFullscreen: true,
|
||||||
loading: false,
|
loading: false,
|
||||||
bodyStyle: {
|
bodyStyle: {
|
||||||
padding: "0",
|
padding: '0',
|
||||||
height:(window.innerHeight*0.8)+"px",
|
height: window.innerHeight * 0.8 + 'px',
|
||||||
"overflow-y":"auto",
|
'overflow-y': 'auto',
|
||||||
|
|
||||||
},
|
},
|
||||||
modelStyle: {
|
modelStyle: {
|
||||||
width: '60%',
|
width: '60%',
|
||||||
style: { top: '20px' },
|
style: { top: '20px' },
|
||||||
fullScreen: false
|
fullScreen: false,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created() {},
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
detail(record) {
|
detail(record) {
|
||||||
//update-begin---author:wangshuai ---date:20220107 for:将其它页面传递过来的用户名改成用户真实姓名
|
//update-begin---author:wangshuai ---date:20220107 for:将其它页面传递过来的用户名改成用户真实姓名
|
||||||
if (record.sender) {
|
if (record.sender) {
|
||||||
getUserList({"username":record.sender}).then((res) =>{
|
getUserList({ username: record.sender }).then((res) => {
|
||||||
if (res.success && res.result.records.length > 0) {
|
if (res.success && res.result.records.length > 0) {
|
||||||
record.sender = res.result.records[0].realname
|
record.sender = res.result.records[0].realname
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//update-end---author:wangshuai ---date:20220107 for:将其它页面传递过来的用户名改成用户真实姓名
|
//update-end---author:wangshuai ---date:20220107 for:将其它页面传递过来的用户名改成用户真实姓名
|
||||||
this.visible = true;
|
this.visible = true
|
||||||
//update-begin-author:taoyan date:2022-7-14 for: VUEN-1702 【禁止问题】sql注入漏洞
|
//update-begin-author:taoyan date:2022-7-14 for: VUEN-1702 【禁止问题】sql注入漏洞
|
||||||
if (record.msgContent) {
|
if (record.msgContent) {
|
||||||
record.msgContent = xss(record.msgContent)
|
record.msgContent = xss(record.msgContent)
|
||||||
}
|
}
|
||||||
//update-end-author:taoyan date:2022-7-14 for: VUEN-1702 【禁止问题】sql注入漏洞
|
//update-end-author:taoyan date:2022-7-14 for: VUEN-1702 【禁止问题】sql注入漏洞
|
||||||
this.record = record;
|
this.record = record
|
||||||
},
|
},
|
||||||
handleCancel() {
|
handleCancel() {
|
||||||
this.visible = false;
|
this.visible = false
|
||||||
},
|
},
|
||||||
/** 切换全屏显示 */
|
/** 切换全屏显示 */
|
||||||
handleClickToggleFullScreen() {
|
handleClickToggleFullScreen() {
|
||||||
|
@ -96,12 +91,12 @@ import xss from "xss"
|
||||||
},
|
},
|
||||||
toHandle() {
|
toHandle() {
|
||||||
if (this.record.openType === 'url') {
|
if (this.record.openType === 'url') {
|
||||||
this.visible = false;
|
this.visible = false
|
||||||
//链接跳转
|
//链接跳转
|
||||||
this.$router.push({ path: this.record.openPage })
|
this.$router.push({ path: this.record.openPage })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -127,6 +122,9 @@ import xss from "xss"
|
||||||
border-bottom: 0;
|
border-bottom: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.ant-card-meta-description {
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
.daily-article {
|
.daily-article {
|
||||||
|
@ -148,8 +146,8 @@ import xss from "xss"
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
text-overflow: initial;
|
text-overflow: initial;
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
font-size: .9rem !important;
|
font-size: 0.9rem !important;
|
||||||
margin-bottom: .8rem;
|
margin-bottom: 0.8rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -188,10 +188,9 @@ body {
|
||||||
}
|
}
|
||||||
&-time-picker-combobox {
|
&-time-picker-combobox {
|
||||||
background-color: @modalBg !important;
|
background-color: @modalBg !important;
|
||||||
border-color: @formInputBorderColor !important
|
border-color: @formInputBorderColor !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
&-picker {
|
&-picker {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
&-container {
|
&-container {
|
||||||
|
@ -202,7 +201,7 @@ body {
|
||||||
color: #00e9fe !important;
|
color: #00e9fe !important;
|
||||||
}
|
}
|
||||||
&-select {
|
&-select {
|
||||||
background-color: @formInputBgColor !important
|
background-color: @formInputBgColor !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -341,7 +340,8 @@ body {
|
||||||
|
|
||||||
&-selected-day &-date,
|
&-selected-day &-date,
|
||||||
&-date:hover {
|
&-date:hover {
|
||||||
background-color: #072f32 !important;
|
background-color: #0b4f54 !important;
|
||||||
|
// background-color: #072f32 !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -813,7 +813,6 @@ export default {
|
||||||
&-item {
|
&-item {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
// background: #ade6ee;
|
|
||||||
&-chart {
|
&-chart {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - 40px);
|
height: calc(100% - 40px);
|
||||||
|
@ -831,7 +830,7 @@ export default {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
margin-left: 10px;
|
// margin-left: 5px;
|
||||||
span {
|
span {
|
||||||
color: #00e9fe;
|
color: #00e9fe;
|
||||||
background: none;
|
background: none;
|
||||||
|
|
|
@ -1,17 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<a-modal
|
<a-modal title="Add Rule" :width="845" v-model="visible" @cancel="onCancel">
|
||||||
title='Add Rule'
|
<a-form-model ref="al_ruleForm" :model="form" :rules="rules" layout="vertical">
|
||||||
:width="845"
|
|
||||||
v-model="visible"
|
|
||||||
@cancel="onCancel"
|
|
||||||
>
|
|
||||||
<a-form-model
|
|
||||||
ref="al_ruleForm"
|
|
||||||
:model="form"
|
|
||||||
:rules="rules"
|
|
||||||
layout="vertical"
|
|
||||||
>
|
|
||||||
<a-row :gutter="[15, 0]">
|
<a-row :gutter="[15, 0]">
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-model-item ref="sourceType" label="Source Type" prop="sourceType">
|
<a-form-model-item ref="sourceType" label="Source Type" prop="sourceType">
|
||||||
|
@ -124,125 +114,109 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getAction, postAction, httpAction, deleteAction } from '@/api/manage'
|
import { getAction } from '@/api/manage'
|
||||||
export default {
|
export default {
|
||||||
props: ["visible","serverList","currServer","serverLabel"],
|
props: ['visible', 'serverList', 'currServer', 'serverLabel'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
form: {
|
form: {
|
||||||
sourceType: "Server",
|
sourceType: 'Server',
|
||||||
sourceId: undefined,
|
sourceId: undefined,
|
||||||
name: "",
|
name: '',
|
||||||
itemId: undefined,
|
itemId: undefined,
|
||||||
operator: undefined,
|
operator: undefined,
|
||||||
threshold: "",
|
threshold: '',
|
||||||
silenceCycle: undefined,
|
silenceCycle: undefined,
|
||||||
contactId: undefined,
|
contactId: undefined,
|
||||||
},
|
},
|
||||||
units: "",
|
units: '',
|
||||||
itemOptions: [],
|
itemOptions: [],
|
||||||
typeOptions: [
|
typeOptions: [
|
||||||
{
|
{
|
||||||
label: "Server",
|
label: 'Server',
|
||||||
value: "Server"
|
value: 'Server',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Database",
|
label: 'Database',
|
||||||
value: "Database"
|
value: 'Database',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "E-MAIL",
|
label: 'E-MAIL',
|
||||||
value: "Email"
|
value: 'Email',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
sourceOptions: [],
|
sourceOptions: [],
|
||||||
operatorOptions: [
|
operatorOptions: [
|
||||||
{
|
{
|
||||||
label: ">",
|
label: '>',
|
||||||
value: ">"
|
value: '>',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "<",
|
label: '<',
|
||||||
value: "<"
|
value: '<',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: ">=",
|
label: '>=',
|
||||||
value: ">="
|
value: '>=',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "<=",
|
label: '<=',
|
||||||
value: "<="
|
value: '<=',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "==",
|
label: '==',
|
||||||
value: "=="
|
value: '==',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
silenceCyclerOptions: [
|
silenceCyclerOptions: [
|
||||||
{
|
{
|
||||||
label: "5 minutes",
|
label: '5 minutes',
|
||||||
value: 300
|
value: 300,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "15 minutes",
|
label: '15 minutes',
|
||||||
value: 900
|
value: 900,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "30 minutes",
|
label: '30 minutes',
|
||||||
value: 1800
|
value: 1800,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "60 minutes",
|
label: '60 minutes',
|
||||||
value: 3600
|
value: 3600,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "3 hours",
|
label: '3 hours',
|
||||||
value: 10800
|
value: 10800,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "6 hours",
|
label: '6 hours',
|
||||||
value: 21600
|
value: 21600,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "12 hours",
|
label: '12 hours',
|
||||||
value: 43200
|
value: 43200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "24 hours",
|
label: '24 hours',
|
||||||
value: 86400
|
value: 86400,
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
contactGroupOptions: [],
|
contactGroupOptions: [],
|
||||||
rules: {
|
rules: {
|
||||||
sourceType: [
|
sourceType: [{ required: true, message: 'Please select a sourceType', trigger: 'change' }],
|
||||||
{ required: true, message: 'Please select a sourceType', trigger: 'change'},
|
sourceId: [{ required: true, message: 'Please select a source', trigger: 'change' }],
|
||||||
],
|
name: [{ required: true, message: 'Please input alarmRule name' }],
|
||||||
sourceId: [
|
itemId: [{ required: true, message: 'Please select a monitorItem', trigger: 'change' }],
|
||||||
{ required: true, message: 'Please select a source', trigger: 'change'},
|
operator: [{ required: true, message: 'Please select a logicSymbol', trigger: 'change' }],
|
||||||
],
|
threshold: [{ required: true, message: 'Please input threshold' }],
|
||||||
name: [
|
silenceCycle: [{ required: true, message: 'Please select a silenceCycle', trigger: 'change' }],
|
||||||
{ required: true, message: 'Please input alarmRule name'},
|
contactId: [{ required: true, message: 'Please select a contactGroup', trigger: 'change' }],
|
||||||
],
|
},
|
||||||
itemId: [
|
|
||||||
{ required: true, message: 'Please select a monitorItem', trigger: 'change'},
|
|
||||||
],
|
|
||||||
operator: [
|
|
||||||
{ required: true, message: 'Please select a logicSymbol', trigger: 'change'},
|
|
||||||
],
|
|
||||||
threshold: [
|
|
||||||
{ required: true, message: 'Please input threshold'},
|
|
||||||
],
|
|
||||||
silenceCycle: [
|
|
||||||
{ required: true, message: 'Please select a silenceCycle', trigger: 'change'},
|
|
||||||
],
|
|
||||||
contactId: [
|
|
||||||
{ required: true, message: 'Please select a contactGroup', trigger: 'change'},
|
|
||||||
],
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log(this.currServer);
|
console.log(this.currServer)
|
||||||
this.sourceOptions = this.serverList
|
this.sourceOptions = this.serverList
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -255,7 +229,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onCancel() {
|
onCancel() {
|
||||||
this.$emit("onCancel")
|
this.$emit('onCancel')
|
||||||
this.resetForm()
|
this.resetForm()
|
||||||
},
|
},
|
||||||
onItemChange(val, option) {
|
onItemChange(val, option) {
|
||||||
|
@ -277,9 +251,9 @@ export default {
|
||||||
threshold: this.form.threshold,
|
threshold: this.form.threshold,
|
||||||
units: this.units,
|
units: this.units,
|
||||||
},
|
},
|
||||||
name: this.form.name
|
name: this.form.name,
|
||||||
}
|
}
|
||||||
this.$emit("onCanonSavecel", params)
|
this.$emit('onCanonSavecel', params)
|
||||||
this.resetForm()
|
this.resetForm()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -289,36 +263,36 @@ export default {
|
||||||
this.units = option.data.props.units
|
this.units = option.data.props.units
|
||||||
},
|
},
|
||||||
getItems(val) {
|
getItems(val) {
|
||||||
getAction("/alarmRule/getItems", {sourceName:val}).then(res => {
|
getAction('/alarmRule/getItems', { sourceName: val }).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.itemOptions = res.result.map(item => {
|
this.itemOptions = res.result.map((item) => {
|
||||||
return {
|
return {
|
||||||
label: item.name,
|
label: item.name,
|
||||||
value: item.itemId,
|
value: item.itemId,
|
||||||
units:item.units
|
units: item.units,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning("This operation fails. Contact your system administrator")
|
this.$message.warning('This operation fails. Contact your system administrator')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
resetForm() {
|
resetForm() {
|
||||||
this.$refs.al_ruleForm.resetFields();
|
this.$refs.al_ruleForm.resetFields()
|
||||||
this.form = {
|
this.form = {
|
||||||
sourceType: undefined,
|
sourceType: undefined,
|
||||||
sourceId: undefined,
|
sourceId: undefined,
|
||||||
name: "",
|
name: '',
|
||||||
itemId: undefined,
|
itemId: undefined,
|
||||||
operator: undefined,
|
operator: undefined,
|
||||||
threshold: "",
|
threshold: '',
|
||||||
silenceCycle: undefined,
|
silenceCycle: undefined,
|
||||||
contactId: undefined,
|
contactId: undefined,
|
||||||
}
|
}
|
||||||
this.sourceOptions = []
|
this.sourceOptions = []
|
||||||
this.itemOptions = []
|
this.itemOptions = []
|
||||||
this.units = ""
|
this.units = ''
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -216,14 +216,26 @@ export default {
|
||||||
processCpu: {
|
processCpu: {
|
||||||
content: null,
|
content: null,
|
||||||
legend: ['mysqld.exe', 'svchost.exe'],
|
legend: ['mysqld.exe', 'svchost.exe'],
|
||||||
color: ['#2d5cd3', '#60cae8', '#1ab060', '#ffbf44', '#e86954', 'red'],
|
color: [
|
||||||
|
['rgb(45, 92, 211)', 'rgba(45, 92, 211,0)'],
|
||||||
|
['rgb(96, 202, 232)', 'rgba(96, 202, 232,0)'],
|
||||||
|
['rgb(26, 176, 96)', 'rgba(26, 176, 96,0)'],
|
||||||
|
['rgb(255, 191, 68)', 'rgba(255, 191, 68,0)'],
|
||||||
|
['rgb(232, 105, 84)', 'rgba(232, 105, 84,0)'],
|
||||||
|
],
|
||||||
xData: [],
|
xData: [],
|
||||||
data: [],
|
data: [],
|
||||||
},
|
},
|
||||||
processMenbry: {
|
processMenbry: {
|
||||||
content: null,
|
content: null,
|
||||||
legend: ['mysqld.exe', 'svchost.exe'],
|
legend: ['mysqld.exe', 'svchost.exe'],
|
||||||
color: ['#2d5cd3', '#60cae8', '#1ab060', '#ffbf44', '#e86954', 'red'],
|
color: [
|
||||||
|
['rgb(45, 92, 211)', 'rgba(45, 92, 211,0)'],
|
||||||
|
['rgb(96, 202, 232)', 'rgba(96, 202, 232,0)'],
|
||||||
|
['rgb(26, 176, 96)', 'rgba(26, 176, 96,0)'],
|
||||||
|
['rgb(255, 191, 68)', 'rgba(255, 191, 68,0)'],
|
||||||
|
['rgb(232, 105, 84)', 'rgba(232, 105, 84,0)'],
|
||||||
|
],
|
||||||
xData: [],
|
xData: [],
|
||||||
data: [],
|
data: [],
|
||||||
},
|
},
|
||||||
|
@ -242,7 +254,6 @@ export default {
|
||||||
showSizeChanger: true,
|
showSizeChanger: true,
|
||||||
total: 0,
|
total: 0,
|
||||||
},
|
},
|
||||||
xData: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
|
||||||
rankData: {},
|
rankData: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -525,12 +536,12 @@ export default {
|
||||||
type: 'line',
|
type: 'line',
|
||||||
name: item.name,
|
name: item.name,
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
itemStyle: { normal: { color: this.processCpu.color[index] } },
|
itemStyle: { normal: { color: this.processCpu.color[index][0] } },
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
{ offset: 0, color: this.processCpu.color[index] },
|
{ offset: 0, color: this.processCpu.color[index][0] },
|
||||||
{ offset: 1, color: 'rgba(255,255,255,0)' },
|
{ offset: 1, color: this.processCpu.color[index][1] },
|
||||||
]),
|
]),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -599,12 +610,12 @@ export default {
|
||||||
type: 'line',
|
type: 'line',
|
||||||
name: item.name,
|
name: item.name,
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
itemStyle: { normal: { color: this.processCpu.color[index] } },
|
itemStyle: { normal: { color: this.processMenbry.color[index][0] } },
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
{ offset: 0, color: this.processCpu.color[index] },
|
{ offset: 0, color: this.processMenbry.color[index][0] },
|
||||||
{ offset: 1, color: 'rgba(255,255,255,0)' },
|
{ offset: 1, color: this.processMenbry.color[index][1] },
|
||||||
]),
|
]),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user