@@ -96,7 +96,7 @@ | |||
<!-- 默认添加 --> | |||
<div > | |||
<div class="avtarface" :title="currUser.cnName"> | |||
<img src="" v-lazy="headSrc+currUser.headImgUrl" /> | |||
<img :src="currUser.headImgUrl | resolveAvator"/> | |||
</div> | |||
<span class="Text_tiny tinyText_wirte">{{currUser.cnName}}</span> | |||
</div> | |||
@@ -112,7 +112,8 @@ | |||
<li v-for="(user, index) in listManagerUser" :key="index"> | |||
<div v-if="index < 14 || showAll "> | |||
<div class="avtarface" :title="user.cnName"> | |||
<img src="" v-lazy="headSrc+user.headImgUrl" /> | |||
<!-- <img src="" v-lazy="headSrc+user.headImgUrl" /> --> | |||
<img :src="user.headImgUrl | resolveAvator" /> | |||
</div> | |||
<span class="Text_tiny tinyText_wirte">{{user.cnName}}</span> | |||
</div> | |||
@@ -161,7 +162,8 @@ | |||
)" :key="index"> | |||
<div> | |||
<div class="avtarface" title="编辑"> | |||
<img src="" v-lazy="headSrc + user.headImgUrl" @click="aloneAddUserForFolder(folder)" /> | |||
<!-- <img src="" v-lazy="headSrc + user.headImgUrl" @click="aloneAddUserForFolder(folder)" /> --> | |||
<img :src="user.headImgUrl | resolveAvator" @click="aloneAddUserForFolder(folder)" /> | |||
</div> | |||
<span class="Text_tiny tinyText_wirte">{{ | |||
user.cnName | |||
@@ -182,7 +184,8 @@ | |||
)" :key="index"> | |||
<div v-if="index < 14 || showAll"> | |||
<div class="avtarface" title="编辑"> | |||
<img src="" v-lazy="headSrc + user.headImgUrl" /> | |||
<!-- <img src="" v-lazy="headSrc + user.headImgUrl" /> --> | |||
<img :src="user.headImgUrl | resolveAvator" /> | |||
</div> | |||
<span class="Text_tiny tinyText_wirte">{{ | |||
user.cnName | |||
@@ -355,7 +358,8 @@ | |||
) | |||
" :disabled="disabled"> | |||
<div class="checkboxlabelitem"> | |||
<img v-lazy="headSrc + user.headImgUrl" alt="" class="user_info_faceImg" /> | |||
<!-- <img v-lazy="headSrc + user.headImgUrl" alt="" class="user_info_faceImg" /> --> | |||
<img :src="user.headImgUrl | resolveAvator" alt="" class="user_info_faceImg" /> | |||
<span class="user_info_name">{{ | |||
user.cnName | |||
}}</span> | |||
@@ -375,7 +379,7 @@ | |||
<a href="javascript:;">所在项目{{ user.projCount }}个</a> | |||
</li> | |||
</ul> | |||
<span class="user_info_job" slot="reference">{{ user.position }}</span> | |||
<span class="user_info_job" slot="reference">{{user.position }}</span> | |||
</el-popover> | |||
<span class="user_info_role">{{ | |||
user.roleName | |||
@@ -408,7 +412,8 @@ | |||
selectedUser | |||
)" :key="index"> | |||
<i class="icon font_family icon-icon_huangguan-jihuo middlehuangguan fl" title="负责人"></i> | |||
<img v-lazy="headSrc + user.headImgUrl" alt="" class="user_info_faceImg" /> | |||
<!-- <img v-lazy="headSrc + user.headImgUrl" alt="" class="user_info_faceImg" /> --> | |||
<img :src="user.headImgUrl | resolveAvator" alt="" class="user_info_faceImg" /> | |||
<span class="user_info_name">{{ user.cnName }}</span> | |||
<el-popover placement="bottom-start" width="180" trigger="hover"> | |||
<ul class="popover_ul popover_ul"> | |||
@@ -508,7 +513,8 @@ | |||
handleCheckedOne(group_index, user, $event) | |||
" :disabled="disabled"> | |||
<div class="checkboxlabelitem"> | |||
<img v-lazy="headSrc + user.headImgUrl" alt="" class="user_info_faceImg" /> | |||
<!-- <img v-lazy="headSrc + user.headImgUrl" alt="" class="user_info_faceImg" /> --> | |||
<img :src="user.headImgUrl | resolveAvator" alt="" class="user_info_faceImg" /> | |||
<span class="user_info_name">{{ | |||
user.cnName | |||
}}</span> | |||
@@ -528,7 +534,7 @@ | |||
<a href="javascript:;">所在项目{{ user.projCount }}个</a> | |||
</li> | |||
</ul> | |||
<span class="user_info_job" slot="reference">{{ user.position }}</span> | |||
<span class="user_info_job" slot="reference">{{ user.position}}</span> | |||
</el-popover> | |||
<span class="user_info_role">{{ | |||
user.roleName | |||
@@ -562,7 +568,8 @@ | |||
selectedUser | |||
)" :key="index"> | |||
<i class="icon font_family icon-icon_huangguan-jihuo middlehuangguan fl" title="负责人"></i> | |||
<img v-lazy="headSrc + user.headImgUrl" alt="" class="user_info_faceImg" /> | |||
<!-- <img v-lazy="headSrc + user.headImgUrl" alt="" class="user_info_faceImg" /> --> | |||
<img :src="user.headImgUrl | resolveAvator" alt="" class="user_info_faceImg" /> | |||
<span class="user_info_name">{{ user.cnName }}</span> | |||
<el-popover placement="bottom-start" width="180" trigger="hover"> | |||
<ul class="popover_ul popover_ul"> | |||
@@ -600,7 +607,8 @@ | |||
</div> | |||
<div class="renyuanbox" v-for="(user, index) in listUserComputed(selectedUser)" :key="index"> | |||
<div class="user_info_item" v-if="user.deptID == dept.deptID"> | |||
<img v-lazy="headSrc + user.headImgUrl" alt="" class="user_info_faceImg" /> | |||
<!-- <img v-lazy="headSrc + user.headImgUrl" alt="" class="user_info_faceImg" /> --> | |||
<img :src="user.headImgUrl | resolveAvator" alt="" class="user_info_faceImg" /> | |||
<span class="user_info_name">{{ user.cnName }}</span> | |||
<el-popover placement="bottom-start" width="180" trigger="hover"> | |||
<ul class="popover_ul popover_ul"> | |||
@@ -650,6 +658,8 @@ | |||
</template> | |||
<script> | |||
import { getUserInfo,roleOptions,fetchAddressBook,getUserListByNode,roleMap,stateOptions} from '@/services/user.js'; | |||
export default { | |||
data() { | |||
return { | |||
@@ -708,7 +718,7 @@ | |||
this.loadProjManager(); | |||
}, | |||
mounted: function () { | |||
this.getUserInfo(sessionStorage.createUserID); | |||
this._getUserInfo(sessionStorage.createUserID); | |||
this.getNowProject(); | |||
this.getListProjProp(); | |||
this.listFolderChildren(); | |||
@@ -719,6 +729,7 @@ | |||
window.addEventListener('scroll',this.handleScroll,true) | |||
}, | |||
computed: { | |||
/** | |||
* 过滤后的部门列表:去除没有用户数据的部门 | |||
*/ | |||
@@ -1046,6 +1057,30 @@ | |||
this.selectedManageUser = data.manageUser; | |||
this.isShowThreePage = true; | |||
this.isShowFirstPage = false; | |||
}, | |||
/** | |||
* 根据部门Id查找部门信息 | |||
*/ | |||
plainTreeNodes(nodesList, userList, outputList = []) { | |||
(nodesList || []).forEach(node => { | |||
// node.id | |||
const data = node.data; | |||
data.listUser = userList.filter(user => user.deptId === node.id); | |||
outputList.push(data); | |||
if(node.children && node.children.length) { | |||
this.plainTreeNodes(node.children, userList, outputList); | |||
} | |||
}); | |||
return outputList; | |||
}, | |||
async fetchPlainDeptUserList(companyId) { | |||
const [treeDeptList, { list: userList }] = await Promise.all([ | |||
fetchAddressBook(companyId), | |||
getUserListByNode({ id: companyId, nodeType: 'company' }, 1, 10000) | |||
]); | |||
const deptHeadList = treeDeptList[0].children || []; | |||
const oList = this.plainTreeNodes(deptHeadList, userList); | |||
return oList.filter(dept => dept.listUser && dept.listUser.length); | |||
}, | |||
/* | |||
* 设置项目负责人 | |||
@@ -1061,6 +1096,15 @@ | |||
this.selectedManageUser = []; | |||
this.isShowThreePage = true; | |||
this.isShowFirstPage = false; | |||
this.fetchPlainDeptUserList(this.$store.state.currentCompanyId).then(list => { | |||
this.listDept = list; | |||
this.listDept = [...this.listDept]; | |||
console.log('1111111111111111111111111',this.listDept); | |||
}).catch(err => { | |||
console.log(err); | |||
}) | |||
// this.selectedUser = this.newProjData.projectData.listProjManager; | |||
}, | |||
/* | |||
*顶部全选 | |||
@@ -1376,25 +1420,43 @@ | |||
}); | |||
}, | |||
//获取用户个人信息 | |||
getUserInfo: function (userId) { | |||
var thisApp = this; | |||
this.$axios({ | |||
method: "get", | |||
url: encodeURI(process.env.API_HOST + "sysinfo/user/" + userId) | |||
}) | |||
.then(response => { | |||
var data = response.data; | |||
thisApp.curProjCreatePeop = | |||
data.cnName + "指派了新工作,请完成工作指派"; | |||
if (sessionStorage.allocated == 1) | |||
{ | |||
thisApp.curProjCreatePeop = "项目管理"; | |||
} | |||
}) | |||
.catch(error => { | |||
console.log(error); | |||
}); | |||
async _getUserInfo(userId) { | |||
try { | |||
let res = await getUserInfo(userId); | |||
console.log('我是用户的信息',res); | |||
this.curProjCreatePeop = | |||
res.cnName + " 指派了新工作,请完成工作指派"; | |||
if (sessionStorage.allocated == 1) | |||
{ | |||
this.curProjCreatePeop = "项目管理"; | |||
} | |||
if(res.roleName === "项目负责人") { | |||
this.isProjManager = true; | |||
} | |||
} catch(err) { | |||
console.log(err); | |||
} | |||
}, | |||
// getUserInfo: function (userId) { | |||
// var thisApp = this; | |||
// this.$axios({ | |||
// method: "get", | |||
// url: encodeURI(process.env.API_HOST + "sysinfo/user/" + userId) | |||
// }) | |||
// .then(response => { | |||
// var data = response.data; | |||
// thisApp.curProjCreatePeop = | |||
// data.cnName + "指派了新工作,请完成工作指派"; | |||
// if (sessionStorage.allocated == 1) | |||
// { | |||
// thisApp.curProjCreatePeop = "项目管理"; | |||
// } | |||
// }) | |||
// .catch(error => { | |||
// console.log(error); | |||
// }); | |||
// }, | |||
/** | |||
* 分配工作完成 | |||
*/ | |||
@@ -1457,6 +1519,10 @@ | |||
console.log(error); | |||
}); | |||
}, | |||
/** | |||
* 设置与用户的positon 相对应的字段映射 | |||
*/ | |||
}, | |||
beforeDestroy(){ | |||
// 销毁监听 | |||
@@ -1464,3 +1530,10 @@ | |||
} | |||
}; | |||
</script> | |||
<style scoped lang="scss"> | |||
::v-deep .el-checkbox:last-of-type { | |||
margin-right: 30px; | |||
} | |||
</style> |
@@ -589,7 +589,7 @@ | |||
filePicker:'uploadCover', | |||
uploadLabel: "编辑封面", | |||
srcIndex: 2, // 封面切换Index | |||
coverSrc: 'static\\img\\faceImg\\face01.png', | |||
coverSrc: 'static/img/faceImg/face01.png', | |||
cnName: '', | |||
listDept: [], // 项目协作人列表 | |||
selectedUser: [], // 当前文件夹的已选协作人 | |||
@@ -1338,9 +1338,9 @@ | |||
} | |||
this.srcIndex=temp; | |||
if(this.srcIndex===10){ | |||
this.coverSrc = "static\\img\\faceImg\\face" + this.srcIndex + ".png"; | |||
this.coverSrc = "static/img/faceImg/face" + this.srcIndex + ".png"; | |||
}else{ | |||
this.coverSrc = "static\\img\\faceImg\\face0" + this.srcIndex + ".png"; | |||
this.coverSrc = "static/img/faceImg/face0" + this.srcIndex + ".png"; | |||
} | |||
this.newProjData.projectData.showImgUrl = this.coverSrc; | |||
@@ -1453,7 +1453,7 @@ | |||
}); | |||
thisApp.reSetDialog(); | |||
thisApp.isDisableCreate = false; | |||
thisApp.coverSrc = 'static\\img\\faceImg\\face01.png'; | |||
thisApp.coverSrc = 'static/img/faceImg/face01.png'; | |||
let timer = setTimeout(() => { | |||
this.$emit('createProjSuccess'); | |||
clearTimeout(timer); | |||
@@ -238,7 +238,8 @@ | |||
) | |||
" :disabled="disabled"> | |||
<div class="checkboxlabelitem"> | |||
<img v-lazy="headSrc + user.headImgUrl" alt="" class="user_info_faceImg" /> | |||
<!-- <img v-lazy="headSrc + user.headImgUrl" alt="" class="user_info_faceImg" /> --> | |||
<img :src="user.headImgUrl | resolveAvator" alt="" class="user_info_faceImg"/> | |||
<span class="user_info_name">{{ | |||
user.cnName | |||
}}</span> | |||
@@ -291,7 +292,8 @@ | |||
selectedUser | |||
)" :key="index"> | |||
<i class="icon font_family icon-icon_huangguan-jihuo middlehuangguan fl" title="负责人"></i> | |||
<img v-lazy="headSrc + user.headImgUrl" alt="" class="user_info_faceImg" /> | |||
<!-- <img v-lazy="headSrc + user.headImgUrl" alt="" class="user_info_faceImg" /> --> | |||
<img :src="user.headImgUrl | resolveAvator" alt="" class="user_info_faceImg"/> | |||
<span class="user_info_name">{{ user.cnName }}</span> | |||
<el-popover placement="bottom-start" width="180" trigger="hover"> | |||
<ul class="popover_ul popover_ul"> | |||
@@ -389,7 +391,8 @@ | |||
handleCheckedOne(group_index, user, $event) | |||
" :disabled="disabled"> | |||
<div class="checkboxlabelitem"> | |||
<img v-lazy="headSrc + user.headImgUrl" alt="" class="user_info_faceImg" /> | |||
<!-- <img v-lazy="headSrc + user.headImgUrl" alt="" class="user_info_faceImg" /> --> | |||
<img :src="user.headImgUrl | resolveAvator" alt="" class="user_info_faceImg"/> | |||
<span class="user_info_name">{{ | |||
user.cnName | |||
}}</span> | |||
@@ -442,7 +445,8 @@ | |||
selectedUser | |||
)" :key="index"> | |||
<i class="icon font_family icon-icon_huangguan-jihuo middlehuangguan fl" title="负责人"></i> | |||
<img v-lazy="headSrc + user.headImgUrl" alt="" class="user_info_faceImg" /> | |||
<!-- <img v-lazy="headSrc + user.headImgUrl" alt="" class="user_info_faceImg" /> --> | |||
<img :src="user.headImgUrl | resolveAvator" alt="" class="user_info_faceImg"/> | |||
<span class="user_info_name">{{ user.cnName }}</span> | |||
<el-popover placement="bottom-start" width="180" trigger="hover"> | |||
<ul class="popover_ul popover_ul"> | |||
@@ -479,7 +483,8 @@ | |||
</div> | |||
<div class="renyuanbox" v-for="(user, index) in listUserComputed(selectedUser)" :key="index"> | |||
<div class="user_info_item" v-if="user.deptID == dept.deptID"> | |||
<img v-lazy="headSrc + user.headImgUrl" alt="" class="user_info_faceImg" /> | |||
<!-- <img v-lazy="headSrc + user.headImgUrl" alt="" class="user_info_faceImg" /> --> | |||
<img :src="user.headImgUrl | resolveAvator" alt="" class="user_info_faceImg"/> | |||
<span class="user_info_name">{{ user.cnName }}</span> | |||
<el-popover placement="bottom-start" width="180" trigger="hover"> | |||
<ul class="popover_ul popover_ul"> | |||
@@ -532,10 +537,12 @@ import { wrapOssProtocol} from "@/services/oss"; | |||
FileUploader | |||
}, | |||
props: { | |||
isProjManager: { | |||
type: Boolean, | |||
default: false | |||
isProjManager:{ | |||
type:Boolean, | |||
default:false | |||
}, | |||
isSetFolder: { | |||
type: Boolean, | |||
default: false | |||
@@ -555,7 +562,7 @@ import { wrapOssProtocol} from "@/services/oss"; | |||
headSrc: process.env.API_HOST + "archives/head?path=", | |||
chunkUploadUrl: process.env.API_HOST + 'webupload/chunks', | |||
uploadCompId: sessionStorage.companyId, | |||
coverSrc: 'static\\img\\faceImg\\face01.png', | |||
coverSrc: 'static/img/faceImg/face01.png', | |||
uploadTypeCover: 2, | |||
filePicker:"projFilePicker", | |||
srcIndex: 2, // 封面切换Index | |||
@@ -595,7 +602,7 @@ import { wrapOssProtocol} from "@/services/oss"; | |||
isShowSetUsers: false, // 分配工作人员面板 | |||
isShowProjInfo: true, // 项目概况 | |||
isShowInfoEdit: false, // 项目概况编辑 | |||
isShowEditProjBtn: true, // 编辑项目概况按钮 | |||
isShowEditProjBtn: false, // 编辑项目概况按钮 | |||
isShowSaveAllBtn: false, // 保存全部信息按钮 | |||
currWorkName: "", // 分配人员时工作名称 | |||
currentProjId:"", | |||
@@ -717,6 +724,28 @@ import { wrapOssProtocol} from "@/services/oss"; | |||
console.log(updateData) | |||
const res=await prjService.EditProject(updateData); | |||
this.projInfo(this.currentProjId); | |||
var thisApp = this; | |||
if (res.Code === 0) { | |||
this.$notify({ | |||
title: "恭喜您", | |||
message: '项目信息修改成功', | |||
type: "success", | |||
offset: 30, | |||
duration: 2500 | |||
}); | |||
setTimeout(()=> { | |||
thisApp.$emit("editSuccess"); | |||
},2000) | |||
} else { | |||
this.$notify({ | |||
title: "温馨提示", | |||
message: '项目信息修改出现错误!', | |||
type: "error", | |||
offset: 30, | |||
duration: 5000 | |||
}); | |||
} | |||
this.isShowSaveAllBtn = false; | |||
this.isShowInfoEdit = false; | |||
this.isShowEditProjBtn = true; | |||
@@ -1126,10 +1155,14 @@ import { wrapOssProtocol} from "@/services/oss"; | |||
async projInfo(id){ | |||
const projectInfoRes= await prjService.QueryProjectInfoByProjId(id); | |||
this.nowProject=projectInfoRes.Data; | |||
this.nowProject.ProjCreateTime=dayjs(this.nowProject.ProjCreateTime).format('YYYY-MM-DD HH:mm:ss') | |||
this.nowProject.ProjCreateTime=dayjs(this.nowProject.ProjCreateTime).format('YYYY-MM-DD HH:mm:ss'); | |||
this.nowProject = {...this.nowProject}; | |||
this.listProjProp=projectInfoRes.Data.CustomProps; | |||
this.isProjManager=projectInfoRes.Data.Status; | |||
//this.isProjManager=projectInfoRes.Data.Status; | |||
this.listProjProp = [...this.listProjProp]; | |||
this.coverSrc=projectInfoRes.Data.ShowImgUrl; | |||
console.log(projectInfoRes); | |||
console.log(this.isProjManager); | |||
}, | |||
/** | |||
* 获取全部的Dept数据 | |||
@@ -1200,7 +1233,7 @@ import { wrapOssProtocol} from "@/services/oss"; | |||
*/ | |||
setSystemCover: function () { | |||
this.coverSrc = "static\\img\\faceImg\\face0" + this.srcIndex + ".png"; | |||
this.coverSrc = "static/img/faceImg/face0" + this.srcIndex + ".png"; | |||
this.nowProject.showImgUrl = this.srcIndex; | |||
if (this.srcIndex < 9) | |||
{ | |||
@@ -1219,11 +1252,11 @@ import { wrapOssProtocol} from "@/services/oss"; | |||
} | |||
this.srcIndex=temp; | |||
if(this.srcIndex===10){ | |||
this.coverSrc = "static\\img\\faceImg\\face" + this.srcIndex + ".png"; | |||
this.coverSrc = "static/img/faceImg/face" + this.srcIndex + ".png"; | |||
}else{ | |||
this.coverSrc = "static\\img\\faceImg\\face0" + this.srcIndex + ".png"; | |||
this.coverSrc = "static/img/faceImg/face0" + this.srcIndex + ".png"; | |||
} | |||
this.nowProjData.ShowImgUrl = this.srcIndex; | |||
this.nowProjData.ShowImgUrl = this.coverSrc; | |||
}, | |||
watch: { | |||
@@ -66,8 +66,8 @@ | |||
</div> | |||
</section> | |||
<!-- 项目列表 --> | |||
<section class="yiyun_warpContent mt-20"> | |||
<div class="yiyun-rows" id="alone" v-infinite-scroll="scrollLoad"> | |||
<section class="yiyun_warpContent mt-20" style="height:100%; overflow:auto"> | |||
<div class="yiyun-rows" id="alone" v-infinite-scroll="scrollLoad" style="height: 100%"> | |||
<div v-show="isEmpty" class="nullproduct"> | |||
<img src="static\img\nopro.png" alt /> | |||
<span class="noprotext">暂无项目</span> | |||
@@ -102,9 +102,12 @@ | |||
<el-dropdown-item @click.native="openPrjInfo(projItem)"> | |||
<span>项目概况</span> | |||
</el-dropdown-item> | |||
<el-dropdown-item | |||
<!-- <el-dropdown-item | |||
@click.native="addNewFolders(projItem)" | |||
v-if="projItem.folderPerm == 2" | |||
> --> | |||
<el-dropdown-item | |||
@click.native="addNewFolders(projItem)" | |||
> | |||
<span>工作指派</span> | |||
</el-dropdown-item> | |||
@@ -581,10 +584,10 @@ export default { | |||
*分配工作单独弹框(传输数据) | |||
*/ | |||
addNewFolders: function (projData) { | |||
sessionStorage.projId = projData.projID; | |||
sessionStorage.createUserID = projData.createUserID; | |||
sessionStorage.templateID = projData.templateID; | |||
sessionStorage.allocated = projData.allocated; | |||
sessionStorage.projId = projData.Id; | |||
sessionStorage.createUserID = projData.CreateUserId; | |||
sessionStorage.templateID = projData.TemplateId; | |||
sessionStorage.allocated = projData.Allocated; | |||
this.isAloneDistProj = true; | |||
}, | |||
/** | |||
@@ -30,7 +30,12 @@ module.exports = { | |||
proxy: { | |||
'/api/pms': { | |||
// target: 'http://47.104.91.134:8089', | |||
<<<<<<< HEAD | |||
target:'http://10.240.32.182:8089', | |||
======= | |||
target:'http://10.240.32.182:8089', | |||
>>>>>>> e9b6dbf0f95b3153bc23274e785a22f020a837e1 | |||
changeOrigin: true, | |||
secure: false, | |||
}, | |||