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
43 additions
and
60 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 + |
@@ -435,4 +437,4 @@ layui.define(['admin', 'table', 'common', 'sessions', 'form'], function (exports | @@ -435,4 +437,4 @@ layui.define(['admin', 'table', 'common', 'sessions', 'form'], function (exports | ||
435 | 437 | ||
436 | 438 | ||
437 | }); | 439 | }); |
438 | -}); | ||
440 | +}); |
@@ -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; |
@@ -193,7 +193,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts','laydate | @@ -193,7 +193,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts','laydate | ||
193 | }, { | 193 | }, { |
194 | type: 'numbers', title: '序号' | 194 | type: 'numbers', title: '序号' |
195 | }, { | 195 | }, { |
196 | - field: 'repType', title: '汇报类型', align: 'center', | 196 | + field: 'repType', title: '汇报类型', align: 'center', |
197 | templet: function (d) { | 197 | templet: function (d) { |
198 | var typeName = '' | 198 | var typeName = '' |
199 | switch (d.repType) { | 199 | switch (d.repType) { |
@@ -213,7 +213,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts','laydate | @@ -213,7 +213,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts','laydate | ||
213 | field: 'repTitle', title: '标题', align: 'center', minWidth: 200,event: 'serRead', | 213 | field: 'repTitle', title: '标题', align: 'center', minWidth: 200,event: 'serRead', |
214 | templet: '<div><span data-id="{{d.id}}" data-rep="{{d.repType}}" class="layui-table-link view-workReport-title" >{{d.repTitle}}</span></div>' | 214 | templet: '<div><span data-id="{{d.id}}" data-rep="{{d.repType}}" class="layui-table-link view-workReport-title" >{{d.repTitle}}</span></div>' |
215 | }, { | 215 | }, { |
216 | - field: 'attachmentList', title: '附件数量', align: 'center', | 216 | + field: 'attachmentList', title: '附件数量', align: 'center', |
217 | templet: '<div><span data-id="{{d.id}}" class="layui-table-link view-workReport-attachment">{{d.attachmentList.length}}</span></div>' | 217 | templet: '<div><span data-id="{{d.id}}" class="layui-table-link view-workReport-attachment">{{d.attachmentList.length}}</span></div>' |
218 | }, { | 218 | }, { |
219 | field: 'currIsRead', title: '状态', align: 'center', | 219 | field: 'currIsRead', title: '状态', align: 'center', |
@@ -253,11 +253,11 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts','laydate | @@ -253,11 +253,11 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts','laydate | ||
253 | return userName.toString(); | 253 | return userName.toString(); |
254 | } | 254 | } |
255 | }, { | 255 | }, { |
256 | - field: 'createUserNickName', title: '上报人', align: 'center', | 256 | + field: 'createUserNickName', title: '上报人', align: 'center', |
257 | }, { | 257 | }, { |
258 | - field: 'manufacturerName', title: '厂商', align: 'center', | 258 | + field: 'manufacturerName', title: '厂商', align: 'center', |
259 | }, { | 259 | }, { |
260 | - field: 'createTime', title: '上报时间', align: 'center', | 260 | + field: 'createTime', title: '上报时间', align: 'center', |
261 | }]], | 261 | }]], |
262 | done: function () { | 262 | done: function () { |
263 | //获取附件列表 | 263 | //获取附件列表 |
@@ -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 | }) |
@@ -1001,7 +1002,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts','laydate | @@ -1001,7 +1002,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts','laydate | ||
1001 | readChart.setOption(option); | 1002 | readChart.setOption(option); |
1002 | }); | 1003 | }); |
1003 | } | 1004 | } |
1004 | - | 1005 | + |
1005 | function setRead(workReportIds) { | 1006 | function setRead(workReportIds) { |
1006 | if (workReportIds.length == 0) { | 1007 | if (workReportIds.length == 0) { |
1007 | layer.msg('请至少选择一项未读的数据。', {icon: 0, time: 3000}); | 1008 | layer.msg('请至少选择一项未读的数据。', {icon: 0, time: 3000}); |
@@ -1055,4 +1056,4 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts','laydate | @@ -1055,4 +1056,4 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts','laydate | ||
1055 | // loadReportableChart(); | 1056 | // loadReportableChart(); |
1056 | } | 1057 | } |
1057 | }); | 1058 | }); |
1058 | -}); | ||
1059 | +}); |
@@ -107,63 +107,26 @@ layui.extend({ | @@ -107,63 +107,26 @@ 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 | - } | 110 | + var tabName; |
111 | + try { | ||
112 | + tabName= admin.tabsPage.elem.text() | ||
113 | + } catch (e){ | ||
133 | 114 | ||
134 | - }); | ||
135 | - | ||
136 | - } | ||
137 | - }); | 115 | + } |
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; | ||
161 | - element.tabAdd(FILTER_TAB_TBAS, { | ||
162 | - title: '<span>'+ (tabName || '新标签页') +'</span>' | ||
163 | - // title: '<span>'+ (res.title || '新标签页') +'</span>' | ||
164 | - ,id: pathURL | ||
165 | - ,attr: router.href | ||
166 | - }); | 124 | + tabsPage.index = tabs.length; |
125 | + element.tabAdd(FILTER_TAB_TBAS, { | ||
126 | + title: '<span>'+ (tabName || '新标签页') +'</span>' | ||
127 | + ,id: pathURL | ||
128 | + ,attr: router.href | ||
129 | + }); | ||
167 | } | 130 | } |
168 | } | 131 | } |
169 | 132 | ||
@@ -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