Merge branch 'master-500-dev' of http://113.200.75.45:82/monitor_v3/hg-monitor-w…
…eb into master-500-dev-XuHaoJie
Showing
7 changed files
with
28 additions
and
45 deletions
@@ -3068,7 +3068,9 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele | @@ -3068,7 +3068,9 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele | ||
3068 | title += `<a class="layui-icon filterList" data-id=${resId} lay-tips="指标过滤清单" style="margin-left: 10px"><i class="iconfont"></i></a>`; | 3068 | title += `<a class="layui-icon filterList" data-id=${resId} lay-tips="指标过滤清单" style="margin-left: 10px"><i class="iconfont"></i></a>`; |
3069 | title += `<a class="layui-icon res-view-relation-topo" data-id=${resId} lay-tips="查看资源关系拓扑" style="margin-left: 10px"><i class="iconfont"></i></a>`; | 3069 | title += `<a class="layui-icon res-view-relation-topo" data-id=${resId} lay-tips="查看资源关系拓扑" style="margin-left: 10px"><i class="iconfont"></i></a>`; |
3070 | if (resCategory === 'share' && hardwareFlag.endsWith("Y")) { | 3070 | if (resCategory === 'share' && hardwareFlag.endsWith("Y")) { |
3071 | +/* | ||
3071 | title += `<a class="layui-icon res-view-assets-details" data-ip=${ip} data-name=${name} data-restype=${resType} data-id=${resId} lay-tips="资产配置信息"><i class="iconfont"></i></a>`; | 3072 | title += `<a class="layui-icon res-view-assets-details" data-ip=${ip} data-name=${name} data-restype=${resType} data-id=${resId} lay-tips="资产配置信息"><i class="iconfont"></i></a>`; |
3073 | +*/ | ||
3072 | } | 3074 | } |
3073 | if (res.state == 'new' && hardwareFlag.endsWith("N")){ | 3075 | if (res.state == 'new' && hardwareFlag.endsWith("N")){ |
3074 | layer.alert('资源未监控!',{icon:0}); | 3076 | layer.alert('资源未监控!',{icon:0}); |
@@ -3089,7 +3091,9 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele | @@ -3089,7 +3091,9 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele | ||
3089 | title += `<a class="layui-icon filterList" data-id=${resId} lay-tips="指标过滤清单" style="margin-left: 10px"><i class="iconfont"></i></a>`; | 3091 | title += `<a class="layui-icon filterList" data-id=${resId} lay-tips="指标过滤清单" style="margin-left: 10px"><i class="iconfont"></i></a>`; |
3090 | title += `<a class="layui-icon res-view-relation-topo" data-id=${resId} lay-tips="查看资源关系拓扑" style="margin-left: 10px"><i class="iconfont"></i></a>`; | 3092 | title += `<a class="layui-icon res-view-relation-topo" data-id=${resId} lay-tips="查看资源关系拓扑" style="margin-left: 10px"><i class="iconfont"></i></a>`; |
3091 | if (resCategory === 'share' && hardwareFlag.endsWith("Y")) { | 3093 | if (resCategory === 'share' && hardwareFlag.endsWith("Y")) { |
3094 | +/* | ||
3092 | title += `<a class="layui-icon res-view-assets-details" data-ip=${ip} data-name=${name} data-restype=${resType} data-id=${resId} lay-tips="资产配置信息"><i class="iconfont"></i></a>`; | 3095 | title += `<a class="layui-icon res-view-assets-details" data-ip=${ip} data-name=${name} data-restype=${resType} data-id=${resId} lay-tips="资产配置信息"><i class="iconfont"></i></a>`; |
3096 | +*/ | ||
3093 | } | 3097 | } |
3094 | obj.openNewWin(url,title,params,editFlag,fn,cancelfn,type); | 3098 | obj.openNewWin(url,title,params,editFlag,fn,cancelfn,type); |
3095 | } | 3099 | } |
@@ -252,7 +252,9 @@ layui.define(['admin', 'table', 'common', 'sessions', 'form'], function (exports | @@ -252,7 +252,9 @@ layui.define(['admin', 'table', 'common', 'sessions', 'form'], function (exports | ||
252 | var topoStr = `<a class="layui-icon reslist-view-topo hide" data-resid="${d.resId}" style="color: #FEB61E; font-size: 14px; margin-left: 10px;" lay-tips="查看资源拓扑"><i class="iconfont"></i></a>`; | 252 | var topoStr = `<a class="layui-icon reslist-view-topo hide" data-resid="${d.resId}" style="color: #FEB61E; font-size: 14px; margin-left: 10px;" lay-tips="查看资源拓扑"><i class="iconfont"></i></a>`; |
253 | var assetsStr = ''; | 253 | var assetsStr = ''; |
254 | if (d.resCategory == 'share' && d.hardwareFlag && d.hardwareFlag.endsWith("Y")) { | 254 | if (d.resCategory == 'share' && d.hardwareFlag && d.hardwareFlag.endsWith("Y")) { |
255 | +/* | ||
255 | assetsStr = `<a class="layui-icon reslist-assets-details hide" data-resid="${d.resId}" data-restype="${d.resType}" data-name="${d.resName}" data-ip="${d.ip}" style="color: #FEB61E; font-size: 14px; margin-left: 10px;" lay-tips="资产配置信息"><i class="iconfont"></i></a>`; | 256 | assetsStr = `<a class="layui-icon reslist-assets-details hide" data-resid="${d.resId}" data-restype="${d.resType}" data-name="${d.resName}" data-ip="${d.ip}" style="color: #FEB61E; font-size: 14px; margin-left: 10px;" lay-tips="资产配置信息"><i class="iconfont"></i></a>`; |
257 | +*/ | ||
256 | } | 258 | } |
257 | return '<div><span data-search-resource="' + d.resId + '" data-search-ip="' + d.ip + '" data-search-resType="' + d.resType + '" data-search-resname="' + d.resName + '" class="layui-table-link">' + d.resName + '</span>' + | 259 | return '<div><span data-search-resource="' + d.resId + '" data-search-ip="' + d.ip + '" data-search-resType="' + d.resType + '" data-search-resname="' + d.resName + '" class="layui-table-link">' + d.resName + '</span>' + |
258 | favStr + topoStr + assetsStr + | 260 | favStr + topoStr + assetsStr + |
@@ -752,7 +752,9 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', | @@ -752,7 +752,9 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', | ||
752 | } | 752 | } |
753 | html += '<a class="layui-icon reslist-view-topo hide" data-resid="' + d.resId + '" style="color: #FEB61E; font-size: 14px; margin-left: 10px;" lay-tips="查看资源拓扑"><i class="iconfont"></i></a>'; | 753 | html += '<a class="layui-icon reslist-view-topo hide" data-resid="' + d.resId + '" style="color: #FEB61E; font-size: 14px; margin-left: 10px;" lay-tips="查看资源拓扑"><i class="iconfont"></i></a>'; |
754 | if ((d.resCategory === 'share' || d.resCategory === 'assets') && d.hardwareFlag.endsWith("Y")) { | 754 | if ((d.resCategory === 'share' || d.resCategory === 'assets') && d.hardwareFlag.endsWith("Y")) { |
755 | +/* | ||
755 | html += '<a class="layui-icon resmanage-assets-details hide" data-id="'+d.resId+'" data-ip="'+ d.ip +'" data-restype="'+d.resType+'" data-name="'+d.resName+'" data-rescategory="'+d.resCategory+'" data-hardwareflag="'+d.hardwareFlag+'" style="color: #FEB61E; font-size: 14px; margin-left: 10px;" lay-tips="资产配置信息"><i class="iconfont"></i></a>' | 756 | html += '<a class="layui-icon resmanage-assets-details hide" data-id="'+d.resId+'" data-ip="'+ d.ip +'" data-restype="'+d.resType+'" data-name="'+d.resName+'" data-rescategory="'+d.resCategory+'" data-hardwareflag="'+d.hardwareFlag+'" style="color: #FEB61E; font-size: 14px; margin-left: 10px;" lay-tips="资产配置信息"><i class="iconfont"></i></a>' |
757 | +*/ | ||
756 | } | 758 | } |
757 | html += '</div>' | 759 | html += '</div>' |
758 | return html; | 760 | return html; |
@@ -739,6 +739,8 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts','laydate | @@ -739,6 +739,8 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts','laydate | ||
739 | admin.req({ | 739 | admin.req({ |
740 | url: url | 740 | url: url |
741 | }).done(function (response) { | 741 | }).done(function (response) { |
742 | + // 执行成功,有没有数据都隐藏加载图标 | ||
743 | + echartObject.hideLoading(); | ||
742 | if (response && response.map) { | 744 | if (response && response.map) { |
743 | xData = response.map.userList; | 745 | xData = response.map.userList; |
744 | yData = response.map.valueList; | 746 | yData = response.map.valueList; |
@@ -823,7 +825,6 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts','laydate | @@ -823,7 +825,6 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts','laydate | ||
823 | }], | 825 | }], |
824 | series: series | 826 | series: series |
825 | } | 827 | } |
826 | - echartObject.hideLoading(); | ||
827 | echartObject.setOption(option) | 828 | echartObject.setOption(option) |
828 | } | 829 | } |
829 | }) | 830 | }) |
@@ -107,60 +107,23 @@ layui.extend({ | @@ -107,60 +107,23 @@ layui.extend({ | ||
107 | tabsPage.index = index; | 107 | tabsPage.index = index; |
108 | } | 108 | } |
109 | }); | 109 | }); |
110 | - // 遍历左侧菜单 | ||
111 | - var tabList=[] | ||
112 | - $.ajax({ | ||
113 | - url: sessionStorage.getItem('domainName') + '/api-user/menus/current?type=1', | ||
114 | - async: false, | ||
115 | - data: {access_token:localStorage.getItem("access_token"),}, | ||
116 | - success(response) { | ||
117 | - $.each(response.data, function (i, v) { | ||
118 | - if(v.subMenus){ | ||
119 | - $.each(v.subMenus, function (i, e) { | ||
120 | - tabList.push(e) | ||
121 | - if(e.subMenus){ | ||
122 | - $.each(e.subMenus, function (i, ev) { | ||
123 | - tabList.push(ev) | ||
124 | - if(ev.subMenus){ | ||
125 | - $.each(ev.subMenus, function (i, every) { | ||
126 | - tabList.push(every) | ||
127 | - }); | ||
128 | - } | ||
129 | - }); | ||
130 | - } | ||
131 | - }); | ||
132 | - } | ||
133 | - | ||
134 | - }); | 110 | + var tabName; |
111 | + try { | ||
112 | + tabName= admin.tabsPage.elem.text() | ||
113 | + } catch (e){ | ||
135 | 114 | ||
136 | } | 115 | } |
137 | - }); | 116 | + if(!tabName){ |
117 | + tabName= res.title | ||
118 | + } | ||
138 | 119 | ||
139 | //如果未在选项卡中匹配到,则追加选项卡 | 120 | //如果未在选项卡中匹配到,则追加选项卡 |
140 | if(setter.pageTabs && pathURL !== '/'){ | 121 | if(setter.pageTabs && pathURL !== '/'){ |
141 | if(!matchTo){ | 122 | if(!matchTo){ |
142 | - var tabName='' // tab标签名 | ||
143 | - tabList.forEach((e) =>{ | ||
144 | - var url = e.path; | ||
145 | - if(url && !url.startsWith('/')){ | ||
146 | - url = '/'+url; | ||
147 | - } | ||
148 | - if(pathURL && !pathURL.startsWith('/')){ | ||
149 | - pathURL = '/'+pathURL; | ||
150 | - } | ||
151 | - | ||
152 | - if(url && url.indexOf(pathURL) != -1){ | ||
153 | - tabName = e.name | ||
154 | - } | ||
155 | - }); | ||
156 | - if(!tabName){ | ||
157 | - tabName= res.title | ||
158 | - } | ||
159 | $(APP_BODY).append('<div class="layadmin-tabsbody-item layui-show"></div>'); | 123 | $(APP_BODY).append('<div class="layadmin-tabsbody-item layui-show"></div>'); |
160 | tabsPage.index = tabs.length; | 124 | tabsPage.index = tabs.length; |
161 | element.tabAdd(FILTER_TAB_TBAS, { | 125 | element.tabAdd(FILTER_TAB_TBAS, { |
162 | title: '<span>'+ (tabName || '新标签页') +'</span>' | 126 | title: '<span>'+ (tabName || '新标签页') +'</span>' |
163 | - // title: '<span>'+ (res.title || '新标签页') +'</span>' | ||
164 | ,id: pathURL | 127 | ,id: pathURL |
165 | ,attr: router.href | 128 | ,attr: router.href |
166 | }); | 129 | }); |
@@ -172,6 +135,8 @@ layui.extend({ | @@ -172,6 +135,8 @@ layui.extend({ | ||
172 | 135 | ||
173 | //定位当前tabs | 136 | //定位当前tabs |
174 | element.tabChange(FILTER_TAB_TBAS, pathURL); | 137 | element.tabChange(FILTER_TAB_TBAS, pathURL); |
138 | + // 修改为当前菜单名称 | ||
139 | + $('* [lay-id="' + pathURL + '"] span').text(tabName) | ||
175 | admin.tabsBodyChange(tabsPage.index); | 140 | admin.tabsBodyChange(tabsPage.index); |
176 | 141 | ||
177 | }).done(function(){ | 142 | }).done(function(){ |
@@ -539,7 +539,9 @@ | @@ -539,7 +539,9 @@ | ||
539 | {{# } }} | 539 | {{# } }} |
540 | <a class="layui-icon reslist-view-topo hide" data-resid="{{d.resId}}" style="color: #FEB61E; font-size: 14px; margin-left: 10px;" lay-tips="查看资源拓扑"><i class="iconfont"></i></a> | 540 | <a class="layui-icon reslist-view-topo hide" data-resid="{{d.resId}}" style="color: #FEB61E; font-size: 14px; margin-left: 10px;" lay-tips="查看资源拓扑"><i class="iconfont"></i></a> |
541 | {{# if (d.resCategory == 'share' && d.hardwareFlag && d.hardwareFlag.endsWith("Y")) { }} | 541 | {{# if (d.resCategory == 'share' && d.hardwareFlag && d.hardwareFlag.endsWith("Y")) { }} |
542 | +<!-- | ||
542 | <a class="layui-icon reslist-assets-details hide" data-resid="{{d.resId}}" data-restype="{{d.resType}}" data-name="{{d.resName}}" data-ip="{{ d.ip }}" style="color: #FEB61E; font-size: 14px; margin-left: 10px;" lay-tips="资产配置信息"><i class="iconfont"></i></a> | 543 | <a class="layui-icon reslist-assets-details hide" data-resid="{{d.resId}}" data-restype="{{d.resType}}" data-name="{{d.resName}}" data-ip="{{ d.ip }}" style="color: #FEB61E; font-size: 14px; margin-left: 10px;" lay-tips="资产配置信息"><i class="iconfont"></i></a> |
544 | +--> | ||
543 | {{# } }} | 545 | {{# } }} |
544 | </div> | 546 | </div> |
545 | </script> | 547 | </script> |
@@ -121,6 +121,13 @@ export default { | @@ -121,6 +121,13 @@ export default { | ||
121 | docNo:props.docNo | 121 | docNo:props.docNo |
122 | } | 122 | } |
123 | 123 | ||
124 | + // xwx 文档上传名称不能包含空字符串 | ||
125 | + if (fileObj.name.indexOf(" ") >=0){ | ||
126 | + proxy.$global.showMsg("文档名称不能存在空格!", "warning"); | ||
127 | + return; | ||
128 | + } | ||
129 | + | ||
130 | + | ||
124 | /*文件大小限制更改为200M | 131 | /*文件大小限制更改为200M |
125 | * lu 20211206 | 132 | * lu 20211206 |
126 | */ | 133 | */ |
-
Please register or login to post a comment