Showing
4 changed files
with
24 additions
and
15 deletions
@@ -413,6 +413,11 @@ export default { | @@ -413,6 +413,11 @@ export default { | ||
413 | proxy.$global.confirm(msg, function () { | 413 | proxy.$global.confirm(msg, function () { |
414 | proxy.$http.post(url, info, function (res) { | 414 | proxy.$http.post(url, info, function (res) { |
415 | if (res && res.code == 0) { | 415 | if (res && res.code == 0) { |
416 | + // 执行回调,获取文件id列表 | ||
417 | + if(res.data){ | ||
418 | + emit('deleteCallback',res.data); | ||
419 | + } | ||
420 | + | ||
416 | if (res.msg) { | 421 | if (res.msg) { |
417 | proxy.$global.showMsg(res.msg, 'warning'); | 422 | proxy.$global.showMsg(res.msg, 'warning'); |
418 | } else { | 423 | } else { |
@@ -19,6 +19,14 @@ global.common = { | @@ -19,6 +19,14 @@ global.common = { | ||
19 | return roleStr.split(","); | 19 | return roleStr.split(","); |
20 | } | 20 | } |
21 | return []; | 21 | return []; |
22 | + }, | ||
23 | + isAdminManager : function (){ | ||
24 | + let userName = global.common.getUserName(); | ||
25 | + let roles = global.common.getUserRole(); | ||
26 | + if (roles && userName) { | ||
27 | + return userName == 'admin' || userName == 'root' || roles.includes('ADMIN'); | ||
28 | + } | ||
29 | + return false; | ||
22 | } | 30 | } |
23 | 31 | ||
24 | }; | 32 | }; |
@@ -319,20 +327,6 @@ global.getBase64 = (file) => { | @@ -319,20 +327,6 @@ global.getBase64 = (file) => { | ||
319 | }); | 327 | }); |
320 | } | 328 | } |
321 | 329 | ||
322 | -/** | ||
323 | - * 判断是否是管理员角色 | ||
324 | - * <p> | ||
325 | - * 作者: Wang | ||
326 | - * 时间:2021/12/13 14:31 | ||
327 | - */ | ||
328 | -global.isAdminRole = () => { | ||
329 | - let roles = sessionStorage.getItem('roles'); | ||
330 | - if (roles && roles.indexOf('ADMIN') != -1) { | ||
331 | - return true; | ||
332 | - } | ||
333 | - return false; | ||
334 | -} | ||
335 | - | ||
336 | global.getAlarmLevel = (level) => { | 330 | global.getAlarmLevel = (level) => { |
337 | let params = { | 331 | let params = { |
338 | "3": {name: '严重告警', color: '#D81E06'}, | 332 | "3": {name: '严重告警', color: '#D81E06'}, |
@@ -88,6 +88,14 @@ export default { | @@ -88,6 +88,14 @@ export default { | ||
88 | }); | 88 | }); |
89 | } | 89 | } |
90 | 90 | ||
91 | + /** | ||
92 | + * 文档删除的回调 | ||
93 | + * @param docIds 文档id集合 | ||
94 | + */ | ||
95 | + let delDocRel = (docIds) => { | ||
96 | + // | ||
97 | + } | ||
98 | + | ||
91 | // 监听编辑状态 | 99 | // 监听编辑状态 |
92 | Vue.watch(() => props.treeNode, (newValue, oldVlaue) => { | 100 | Vue.watch(() => props.treeNode, (newValue, oldVlaue) => { |
93 | initFlg.value = false; | 101 | initFlg.value = false; |
@@ -102,7 +110,8 @@ export default { | @@ -102,7 +110,8 @@ export default { | ||
102 | return { | 110 | return { |
103 | docIds, | 111 | docIds, |
104 | saveOpsLog, | 112 | saveOpsLog, |
105 | - initFlg | 113 | + initFlg, |
114 | + delDocRel | ||
106 | } | 115 | } |
107 | } | 116 | } |
108 | } | 117 | } |
-
Please register or login to post a comment