Authored by 王涛

优化

... ... @@ -10,3 +10,5 @@ ALTER TABLE `inspection-report`.`b_insepectionreport_type`
-- 授权所有type
INSERT INTO b_inspection_document_auth ( id, docId, userName, roleId ) SELECT UUID( ), id, 'admin' AS userName, '' AS roleId FROM b_insepectionreport_type;
INSERT INTO b_inspection_document_auth ( id, docId, userName, roleId ) SELECT UUID( ), id, 'admin' AS userName, '' AS roleId FROM b_insepectionreport_document;
... ...
... ... @@ -24,7 +24,6 @@ report:
## 涉及SQL
`SQL/zj/V1015_2_增加文档管理表字段.sql`
## 涉及工程
>> hg-monitor-web-zj
>
... ...
... ... @@ -11,10 +11,10 @@
:expand-on-click-node="false" :expand-on-click-node="true" :default-expanded-keys="defaultExpandedKeys">
<template #default="{ node, data }">
<div style="display: flex;flex-direction: row;width: 100%;">
<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">
<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">
{{node.label }}
</div>
<div style="width: 60px;" v-if="isAdmin()">
<div v-if="isAdmin()" :style="{'width':isAdmin()?'60px':'0px'}">
<a @click="editType(data)" style="margin-right: 10px;">
<i class="el-icon-edit"></i>
</a>
... ...
... ... @@ -9,7 +9,8 @@ export default {
// 展示文档类型,默认展示类型
types: {
type: Array,
default: ['fxbg', 'gf', 'gzgl', 'jkjc', 'lxwh', 'pzgl', 'rcxj']
//default: ['fxbg', 'gf', 'gzgl', 'jkjc', 'lxwh', 'pzgl', 'rcxj']
default: []
},
// 是否是预览模式
// 预览模式不展示授权按钮
... ... @@ -327,9 +328,15 @@ export default {
proxy.$global.showMsg('放入回收站成功!');
}
// 属性tree
let isUser = !isUserFolder.value;
reload(isUser);
if(props.isRecycle){
// 回收栈刷新
reload(true);
} else {
// 判断是否刷新tree
let isUser = !isUserFolder.value;
reload(isUser);
}
}
})
... ... @@ -469,27 +476,13 @@ export default {
return v.username;
});
let roleCodes = userObj.role.map(function (v) {
return v.code;
return v.id;
});
let docIds = getCheckedFile().map(function (v) {
return v.id;
});
// // 保存用户权限
// let params = {
// docIds: docIds.join(','),
// roleIds: roleCodes.join(','),
// usernames: userIds.join(',')
// }
// proxy.$http.get(`/inspection-report/doc/doc/auth/grant`, params, function (res) {
// if (res && res.code == 0) {
// proxy.$global.showMsg('授权成功!');
// } else {
// proxy.$global.showMsg('授权失败!', 'warning');
// }
// })
// 保存用户权限
let params = {
authDocIds: docIds,
... ... @@ -497,9 +490,6 @@ export default {
authUsernames: userIds
}
// authDocIds: docIds.join(','),
// authRoleIds: roleCodes.join(','),
// authUsernames: userIds.join(',')
proxy.$http.post(`/inspection-report/file/doc/grant`, params, function (res) {
if (res && res.success) {
proxy.$global.showMsg('授权成功!');
... ...
... ... @@ -120,7 +120,7 @@ export default {
category:props.category,
docNo:props.docNo
}
debugger
// 上传文件
proxy.$http.uploadFile("/inspection-report/file/upload", params, function (res) {
if (res && res.code == 0) {
... ... @@ -133,7 +133,6 @@ debugger
}
let fileChange = (file, fileList) =>{
debugger
console.log(file, fileList);
}
... ...
... ... @@ -52,7 +52,7 @@ let http = {
if (errFunc) {
errFunc();
}
console.log("==>", requestUrl, xhr, textStatus)
// console.log("==>", requestUrl, xhr, textStatus)
http.reqErr(textStatus.status);
},
success: function (data, textStatus, jqXHR) {
... ... @@ -98,7 +98,7 @@ let http = {
if(showLoadding && showLoadding == true){
loading.close();
}
console.log("==>", requestUrl, xhr, textStatus)
// console.log("==>", requestUrl, xhr, textStatus)
http.reqErr(textStatus.status);
if (errFunc) {
... ... @@ -146,8 +146,10 @@ let http = {
data: formData,
error: function (xhr, textStatus) {
loading.close();
console.log("==>", requestUrl, xhr, textStatus)
// console.log("==>", requestUrl, xhr, textStatus)
http.reqErr(textStatus.status);
http.proxy.$global.showMsg("上传失败,请您确认文件是否存在!","error");
},
success: function (data, textStatus, jqXHR) {
if (callback) {
... ... @@ -155,7 +157,7 @@ let http = {
try {
d = JSON.parse(data);
}catch (e) {
console.log(e);
console.log('JSON转换失败:',e);
}
callback(d);
}
... ...