Merge branch 'master' of http://192.168.1.136:82/monitor_v3/hg-monitor-web into …
…master-v32-lushangqing
Showing
8 changed files
with
96 additions
and
39 deletions
@@ -142,7 +142,6 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm | @@ -142,7 +142,6 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm | ||
142 | , done: function (res) { | 142 | , done: function (res) { |
143 | soulTable.render(this); | 143 | soulTable.render(this); |
144 | getResCount(bizId, newResType) | 144 | getResCount(bizId, newResType) |
145 | - | ||
146 | commonCols.colsClickEvent(); | 145 | commonCols.colsClickEvent(); |
147 | 146 | ||
148 | table.on('sort(bizResListTable)', function (obj) { | 147 | table.on('sort(bizResListTable)', function (obj) { |
@@ -173,7 +172,6 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm | @@ -173,7 +172,6 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm | ||
173 | 172 | ||
174 | //树表格 | 173 | //树表格 |
175 | function renderTreeTable(bizId, resType, reloadFlag) { | 174 | function renderTreeTable(bizId, resType, reloadFlag) { |
176 | - | ||
177 | $(".biz_reslist_search").hide(); | 175 | $(".biz_reslist_search").hide(); |
178 | $(".biz_reslist_treetable_search").show(); | 176 | $(".biz_reslist_treetable_search").show(); |
179 | $("#bizResListTableContent").hide(); | 177 | $("#bizResListTableContent").hide(); |
@@ -518,6 +516,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm | @@ -518,6 +516,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm | ||
518 | } | 516 | } |
519 | 517 | ||
520 | if (resType == 'MIDDLEWARE_WEBLOGIC') { | 518 | if (resType == 'MIDDLEWARE_WEBLOGIC') { |
519 | + $("#biz_reslist_res_colony_id").hide(); | ||
521 | $("#biz_reslist_link_state_id").hide(); | 520 | $("#biz_reslist_link_state_id").hide(); |
522 | $('#biz_reslist_server_state_id').show(); | 521 | $('#biz_reslist_server_state_id').show(); |
523 | } else { | 522 | } else { |
@@ -527,7 +526,8 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm | @@ -527,7 +526,8 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'soulTable', 'sessions', 'comm | ||
527 | if (targetId && searchType) { | 526 | if (targetId && searchType) { |
528 | var url = "/api-web/home/res-list/" + searchType + "?page=1&limit=50&busId=" + bizId; | 527 | var url = "/api-web/home/res-list/" + searchType + "?page=1&limit=50&busId=" + bizId; |
529 | if (searchType == 'MIDDLEWARE_WEBLOGIC') { | 528 | if (searchType == 'MIDDLEWARE_WEBLOGIC') { |
530 | - url += '&parentId=null' | 529 | + //增加parentType=parent,解决sql查询中问题 joke add 20211130 |
530 | + url += '&parentId=null&parentType=parent'; | ||
531 | } | 531 | } |
532 | admin.req({ | 532 | admin.req({ |
533 | url: common.domainName + url | 533 | url: common.domainName + url |
@@ -334,6 +334,10 @@ layui.define(['common', 'swiper', 'admin','commonDetail','mxClient','sessions',' | @@ -334,6 +334,10 @@ layui.define(['common', 'swiper', 'admin','commonDetail','mxClient','sessions',' | ||
334 | //点击告警数字,跳转至告警页面 | 334 | //点击告警数字,跳转至告警页面 |
335 | $("#indexbizhealth [data-index-banner-item='resType'] .index-banner-item-tips ").unbind('click').on("click", function () { | 335 | $("#indexbizhealth [data-index-banner-item='resType'] .index-banner-item-tips ").unbind('click').on("click", function () { |
336 | var restype = $(this).data('restype'); | 336 | var restype = $(this).data('restype'); |
337 | + //不以资源类型不包括父节点的资源类型 包括阿里云、华为云 | ||
338 | + if("ALI_CLOUD_PLAT"== restype || "HUAWEI_CLOUD_PLAT" == restype){ | ||
339 | + restype =restype.substring(0,restype.lastIndexOf("_")); | ||
340 | + } | ||
337 | var alink = document.createElement('a'); | 341 | var alink = document.createElement('a'); |
338 | alink.setAttribute("lay-href", "/alarm/activewarning/restype=" + restype); | 342 | alink.setAttribute("lay-href", "/alarm/activewarning/restype=" + restype); |
339 | document.body.appendChild(alink); | 343 | document.body.appendChild(alink); |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <a @click="editType(data)" style="margin-right: 10px;"> | 20 | <a @click="editType(data)" style="margin-right: 10px;"> |
21 | <i class="el-icon-edit"></i> | 21 | <i class="el-icon-edit"></i> |
22 | </a> | 22 | </a> |
23 | - <a @click="showFolder(true,false)" style="margin-right: 10px;"> | 23 | + <a @click="showFolder(true,false,node) " style="margin-right: 10px;"> |
24 | <i class="el-icon-plus"></i> | 24 | <i class="el-icon-plus"></i> |
25 | </a> | 25 | </a> |
26 | <a @click="deleteDocument(data.id,'folder')"> | 26 | <a @click="deleteDocument(data.id,'folder')"> |
@@ -166,7 +166,7 @@ | @@ -166,7 +166,7 @@ | ||
166 | </template> | 166 | </template> |
167 | </cm-dialog> | 167 | </cm-dialog> |
168 | 168 | ||
169 | - <cm-userright :showDialogVisible="showUserDialogVisible" :selectedArr="userFileRight" @callback="selectUser" | 169 | + <cm-userright :showDialogVisible="showUserDialogVisible" :selectedArr="userFileRight" :userArr="userList" :isUser="false" :showOrg="false" @callback="selectUser" |
170 | @hideDialog="showUserDialog"></cm-userright> | 170 | @hideDialog="showUserDialog"></cm-userright> |
171 | 171 | ||
172 | <cm-upload :showDialogVisible="showUploadDialogVisible" @callback="uploadCallBack" @hideDialog="showUploadFile" | 172 | <cm-upload :showDialogVisible="showUploadDialogVisible" @callback="uploadCallBack" @hideDialog="showUploadFile" |
@@ -289,7 +289,7 @@ export default { | @@ -289,7 +289,7 @@ export default { | ||
289 | */ | 289 | */ |
290 | let nodeClick = (node, data) => { | 290 | let nodeClick = (node, data) => { |
291 | let id = data.id; | 291 | let id = data.id; |
292 | - //currentNodeData.value = data; | 292 | + currentNodeData.value = node.data; |
293 | 293 | ||
294 | let arr = []; | 294 | let arr = []; |
295 | arr.push(id); | 295 | arr.push(id); |
@@ -367,6 +367,8 @@ export default { | @@ -367,6 +367,8 @@ export default { | ||
367 | proxy.$global.showMsg(res.msg, 'warning'); | 367 | proxy.$global.showMsg(res.msg, 'warning'); |
368 | } else { | 368 | } else { |
369 | proxy.$global.showMsg('放入回收站成功!'); | 369 | proxy.$global.showMsg('放入回收站成功!'); |
370 | + let isUser = !isUserFolder.value; | ||
371 | + reload(isUser); | ||
370 | } | 372 | } |
371 | 373 | ||
372 | if (props.isRecycle) { | 374 | if (props.isRecycle) { |
@@ -378,6 +380,7 @@ export default { | @@ -378,6 +380,7 @@ export default { | ||
378 | reload(isUser); | 380 | reload(isUser); |
379 | } | 381 | } |
380 | 382 | ||
383 | + | ||
381 | } | 384 | } |
382 | }) | 385 | }) |
383 | 386 | ||
@@ -440,7 +443,13 @@ export default { | @@ -440,7 +443,13 @@ export default { | ||
440 | type: '', | 443 | type: '', |
441 | sort: 100 | 444 | sort: 100 |
442 | }); | 445 | }); |
443 | - let showFolder = (flg, isUser) => { | 446 | + let showFolder = (flg, isUser,node) => { |
447 | + let title=""; | ||
448 | + if(node){ | ||
449 | + currentNodeData.value = node.data; | ||
450 | + title =`修改树节点“${currentNodeData.value.name}“子文件夹`; | ||
451 | + } | ||
452 | + | ||
444 | docForm.value = { | 453 | docForm.value = { |
445 | id:'', | 454 | id:'', |
446 | name: '', | 455 | name: '', |
@@ -450,7 +459,7 @@ export default { | @@ -450,7 +459,7 @@ export default { | ||
450 | }; | 459 | }; |
451 | isUserFolder.value = isUser; | 460 | isUserFolder.value = isUser; |
452 | addDialogVisible.value = flg; | 461 | addDialogVisible.value = flg; |
453 | - let title = `修改树节点“${currentNodeData.value.name}“子文件夹`; | 462 | + |
454 | if (addDialogVisible.value) { | 463 | if (addDialogVisible.value) { |
455 | title = `新建自定义文件夹`; | 464 | title = `新建自定义文件夹`; |
456 | } | 465 | } |
@@ -516,6 +525,9 @@ export default { | @@ -516,6 +525,9 @@ export default { | ||
516 | // 用户授权 | 525 | // 用户授权 |
517 | let showUserDialogVisible = Vue.ref(false); | 526 | let showUserDialogVisible = Vue.ref(false); |
518 | let userFileRight = Vue.ref([]); | 527 | let userFileRight = Vue.ref([]); |
528 | + //获取用户 | ||
529 | + let userList = Vue.ref([]); | ||
530 | + let isUser = Vue.ref("false"); | ||
519 | let getCheckedFile = () => { | 531 | let getCheckedFile = () => { |
520 | let arr = dataList.value.filter(function (v) { | 532 | let arr = dataList.value.filter(function (v) { |
521 | if (v.checked != undefined && v.checked == true) { | 533 | if (v.checked != undefined && v.checked == true) { |
@@ -696,6 +708,7 @@ export default { | @@ -696,6 +708,7 @@ export default { | ||
696 | * 挂载完 | 708 | * 挂载完 |
697 | */ | 709 | */ |
698 | Vue.onMounted(() => { | 710 | Vue.onMounted(() => { |
711 | + getUserList(); | ||
699 | // 预览模式 不展示左侧树 | 712 | // 预览模式 不展示左侧树 |
700 | if (!props.isView) { | 713 | if (!props.isView) { |
701 | getTree(); | 714 | getTree(); |
@@ -734,6 +747,35 @@ export default { | @@ -734,6 +747,35 @@ export default { | ||
734 | } | 747 | } |
735 | 748 | ||
736 | } | 749 | } |
750 | + //获取用户数据 | ||
751 | + let getUserList=()=>{ | ||
752 | + proxy.userList = []; | ||
753 | + | ||
754 | + // 查询信息中心的用户 | ||
755 | + proxy.$http.get("/api-user/org/getOrgUserList?orgCode=xxzx", {}, function (res) { | ||
756 | + if (res && res.data) { | ||
757 | + res.data.map(function (v) { | ||
758 | + let desc = []; | ||
759 | + let orgName = v.orgName; | ||
760 | + let nickname = v.nickname; | ||
761 | + if (orgName) { | ||
762 | + desc.push(orgName); | ||
763 | + } | ||
764 | + if (nickname) { | ||
765 | + desc.push(nickname); | ||
766 | + } | ||
767 | + | ||
768 | + proxy.userList.push({ | ||
769 | + value: v.username, | ||
770 | + type:'USER', | ||
771 | + desc: `${desc.join(' / ')}`, | ||
772 | + props : v | ||
773 | + }) | ||
774 | + }); | ||
775 | + | ||
776 | + } | ||
777 | + },function (){},false) | ||
778 | + } | ||
737 | 779 | ||
738 | return { | 780 | return { |
739 | /* viewEdit,*/ | 781 | /* viewEdit,*/ |
@@ -771,6 +813,8 @@ export default { | @@ -771,6 +813,8 @@ export default { | ||
771 | userFileRight, | 813 | userFileRight, |
772 | selectUser, | 814 | selectUser, |
773 | showUserDialog, | 815 | showUserDialog, |
816 | + userList, | ||
817 | + isUser, | ||
774 | 818 | ||
775 | showUploadDialogVisible, | 819 | showUploadDialogVisible, |
776 | historyNode, | 820 | historyNode, |
@@ -43,6 +43,16 @@ export default { | @@ -43,6 +43,16 @@ export default { | ||
43 | type: Array, | 43 | type: Array, |
44 | default: ['取消', '授权'] | 44 | default: ['取消', '授权'] |
45 | }, | 45 | }, |
46 | + //用户数据 | ||
47 | + userArr:{ | ||
48 | + type: Array, | ||
49 | + default:[], | ||
50 | + }, | ||
51 | + //是否获取所有用户数据 | ||
52 | + isUser:{ | ||
53 | + type: Boolean, | ||
54 | + default: true | ||
55 | + } | ||
46 | }, | 56 | }, |
47 | data() { | 57 | data() { |
48 | return { | 58 | return { |
@@ -53,8 +63,11 @@ export default { | @@ -53,8 +63,11 @@ export default { | ||
53 | const {proxy} = Vue.getCurrentInstance(); | 63 | const {proxy} = Vue.getCurrentInstance(); |
54 | 64 | ||
55 | let allArr = Vue.ref([]); | 65 | let allArr = Vue.ref([]); |
56 | - | ||
57 | let userArr = Vue.ref([]); | 66 | let userArr = Vue.ref([]); |
67 | + let isUser = props.isUser; | ||
68 | + if(!isUser){ | ||
69 | + userArr.value = props.userArr; | ||
70 | + } | ||
58 | let roleArr = Vue.ref([]); | 71 | let roleArr = Vue.ref([]); |
59 | let orgArr = Vue.ref([]); | 72 | let orgArr = Vue.ref([]); |
60 | let activeName = Vue.ref('user'); | 73 | let activeName = Vue.ref('user'); |
@@ -71,33 +84,30 @@ export default { | @@ -71,33 +84,30 @@ export default { | ||
71 | } | 84 | } |
72 | 85 | ||
73 | const getAllUser = () => { | 86 | const getAllUser = () => { |
74 | - if(userArr.value.length != 0){ | ||
75 | - return; | 87 | + if(isUser){ |
88 | + // 查询全部用户 | ||
89 | + proxy.$http.get("/api-user/users?page=1&limit=10000&username=&nickname=&enabled=&orgId=&roles=", {}, function (res) { | ||
90 | + if (res && res.data) { | ||
91 | + res.data.map(function (v) { | ||
92 | + let desc = []; | ||
93 | + let orgName = v.orgName; | ||
94 | + let nickname = v.nickname; | ||
95 | + if (orgName) { | ||
96 | + desc.push(orgName); | ||
97 | + } | ||
98 | + if (nickname) { | ||
99 | + desc.push(nickname); | ||
100 | + } | ||
101 | + userArr.value.push({ | ||
102 | + value: v.username, | ||
103 | + type:'USER', | ||
104 | + desc: `${desc.join(' / ')}`, | ||
105 | + props : v | ||
106 | + }) | ||
107 | + }); | ||
108 | + } | ||
109 | + },function (){},false) | ||
76 | } | 110 | } |
77 | - // 查询全部用户 | ||
78 | - proxy.$http.get("/api-user/users?page=1&limit=10000&username=&nickname=&enabled=&orgId=&roles=", {}, function (res) { | ||
79 | - if (res && res.data) { | ||
80 | - res.data.map(function (v) { | ||
81 | - let desc = []; | ||
82 | - let orgName = v.orgName; | ||
83 | - let nickname = v.nickname; | ||
84 | - if (orgName) { | ||
85 | - desc.push(orgName); | ||
86 | - } | ||
87 | - if (nickname) { | ||
88 | - desc.push(nickname); | ||
89 | - } | ||
90 | - | ||
91 | - userArr.value.push({ | ||
92 | - value: v.username, | ||
93 | - type:'USER', | ||
94 | - desc: `${desc.join(' / ')}`, | ||
95 | - props : v | ||
96 | - }) | ||
97 | - }); | ||
98 | - } | ||
99 | - },function (){},false) | ||
100 | - | ||
101 | } | 111 | } |
102 | 112 | ||
103 | const getAllRole = () => { | 113 | const getAllRole = () => { |
@@ -266,7 +276,7 @@ export default { | @@ -266,7 +276,7 @@ export default { | ||
266 | hidedialog, | 276 | hidedialog, |
267 | activeName, | 277 | activeName, |
268 | 278 | ||
269 | - userArr, | 279 | + //userArr, |
270 | roleArr, | 280 | roleArr, |
271 | orgArr, | 281 | orgArr, |
272 | 282 |
@@ -59,7 +59,7 @@ export default { | @@ -59,7 +59,7 @@ export default { | ||
59 | var params = { | 59 | var params = { |
60 | // page: pageInfo.page, | 60 | // page: pageInfo.page, |
61 | // limit: pageInfo.limit, | 61 | // limit: pageInfo.limit, |
62 | - username: '1', | 62 | + username: localStorage.getItem("lgn"), |
63 | }; | 63 | }; |
64 | proxy.$http.get("/api-web/bOpsProject/getTree", params, function (res) { | 64 | proxy.$http.get("/api-web/bOpsProject/getTree", params, function (res) { |
65 | if (res && res.data) { | 65 | if (res && res.data) { |
-
Please register or login to post a comment