Authored by xwx

Merge branch 'master-500-dev' of http://113.200.75.45:82/monitor_v3/hg-monitor-w…

…eb into master-500-dev-xwx
... ... @@ -4798,7 +4798,9 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin',
{field: 'ip', title: 'IP地址', width: 130, align: 'center', sort: true},
{
field: 'resName', title: '资源名称', width: resNameWidth, sort: true,
templet: '<div><span data-zymc="{{ d.resId }}" data-restype="{{d.resType}}" data-name="{{d.resName}}" data-childrennum="{{d.childrenNum}}" data-ip="{{ d.ip }}" data-resTypeName="{{ d.resTypeName }}" data-admin="{{ d.adminName }}" data-pingenable="{{d.pingEnable}}" class="layui-table-link">{{ d.resName }}</span></div>'
templet: '#resindex_resName'
//lsq 资源名称用模板 2022-08-29
// templet: '<div><span data-zymc="{{ d.resId }}" data-restype="{{d.resType}}" data-name="{{d.resName}}" data-childrennum="{{d.childrenNum}}" data-ip="{{ d.ip }}" data-resTypeName="{{ d.resTypeName }}" data-admin="{{ d.adminName }}" data-pingenable="{{d.pingEnable}}" class="layui-table-link">{{ d.resName }}</span></div>'
},
// {field: 'shortName', title: '别名', width: 100, align: 'center', sort: true, templet:'#shortNameTpl'},
{field: 'health', title: '健康状态', width: 86, align: 'center', sort: true, templet: '#healthTpl'},
... ...
... ... @@ -1490,7 +1490,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele
if (data) {
$.each(data.series, function (i, v) {
if (v.flag != null && v.flag != undefined) {
array.push(`<span id="selectFlag" class="layui-badge layui-bg-blue" style="margin:2px;z-index:99999">${v.flag}</span>` + "");
array.push(`<span id="selectFlag" class="layui-badge layui-bg-blue" style="margin:2px;cursor: pointer;z-index:99999">${v.flag}</span>` + "");
} else {
array.push('<div style="position:absolute;top:50%;left:50%;">无指标</div>')
}
... ...
... ... @@ -393,7 +393,7 @@ layui.define(['form', 'table', 'admin', 'layer', 'laytpl', 'common', 'view', 'se
//lsq 增加菜单类型列 2022-08-11
, {field: 'type', title: '菜单类型', align: 'center', sort: true,
templet: function (d){
// 1:监控菜单,2:巡检菜单,3:个人工作台,4:系统菜单,5:跳转菜单,6:报表菜单,7:CMDB菜单
// 1:监控菜单,2:巡检菜单,3:个人工作台,4:系统菜单,5:跳转菜单,6:报表菜单,7:资产菜单
switch (d.type) {
case 1:
return '<span class="layui-badge layui-bg-orange">监控菜单</span>';
... ... @@ -408,7 +408,7 @@ layui.define(['form', 'table', 'admin', 'layer', 'laytpl', 'common', 'view', 'se
case 6:
return '<span class="layui-badge layui-bg-gray">报表菜单</span>';
case 7:
return '<span class="layui-badge layui-bg-red">CMDB菜单</span>';
return '<span class="layui-badge layui-bg-red">资产菜单</span>';
default:
return '';
}
... ...
... ... @@ -42,11 +42,9 @@ layui.define(['form', 'admin', 'layer', 'common', 'sessions', 'xmSelect', 'resli
});
form.render();
function autoHeight(el) {
// var height = el.parents('.layui-card').height();
// el.css('min-height', height - 75);
}
common.ddicSelect('jgraph-topo_type','JTOPO_TOPOTYPE',function (datalist) {
form.render('select');
});
//绑定机房
admin.req({
url: common.domainName + '/api-web/manage/machineroom/page'
... ...
... ... @@ -1159,7 +1159,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form',
if (name.length > 0) {
name = name.substr(0, name.length - 1);
}
if (resType == 'STORAGE_SHARE' && provider != 'HUAWEI' && provider != 'Inspur') {
if (resType == 'STORAGE_SHARE' && provider != 'HUAWEI' && provider != 'Inspur' && provider != 'macrosan') {
return false;
}
commonDetail.openDetail(resId, resType, name)
... ...
... ... @@ -27,7 +27,7 @@
<div class="layui-form-item" style="display: flex;align-items: center;">
<label class="layui-form-label" style="height:40px;">用户绑定</label>
<!-- <div class="layui-input-block tags-input" style="height: auto">-->
<div class=" tags-input" style="height: auto;">
<div class=" tags-input" style="height: 38px;">
<div class="tags" id="selecte_usergroup_id_user"></div>
</div>
<!-- style="padding: 0!important;position: relative;top: -28px;left: 98%"【-->
... ...
... ... @@ -34,10 +34,10 @@
<label class="layui-form-label">拓扑类型</label>
<div class="layui-input-block">
<select id="jgraph-topo_type" lay-filter="jgraph-edittopo_topo_type" name="jgraph-topo_type">
<option value="1">业务拓扑</option>
<!-- <option value="1">业务拓扑</option>
<option value="2">资源拓扑</option>
<option value="3">网络拓扑</option>
<option value="4">机房拓扑</option>
<option value="4">机房拓扑</option>-->
</select>
</div>
</div>
... ...
... ... @@ -41,7 +41,7 @@
<div style="width: calc(100% - 150px);padding-left: 6px;text-align: left;">
<el-input :size="$global.elementConfig.size.input" @keydown.enter.native="searchFile" clearable
placeholder="请输入关键字"
style="width: 220px;margin-right:10px" v-model="keyWord"/>
style="width: 220px;margin-right:10px" v-model.trim="keyWord"/>
<el-button :size="$global.elementConfig.size.button" @click="searchFile">
<i class="iconfont icon-sousuo"></i>搜索
</el-button>
... ...
... ... @@ -652,10 +652,10 @@ export default {
*/
let searchFile = () => {
let keyWords = keyWord.value;
// if (keyWords == '') {
// proxy.$global.showMsg("请输入关键字!", "warning")
// return;
// }
if (keyWords == '') {
proxy.$global.showMsg("请输入关键字!", "warning")
return;
}
getPage(props.viewTypeId);
}
... ...
... ... @@ -11,7 +11,7 @@ export default {
keyWord:'',
resType:'',
busId:'',
time:"today",
time:"week",
pageNum: 1,
pageSize: 10,
count:0,
... ...
... ... @@ -12,7 +12,7 @@ export default {
resType:'',
busId:'',
userName:'',
time:"today",
time:"week",
pageNum: 1,
pageSize: 10,
count:0,
... ...
... ... @@ -27,6 +27,7 @@ layui.define(['xmSelect', 'md5'], function (exports) {
ajScreenStatement: sessionStorage.getItem('ajWeb'), //aj系统地址
workflowName: sessionStorage.getItem('workflow'),//流程系统地址
domainCMDBName: "http://80.12.147.24:8888/hgkjcmdb", //杭州咨源老cmdb系统地址
kelaiTargetUrl: 'https://94.12.78.29/auth/authLogin.do?authUid={USERNAME}&authPwd={PASSWORD}', //科来首页地址
lineTimer: null,//性能曲线图全局定时器
detailTimer: [],//详细页的全局定时器
alarmTimer: null,//首页告警刷新定时器
... ...
... ... @@ -532,8 +532,8 @@ export default {
// 已选择列表
tabFirstList.value = [];
// 关闭谈画框
// lsq 刷新菜单 2022-08-29
window.top.location.reload();
// window.top.location.href = window.top.location.origin + "/#/analysis/view/id=105"
window.top.location.href = window.top.location.origin + '/#/' + res.str;
}
... ... @@ -555,12 +555,23 @@ export default {
proxy.$http.get("/api-web/manage/kpi/list", {}, function (res) {
if (res && res.data) {
kpiList.value = res.data;
//lsq 给默认数据,第一个数据
if(kpiList.value.length>0){
kpiTypeArr.value=[kpiList.value[0].kpiId];
getParams.value.kpiId=kpiList.value[0].kpiId;
}
loeadTable();
}
})
proxy.$http.get("/api-web/home/business/findAllBusType", {}, function (res) {
if (res && res.data) {
busTypeList.value = res.data;
//lsq 给一个默认数据,第一个数据 2022-08-29
if(busTypeList.value.length>0){
busTypeArr.value=[busTypeList.value[0].busId];
getParams.value.busId=busTypeList.value[0].busId;
}
}
})
... ... @@ -577,7 +588,6 @@ export default {
});
}
});
//LH
setTimeout(function () {
let arrs = timeRangeArr.value
... ... @@ -598,7 +608,7 @@ export default {
// 挂载完
Vue.onMounted(() => {
init();
if (!id) {
activeName.value = 'second';
... ... @@ -609,7 +619,6 @@ export default {
//编辑追加场景分类数据加载
analysisChange(true);
}
loeadTable();
// 先加载时间范围,然后在加载
loadTimeRange(function (defCode) {
... ... @@ -620,12 +629,12 @@ export default {
}
});
});
init();
console.log('onMounted');
})
return {
getParams,
resTypeList,
kpiList,
busTypeList,
... ...
... ... @@ -20,27 +20,25 @@
<el-button :size="$global.elementConfig.size.button" @click="searchData" class="search-text button-flex-div-center"
type="primary">搜索
</el-button>
<!--lsq 条件在一行 2022-08-29-->
<router-link :to="'/analysis/add'" class="analysis link-type">
<el-button :size="$global.elementConfig.size.button" style="margin-left:6px;" class="button-flex-div-center" type="primary">
<i class="el-icon-plus"></i>新增
</el-button>
</router-link>
<el-button :size="$global.elementConfig.size.button" @click="handleDelete()" style="margin-left:6px;" class="search-text button-flex-div-center"
type="primary">删除
</el-button>
</div>
</el-col>
</el-row>
<el-row class="list-title">
<el-col :span="24" class="text-left">
<router-link :to="'/analysis/add'" class="analysis link-type">
<el-button :size="$global.elementConfig.size.button" class="button-flex-div-center" type="primary">
<i class="el-icon-plus"></i>新增
</el-button>
</router-link>
<!-- <el-button type="primary" class="button-flex-div-center"><i class="icon-list icon-list-delete"></i>删除</el-button>-->
</el-col>
</el-row>
<el-row class="analysis-table-div">
<el-col :span="24">
<el-table :data="tableData" @selection-change="handleSelectionChange" border ref="multipleTable" stripe
style="width: 100%">
<!-- <el-table-column align="center" type="selection" width="55" />-->
<el-table-column align="center" type="selection" width="55" />
<el-table-column align="center" label="配置项名称" prop="configName" sortable/>
<el-table-column align="center" label="配置项描述" prop="configDepict" sortable/>
<el-table-column align="center" label="时间范围" prop="timeScopeName" sortable></el-table-column>
... ...
... ... @@ -28,7 +28,6 @@ export default {
// 挂载完
Vue.onMounted(() => {
proxy.getData();
})
//获取对比分析列表
const getData = () => {
... ... @@ -39,7 +38,6 @@ export default {
}
$.get(proxy.domainName + proxy.apiUrl + '?access_token=' + localStorage.getItem('access_token'), params, function (res) {
if (res) {
console.log("res", res)
proxy.totalCount = res.count;
proxy.tableData = res.data;
proxy.tableData.map((item, index) => {
... ... @@ -68,14 +66,31 @@ export default {
this.$refs.multipleTable.clearSelection()
}
}
let multipleSelection=Vue.ref([]);
const handleSelectionChange = (val) => {
this.multipleSelection = val
multipleSelection.value = val
}
//单个删除
const handleDelete = (item) => {
//lsq 增加批量删除 2022-08-29
let idList='';
if(item){
idList=item.id
}else{
if(multipleSelection.value && multipleSelection.value.length>0){
let idArr=[];
multipleSelection.value.map(item=>{
idArr.push(item.id)
})
if(idArr.length>0){
idList=idArr.join(',')
}
}else{
proxy.$global.showMsg("请选择数据", "warning");
}
}
let params = {
id: item.id
id: idList
}
proxy.$global.confirm("确认删除数据吗?", function () {
... ... @@ -83,13 +98,14 @@ export default {
$.get(proxy.domainName + proxy.apiUrl1 + '?access_token=' + localStorage.getItem('access_token'), params, function () {
proxy.$global.showMsg("删除成功", "success");
proxy.getData();
// lsq 刷新菜单 2022-08-29
window.top.location.reload();
})
} else {
proxy.$global.showMsg("删除失败", "warning");
}
})
// $.get(proxy.domainName +proxy.apiUrl1+'?access_token='+localStorage.getItem('access_token'),params,function (res) {
// if(res){
// proxy.$global.confirm("确认删除数据吗?", function () {
... ...