Authored by XuHaoJie

Merge branch 'master' of http://113.200.75.45:82/monitor_v3/hg-monitor-web into master-V32-XuHaoJie

 Conflicts:
	hg-monitor-web-zj/src/main/resources/static/vue3/src/router/index.js
${AnsiColor.BRIGHT_YELLOW}
${application.title} ${application.version} Base On Spring Boot ${spring-boot.version}
----------------------------------------------------------------------------------------------------------
\\\ /// .-. \\\ ///wW Ww(o)__(o) .-. )) (O)) ((O) _ 2022
((O) (O)) c(O_O)c ((O)(O))(O)(O)(__ __)c(O_O)c (Oo)-. || || wWw /||_
| \ / | ,'.---.`, | \ || (..) ( ) ,'.---.`, | (_)) || /\ || (O)_ /`_)
||\\//||/ /|_|_|\ \||\\|| || )( / /|_|_|\ \ | .' ||//\\|| .' __)| `.
|| \/ ||| \_____/ ||| \ | _||_ ( )| \_____/ | )|\\ / / \ \( _) | (_))
|| ||'. `---' .`|| || (_/\_) )/ '. `---' .`(/ \) ( / \ )`.__) (.'-'
(_/ \_) `-...-' (_/ \_) ( `-...-' ) ) ( )
______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______
|______|______|______|______|______|______|______|______|______|______|______|______|______|______|______|
... ...
... ... @@ -222,7 +222,7 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin',
// {field: 'provider', title: '厂商', minWidth: x_130, align: 'center', sort: true},
// {field: 'model', title: '型号', minWidth: x_130, align: 'center', sort: true},
{
field: 'resName', title: '资源名称', minWidth: x_300, sort: true,
field: 'resName', title: '资源名称', minWidth: x_330, sort: true,
templet: '#resindex_resName' },
{field: 'health', title: '健康状态', minWidth: x_110, align: 'center', sort: true, templet: '#healthTpl'},
// {field: 'diskSize', title: '磁盘总大小', minWidth: 120, align: 'center'},
... ...
<title>缓存数据</title>
<iframe src="/vue3/index.html#/cache" class="layadmin-iframe" style="height: 99.5%!important;"/>
... ...
... ... @@ -53,3 +53,5 @@
/*对比分析*/
@import "../css/analysis.css";
/*缓存数据*/
@import "../css/cacheData.css";
... ...
.cache-container{
height:100%;
background: #FFFFFF;
padding:20px;
}
.tag-item{
margin-right: 10px;
}
.view-container{
min-height: 600px;
padding:0 10px 10px;
display: flex;
flex-flow: column;
align-items: flex-start;
}
.view-title{
padding-bottom: 10px;
}
.view-detail{
flex: 1;
width: 100%;
text-align: left;
border:1px solid #ccc;
max-height: 600px;
overflow-y: auto;
}
.detail-data{
padding:10px;
}
\ No newline at end of file
... ...
<div style="display: flex;flex-wrap: nowrap">
<div style="width: calc(100% - 50px)">
<div style="width: calc(100% - 10px)">
<el-progress
:text-inside="true"
:stroke-width="20"
:percentage="textValue"
:status="status">
<span>{{textValue == '' ? ' ' : textValue + '%' }}</span>
:percentage="textString"
status="success">
<div style="color: black">{{textString == '' ? ' ' : textString + '%' }}</div>
</el-progress>
</div>
<div style="width: 50px">{{textString == '' ? '' : textString }} </div>
<!-- <div style="width: 50px">{{textString == '' ? '' : textString }} </div>-->
<!--
<el-progress :text-inside="true" :stroke-width="26" :percentage="textString" >
<span>{{textString == '' ? ' ' : textString + '%' }}</span>
</el-progress>
-->
</div>
... ...
... ... @@ -3,12 +3,6 @@ export default {
template: '',
components: {},
props: {
// 百分比数字,例如:50%,percentage= 50
textValue: {
type: Number,
default: 0
},
// 状态 success/exception/warning
status: {
type: String,
... ... @@ -20,7 +14,7 @@ export default {
},
// 文本
textString: {
type: String,
type: Number,
default: 0
},
optionData: {
... ...
... ... @@ -154,18 +154,23 @@
<template v-slot>
<div style="padding: 10px" style="display: flex;flex-wrap: wrap">
<div v-for="(v,k) in fieldsValueObj[currentRow.id].props" style="width: 50%">
<div style="text-align: left;padding-left: 10px;">{{v}}</div>
<div v-if="k.indexOf('_msg') != -1" style="text-align: left;padding-left: 10px;width: 100%">
{{v}}
</div>
<div v-else style="text-align: left;padding-left: 10px;">{{v}}</div>
<div v-if="k.indexOf('_input') != -1">
<el-input v-model="settingVal[currentRow.id][k]" :placeholder="v"></el-input>
</div>
<el-select v-else v-model="settingVal[currentRow.id][k]" :placeholder="v" style="margin: 3px">
<el-select clearable v-else-if="k.indexOf('_input') == -1 && k.indexOf('_msg') == -1" v-model="settingVal[currentRow.id][k]" :placeholder="v" style="margin: 3px">
<el-option v-for="(value ,index) in fieldsValueObj[currentRow.id].object"
:key="index"
:label="value[fieldsValueObj[currentRow.id].text]"
:value="value[fieldsValueObj[currentRow.id].value]" >
</el-option>
</el-select>
</div>
</div>
</template>
... ...
... ... @@ -146,6 +146,11 @@ const routes = [{
component: () => myImport('views/portSense/index')
},
{
path: '/cache',
name: 'cacheData',
component: () => myImport('views/cacheData/index')
},
{
path: '/vue3/portSenseConfig',
name: 'portSenseConfig',
component: () => myImport('views/portSenseConfig/index')
... ...
<div class="cache-container">
<el-row>
<el-col :span="24">
<div class="flex-div-start margin-top-bottom-10">
<el-input class="margin-right-10" v-model="keyWords" placeholder="输入关键字" />
<div class="flex-div-start">
<el-button type="primary" @click="onBtnSearch()" style="margin-left: 10px">搜索</el-button>
</div>
</div>
</el-col>
</el-row>
<el-row class="margin-top-bottom-10">
<el-col :span="24" class="flex-div-start margin-bottom-10">
<el-check-tag class="tag-item" v-for="(item,index) in tagData" :checked="checkedId==item.id" @click="changeTag(item.id)">{{item.name}}</el-check-tag>
</el-col>
</el-row>
<el-row class="margin-top-bottom-10">
<el-col :span="24" class="flex-div-start margin-bottom-10">
<!-- <span>匹配项:{{num}}个</span>-->
<span>[筛选:{{num}}个]</span>
</el-col>
</el-row>
<el-row class="margin-bottom-50">
<el-col :span="24" class="table-height">
<cm-table-page v-show="tableDataList" :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList"
:showIndex="true" :total="count" :showSelection="false"
:showBorder="true" :loading="false" :pageSize="pageSize"
:showPage="true" :showTools="true" :height="(height - 500)">
<template #tools="{scope}">
<el-button type="text" size="small" @click.prevent="handleView(scope.row,scope.$index)">
查看
</el-button>
</template>
</cm-table-page>
</el-col>
</el-row>
</div>
<cm-dialog :title="titleName" width="90%" :showDialogVisible="cacheVisible" @hidedialog="closeDialog" :showCancelBtn="true" :showFooter="false">
<template v-slot>
<div class="view-container">
<div class="view-title">Value:</div>
<div class="view-detail">
<div class="detail-data">
{{viewData}}
</div>
</div>
</div>
<div class="margin-top flex-center ">
<el-button @click="cancelBtn">取消</el-button>
</div>
</template>
</cm-dialog>
... ...
export default {
name: 'cacheData',
template: '',
components: {},
props:[],
data () {
return {
}
},
setup(){
const {proxy} = Vue.getCurrentInstance();
// Start LSQ 2022/1/5
let height = Vue.ref(window.innerHeight - 10);
// 挂载完
Vue.onMounted(() => {
})
//配置项标签数据
let tagData=Vue.ref([{
name:'配置1',
id:'001'
},{
name:'配置2',
id:'002'
},{
name:'配置3',
id:'003'
}])
//表格字段
let columns=Vue.ref([
{
prop: 'busTypeName',
label: '业务系统',
sortable: true,
align: 'center',
},
{
prop: 'resName',
label: '资源名称',
sortable: true,
align: 'center',
},
])
let page=Vue.ref(1);
let pageSize=Vue.ref(10);
let keyWords=Vue.ref();
let count=Vue.ref(0);
let tableDataList=Vue.ref([{
busTypeName:'电子税务局',
id:'111',
resName:'缓存',
val:'25698458'
}]);
let checkedId = Vue.ref(0);
let titleName=Vue.ref('查看数据')
let cacheVisible=Vue.ref(false);
let viewData=Vue.ref();
//匹配项数
let num=Vue.ref(0);
//点击标签进行搜索
const changeTag = (status) => {
console.log("aa",status)
checkedId.value = status;
getDataList();
}
//操作按钮 查看
const handleView=(row,index)=>{
viewData.value=row.val;
cacheVisible.value=true;
}
//重新加载表格数据
let loadTableDataList = ({page, limit}) => {
page.value=page;
pageSize.value=limit;
getDataList()
}
// 点击按钮搜索
let onBtnSearch = () => {
getDataList();
}
//获取缓存数据
let getDataList=()=>{
let params={
page:page.value,
pageSize:pageSize.value,
keyWord:keyWords.value,
id:checkedId.value
}
/*proxy.$http.get(`/api-web/`, params, function (res) {
if (res && res.success) {
count.value = res.count;
tableDataList.value = res.data;
}
});*/
}
//关闭弹框回调函数
let closeDialog=()=>{
}
//关闭弹框
let cancelBtn=()=>{
cacheVisible.value=false;
}
return {
num,
height,
columns,
tagData,
page,
count,
pageSize,
keyWords,
tableDataList,
checkedId,
changeTag,
handleView,
loadTableDataList,
onBtnSearch,
getDataList,
cacheVisible,
titleName,
viewData,
closeDialog,
cancelBtn
}
//End LSQ 2022/1/5
}
}
\ No newline at end of file
... ...
... ... @@ -48,6 +48,7 @@ export default {
computed: {},
setup(props){
const {proxy} = Vue.getCurrentInstance();
let height = Vue.ref(window.innerHeight - 10);
let id = proxy.$global.getQueryVariable('configId') ;
let config = Vue.ref(id == false ? null : id);
let count=Vue.ref(0);
... ... @@ -148,6 +149,7 @@ export default {
}
return {
height,
getEnvironmentData,
loadTableDataList,
page,
... ...
... ... @@ -323,7 +323,10 @@ export default {
this.type='base';
this.state=this.faultEnvironmentRadio;
this.setDetailConfig(this.type)
this.getBaseList();
if(this.faultEnvironmentRadio==1){
this.getBaseList();
}
},
//APM
... ... @@ -644,13 +647,17 @@ export default {
this.baseVisible=false;
if(itemData.faultConfId){
this.faultConfId=itemData.faultConfId;
this.propsData.faultConfId=this.faultConfId;
}
this.setTargetId(itemData.targetId);
// this.targetId=itemData;
this.propsData.targetId=itemData.targetId;
//获取已添加的环境基础列表
this.getBaseList();
},
getBaseList(){
this.$refs.basic.setBizId();
this.$refs.basic.getEnvironmentData();
},
... ...
... ... @@ -15,7 +15,15 @@
<el-form :inline="true" :model="searchForm" class="demo-form-inline">
<el-form-item v-for="searchInfo in obj.searchList" :label="searchInfo.name">
<el-input v-if="searchInfo.type == 'INPUT'" v-model="searchForm[searchInfo.key]" :placeholder="'请输入' + searchInfo.name"></el-input>
<el-input v-else v-model="searchForm[searchInfo.key]" :placeholder="'请输入' + searchInfo.name"></el-input>
<el-select v-else v-model="searchForm[searchInfo.key]" :placeholder="'请选择' + searchInfo.name" clearable >
<el-option
v-for="item in searchItem[searchInfo.key]"
:key="item.val"
:label="item.label"
:value="item.val"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
... ...
... ... @@ -72,6 +72,8 @@ export default {
let total = Vue.ref(0);
let searchItem = Vue.ref({});
// 计算减去左侧树的宽度
let max = (function (){
let right = window.innerWidth;
... ... @@ -114,6 +116,9 @@ export default {
if (res && res.object) {
obj.value = res.object
total.value = res.count;
// 查询搜索下拉
getSearchItem(res.object.searchList);
} else {
obj.value.maps = [];
}
... ... @@ -133,30 +138,26 @@ export default {
dialogFlg.value = flg;
}
let cellClick = (row, prop, column) => {
openCabinet(true);
showDialog(true);
cellDetail.value['prop'] = prop;
cellDetail.value['row'] = row;
cellDetail.value['title'] = column.label + '详情';
}
let cabinetNoSrc = Vue.ref('');
let openCabinet = (isInit) => {
if (isInit) {
cabinetNoSrc.value = "/vue3/src/assets/images/res/img01.jpg"
} else {
cabinetNoSrc.value = "/vue3/src/assets/images/res/img03.jpg"
}
}
let getPage = (pageInfo) =>{
page.value = pageInfo.page;
limit.value = pageInfo.limit;
loadResList()
}
let isManager = () => {
let getSearchItem = (searchList) => {
if(!searchList){
return;
}
searchList.forEach(function (v){
if(v.type == 'TABLE_REL'){
//searchItem
proxy.$http.get(`/api-web/v32/res/search/${v.treeNodeId}/${v.key}`, {}, function (res) {
if (res && res.data && res.data.length > 0) {
searchItem.value[v.key] = res.data;
}
});
}
})
}
... ... @@ -166,8 +167,6 @@ export default {
// 挂载完
Vue.onMounted(() => {
loadTree();
openCabinet(true);
})
... ... @@ -176,6 +175,7 @@ export default {
currentNode,
treeData,
searchForm,
searchItem,
height,
obj,
handleNodeClick,
... ... @@ -183,10 +183,7 @@ export default {
dialogFlg,
showDialog,
cellDetail,
cellClick,
openCabinet,
cabinetNoSrc,
total,
max,
getPage,
... ...