Authored by 王涛

优化

@@ -10,3 +10,5 @@ ALTER TABLE `inspection-report`.`b_insepectionreport_type` @@ -10,3 +10,5 @@ ALTER TABLE `inspection-report`.`b_insepectionreport_type`
10 10
11 -- 授权所有type 11 -- 授权所有type
12 INSERT INTO b_inspection_document_auth ( id, docId, userName, roleId ) SELECT UUID( ), id, 'admin' AS userName, '' AS roleId FROM b_insepectionreport_type; 12 INSERT INTO b_inspection_document_auth ( id, docId, userName, roleId ) SELECT UUID( ), id, 'admin' AS userName, '' AS roleId FROM b_insepectionreport_type;
  13 +INSERT INTO b_inspection_document_auth ( id, docId, userName, roleId ) SELECT UUID( ), id, 'admin' AS userName, '' AS roleId FROM b_insepectionreport_document;
  14 +
@@ -24,7 +24,6 @@ report: @@ -24,7 +24,6 @@ report:
24 ## 涉及SQL 24 ## 涉及SQL
25 `SQL/zj/V1015_2_增加文档管理表字段.sql` 25 `SQL/zj/V1015_2_增加文档管理表字段.sql`
26 26
27 -  
28 ## 涉及工程 27 ## 涉及工程
29 >> hg-monitor-web-zj 28 >> hg-monitor-web-zj
30 > 29 >
@@ -11,10 +11,10 @@ @@ -11,10 +11,10 @@
11 :expand-on-click-node="false" :expand-on-click-node="true" :default-expanded-keys="defaultExpandedKeys"> 11 :expand-on-click-node="false" :expand-on-click-node="true" :default-expanded-keys="defaultExpandedKeys">
12 <template #default="{ node, data }"> 12 <template #default="{ node, data }">
13 <div style="display: flex;flex-direction: row;width: 100%;"> 13 <div style="display: flex;flex-direction: row;width: 100%;">
14 - <div style="width: calc(100% - 85px);max-width: calc(100% - 85px);overflow: hidden;text-overflow: ellipsis;text-align: left;" @click="nodeClick(node, data)" :title="node.label"> 14 + <div :style="{'width':isAdmin() ? 'calc(100% - 85px)':'100%','max-width':isAdmin() ? 'calc(100% - 85px)':'100%'}" style="overflow: hidden;text-overflow: ellipsis;text-align: left;" @click="nodeClick(node, data)" :title="node.label">
15 {{node.label }} 15 {{node.label }}
16 </div> 16 </div>
17 - <div style="width: 60px;" v-if="isAdmin()"> 17 + <div v-if="isAdmin()" :style="{'width':isAdmin()?'60px':'0px'}">
18 <a @click="editType(data)" style="margin-right: 10px;"> 18 <a @click="editType(data)" style="margin-right: 10px;">
19 <i class="el-icon-edit"></i> 19 <i class="el-icon-edit"></i>
20 </a> 20 </a>
@@ -9,7 +9,8 @@ export default { @@ -9,7 +9,8 @@ export default {
9 // 展示文档类型,默认展示类型 9 // 展示文档类型,默认展示类型
10 types: { 10 types: {
11 type: Array, 11 type: Array,
12 - default: ['fxbg', 'gf', 'gzgl', 'jkjc', 'lxwh', 'pzgl', 'rcxj'] 12 + //default: ['fxbg', 'gf', 'gzgl', 'jkjc', 'lxwh', 'pzgl', 'rcxj']
  13 + default: []
13 }, 14 },
14 // 是否是预览模式 15 // 是否是预览模式
15 // 预览模式不展示授权按钮 16 // 预览模式不展示授权按钮
@@ -327,10 +328,16 @@ export default { @@ -327,10 +328,16 @@ export default {
327 proxy.$global.showMsg('放入回收站成功!'); 328 proxy.$global.showMsg('放入回收站成功!');
328 } 329 }
329 330
330 - // 属性tree 331 + if(props.isRecycle){
  332 + // 回收栈刷新
  333 + reload(true);
  334 + } else {
  335 + // 判断是否刷新tree
331 let isUser = !isUserFolder.value; 336 let isUser = !isUserFolder.value;
332 reload(isUser); 337 reload(isUser);
333 } 338 }
  339 +
  340 + }
334 }) 341 })
335 342
336 }); 343 });
@@ -469,27 +476,13 @@ export default { @@ -469,27 +476,13 @@ export default {
469 return v.username; 476 return v.username;
470 }); 477 });
471 let roleCodes = userObj.role.map(function (v) { 478 let roleCodes = userObj.role.map(function (v) {
472 - return v.code; 479 + return v.id;
473 }); 480 });
474 481
475 let docIds = getCheckedFile().map(function (v) { 482 let docIds = getCheckedFile().map(function (v) {
476 return v.id; 483 return v.id;
477 }); 484 });
478 485
479 -  
480 - // // 保存用户权限  
481 - // let params = {  
482 - // docIds: docIds.join(','),  
483 - // roleIds: roleCodes.join(','),  
484 - // usernames: userIds.join(',')  
485 - // }  
486 - // proxy.$http.get(`/inspection-report/doc/doc/auth/grant`, params, function (res) {  
487 - // if (res && res.code == 0) {  
488 - // proxy.$global.showMsg('授权成功!');  
489 - // } else {  
490 - // proxy.$global.showMsg('授权失败!', 'warning');  
491 - // }  
492 - // })  
493 // 保存用户权限 486 // 保存用户权限
494 let params = { 487 let params = {
495 authDocIds: docIds, 488 authDocIds: docIds,
@@ -497,9 +490,6 @@ export default { @@ -497,9 +490,6 @@ export default {
497 authUsernames: userIds 490 authUsernames: userIds
498 } 491 }
499 492
500 - // authDocIds: docIds.join(','),  
501 - // authRoleIds: roleCodes.join(','),  
502 - // authUsernames: userIds.join(',')  
503 proxy.$http.post(`/inspection-report/file/doc/grant`, params, function (res) { 493 proxy.$http.post(`/inspection-report/file/doc/grant`, params, function (res) {
504 if (res && res.success) { 494 if (res && res.success) {
505 proxy.$global.showMsg('授权成功!'); 495 proxy.$global.showMsg('授权成功!');
@@ -120,7 +120,7 @@ export default { @@ -120,7 +120,7 @@ export default {
120 category:props.category, 120 category:props.category,
121 docNo:props.docNo 121 docNo:props.docNo
122 } 122 }
123 -debugger 123 +
124 // 上传文件 124 // 上传文件
125 proxy.$http.uploadFile("/inspection-report/file/upload", params, function (res) { 125 proxy.$http.uploadFile("/inspection-report/file/upload", params, function (res) {
126 if (res && res.code == 0) { 126 if (res && res.code == 0) {
@@ -133,7 +133,6 @@ debugger @@ -133,7 +133,6 @@ debugger
133 } 133 }
134 134
135 let fileChange = (file, fileList) =>{ 135 let fileChange = (file, fileList) =>{
136 -debugger  
137 console.log(file, fileList); 136 console.log(file, fileList);
138 } 137 }
139 138
@@ -52,7 +52,7 @@ let http = { @@ -52,7 +52,7 @@ let http = {
52 if (errFunc) { 52 if (errFunc) {
53 errFunc(); 53 errFunc();
54 } 54 }
55 - console.log("==>", requestUrl, xhr, textStatus) 55 + // console.log("==>", requestUrl, xhr, textStatus)
56 http.reqErr(textStatus.status); 56 http.reqErr(textStatus.status);
57 }, 57 },
58 success: function (data, textStatus, jqXHR) { 58 success: function (data, textStatus, jqXHR) {
@@ -98,7 +98,7 @@ let http = { @@ -98,7 +98,7 @@ let http = {
98 if(showLoadding && showLoadding == true){ 98 if(showLoadding && showLoadding == true){
99 loading.close(); 99 loading.close();
100 } 100 }
101 - console.log("==>", requestUrl, xhr, textStatus) 101 + // console.log("==>", requestUrl, xhr, textStatus)
102 http.reqErr(textStatus.status); 102 http.reqErr(textStatus.status);
103 103
104 if (errFunc) { 104 if (errFunc) {
@@ -146,8 +146,10 @@ let http = { @@ -146,8 +146,10 @@ let http = {
146 data: formData, 146 data: formData,
147 error: function (xhr, textStatus) { 147 error: function (xhr, textStatus) {
148 loading.close(); 148 loading.close();
149 - console.log("==>", requestUrl, xhr, textStatus) 149 + // console.log("==>", requestUrl, xhr, textStatus)
150 http.reqErr(textStatus.status); 150 http.reqErr(textStatus.status);
  151 + http.proxy.$global.showMsg("上传失败,请您确认文件是否存在!","error");
  152 +
151 }, 153 },
152 success: function (data, textStatus, jqXHR) { 154 success: function (data, textStatus, jqXHR) {
153 if (callback) { 155 if (callback) {
@@ -155,7 +157,7 @@ let http = { @@ -155,7 +157,7 @@ let http = {
155 try { 157 try {
156 d = JSON.parse(data); 158 d = JSON.parse(data);
157 }catch (e) { 159 }catch (e) {
158 - console.log(e); 160 + console.log('JSON转换失败:',e);
159 } 161 }
160 callback(d); 162 callback(d);
161 } 163 }