|
|
@@ -31,11 +31,11 @@ |
|
|
|
<div class="EC_col_8">
|
|
|
|
<div class="fr mt-26">
|
|
|
|
<el-button type="primary" round class="fr width_120" @click="goprojInfo" v-show="NewProductDailog == true">下一步</el-button>
|
|
|
|
<el-button type="primary" round class="fr width_120" @click="godistWork" v-show="ProjInfoDialog == true">下一步</el-button>
|
|
|
|
<el-button type="primary" round class="fr width_120" @click="createProject" v-show="marchWorkDialog == true"
|
|
|
|
<el-button type="primary" round class="fr width_120" @click="createProject" v-show="ProjInfoDialog == true" :disabled="isDisableCreate">创建项目</el-button>
|
|
|
|
<!-- <el-button type="primary" round class="fr width_120" @click="createProject"
|
|
|
|
:disabled="isDisableCreate">创建项目</el-button>
|
|
|
|
<el-button type="primary" round class="fr width_120" @click="addUser(nowFolderIndex)" v-show="marchWorkerPalDialog == true">分配职员</el-button>
|
|
|
|
<el-button type="primary" round class="fr width_120" @click="backdistWork" v-show="marchWorkerDialog == true">完成或跳过</el-button>
|
|
|
|
<el-button type="primary" round class="fr width_120" @click="backdistWork" v-show="marchWorkerDialog == true">完成或跳过</el-button> -->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="clear"></div>
|
|
|
@@ -94,18 +94,21 @@ |
|
|
|
</el-form-item>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="yiyun_col-12 fl" v-for="prop in listTempProp" :key="prop.propertyID">
|
|
|
|
<!-- 自定义字段显示并输入 -->
|
|
|
|
<div class="yiyun_col-12 fl" v-for="prop in checkNewProjData.CustomProps" :key="prop.Id">
|
|
|
|
<div class="yiyunlargeItem">
|
|
|
|
<el-form-item :label="prop.propertyName">
|
|
|
|
<el-input v-model="prop.propValue" placeholder="输入" class="labelinputbefore">
|
|
|
|
<el-form-item :label="prop.PropertyName">
|
|
|
|
<el-input v-model="prop.PropValue" placeholder="输入" @input="userDefineInput" class="labelinputbefore" :key="prop.Id">
|
|
|
|
</el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="clear"></div>
|
|
|
|
<div class="yiyun_col-12img fl mt-10">
|
|
|
|
<div class="clear"></div>
|
|
|
|
<div class="yiyun_col-6">
|
|
|
|
|
|
|
|
<div class="pageImgBox">
|
|
|
|
<img :src="coverSrc | resolveAvator" alt="" />
|
|
|
|
<file-uploader
|
|
|
@@ -148,10 +151,10 @@ |
|
|
|
<div class="fl firstPeople">
|
|
|
|
<!-- 默认添加 -->
|
|
|
|
<div >
|
|
|
|
<div class="avtarface" :title="currUser.userName">
|
|
|
|
<img src="" v-lazy="headSrc+currUser.headImgUrl"/>
|
|
|
|
<div class="avtarface" :title="currUser.cnName">
|
|
|
|
<img :src="currUser.headImgUrl | resolveAvator"/>
|
|
|
|
</div>
|
|
|
|
<span class="Text_tiny tinyText_wirte">{{currUser.userName}}</span>
|
|
|
|
<span class="Text_tiny tinyText_wirte">{{currUser.cnName}}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- 竖线 -->
|
|
|
@@ -166,9 +169,9 @@ |
|
|
|
<li v-for="(user,index) in newProjData.projectData.listProjManager" :key="index">
|
|
|
|
<div v-if="index < 14 || showAll ">
|
|
|
|
<div class="avtarface" :title="user.userName">
|
|
|
|
<img src="" v-lazy="headSrc+user.headImgUrl" />
|
|
|
|
<img :src="user.headImgUrl | resolveAvator" />
|
|
|
|
</div>
|
|
|
|
<span class="Text_tiny tinyText_wirte">{{user.userName}}</span>
|
|
|
|
<span class="Text_tiny tinyText_wirte">{{user.cnName}}</span>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
@@ -209,7 +212,7 @@ |
|
|
|
<li v-for="(user,index) in folder.manageUser" :key="index">
|
|
|
|
<div>
|
|
|
|
<div class="avtarface" title="编辑">
|
|
|
|
<img src="" v-lazy="headSrc+user.headImgUrl" />
|
|
|
|
<img :src="user.headImgUrl | resolveAvator" />
|
|
|
|
<div class="eiditIconimgBox" @click="addUserPal(folderIndex)">
|
|
|
|
<i class="icon font_family icon-icon_bianji1 eiditIconimg"></i>
|
|
|
|
</div>
|
|
|
@@ -229,7 +232,7 @@ |
|
|
|
<li v-for="(user,index) in listUserComputed(folder.listUser)" :key="index">
|
|
|
|
<div v-if="index < 14 || showAll ">
|
|
|
|
<div class="avtarface" :title="user.cnName">
|
|
|
|
<img src="" v-lazy="headSrc+user.headImgUrl" />
|
|
|
|
<img :src="user.headImgUrl | resolveAvator" />
|
|
|
|
</div>
|
|
|
|
<span class="Text_tiny tinyText_wirte">{{user.cnName}}</span>
|
|
|
|
</div>
|
|
|
@@ -270,7 +273,7 @@ |
|
|
|
<div class="touxiang_hezuorenBox fl">
|
|
|
|
<div class="yonghutouxiangBox" v-for="(user,checkIndex) in folder.listUser" :key="checkIndex">
|
|
|
|
<div class="touxiang_hezuorenBox-item">
|
|
|
|
<img v-lazy="headSrc+user.headImgUrl" class="imgHead">
|
|
|
|
<img :src="user.headImgUrl | resolveAvator" class="imgHead">
|
|
|
|
<i class="icon_delete el-icon-delete" title="删除" @click="deleteNewProjUser(index,checkIndex)"></i>
|
|
|
|
</div>
|
|
|
|
<span>{{user.cnName}}</span>
|
|
|
@@ -314,12 +317,14 @@ |
|
|
|
</span> -->
|
|
|
|
<span class="btnlabelTitle">{{dept.deptName}} </span>
|
|
|
|
</template>
|
|
|
|
<div class="user_info_item" v-for="(user,index) in listUserManager(dept.listUser)" :label="user"
|
|
|
|
<!-- <div class="user_info_item" v-for="(user,index) in listManagerComputed(dept.listUser)" :label="user"
|
|
|
|
:key="index"> -->
|
|
|
|
<div class="user_info_item" v-for="(user,index) in (dept.listUser)" :label="user"
|
|
|
|
:key="index">
|
|
|
|
<el-checkbox class="checkBoxCol" v-model="user.selected" @change="handleCheckedOnlyOne(group_index,user,$event)"
|
|
|
|
:disabled="disabled">
|
|
|
|
<div class="checkboxlabelitem">
|
|
|
|
<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">
|
|
|
@@ -348,16 +353,20 @@ |
|
|
|
<span>工作负责人</span>
|
|
|
|
<div class="yiyun_line"></div>
|
|
|
|
<!-- 项目负责人选择前 isSlectPal -->
|
|
|
|
<div class="main_workerBox" v-if="listManagerComputed(selectedUser).length == 0">
|
|
|
|
<!-- <div class="main_workerBox" v-if="listManagerComputed(selectedUser).length == 0"> -->
|
|
|
|
<div class="main_workerBox" v-if="(selectedUser).length == 0">
|
|
|
|
<i class="icon font_family icon-icon_huangguan-weijihuo largehuangguan"></i>
|
|
|
|
<div class="rentou_alrge"></div>
|
|
|
|
</div>
|
|
|
|
<!-- 项目负责人选择后 -->
|
|
|
|
<div v-if="listManagerComputed(selectedUser).length != 0">
|
|
|
|
<div class="user_info_item mainpeople_H" v-for="(user,index) in listManagerComputed(selectedUser)"
|
|
|
|
<!-- <div v-if="listManagerComputed(selectedUser).length != 0"> -->
|
|
|
|
<div v-if="(selectedUser).length != 0">
|
|
|
|
<!-- <div class="user_info_item mainpeople_H" v-for="(user,index) in listManagerComputed(selectedUser)"
|
|
|
|
:key="index"> -->
|
|
|
|
<div class="user_info_item mainpeople_H" v-for="(user,index) in (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 :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">
|
|
|
@@ -386,7 +395,7 @@ |
|
|
|
</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 :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">
|
|
|
@@ -440,14 +449,16 @@ |
|
|
|
<span class="quanxuanbtn">
|
|
|
|
<el-checkbox class="checkBoxCol" v-model="dept.disabled" :key="group_index" @change="handleCheckItemAll(group_index,$event)">全选</el-checkbox>
|
|
|
|
</span>
|
|
|
|
<span class="btnlabelTitle">{{dept.data.deptName}} </span>
|
|
|
|
<span class="btnlabelTitle">{{dept.deptName}} </span>
|
|
|
|
</template>
|
|
|
|
<div class="user_info_item" v-for="(user,index) in listUserComputed(dept)" :label="user"
|
|
|
|
<!-- <div class="user_info_item" v-for="(user,index) in listUserComputed(dept.listUser)" :label="user"
|
|
|
|
:key="index"> -->
|
|
|
|
<div class="user_info_item" v-for="(user,index) in (dept.listUser)" :label="user"
|
|
|
|
:key="index">
|
|
|
|
<el-checkbox class="checkBoxCol" v-model="user.disabled" @change="handleCheckedOne(group_index,user,$event)"
|
|
|
|
:disabled="disabled">
|
|
|
|
<div class="checkboxlabelitem">
|
|
|
|
<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.userName}}</span>
|
|
|
|
<el-popover placement="bottom-start" width="180" trigger="hover">
|
|
|
|
<ul class="popover_ul popover_ul">
|
|
|
@@ -476,17 +487,20 @@ |
|
|
|
<span>工作负责人</span>
|
|
|
|
<div class="yiyun_line"></div>
|
|
|
|
<!-- 项目负责人选择前 -->
|
|
|
|
<div class="main_workerBox" v-if="listManagerComputed(selectedUser).length == 0">
|
|
|
|
<!-- <div class="main_workerBox" v-if="listManagerComputed(selectedUser).length == 0"> -->
|
|
|
|
<div class="main_workerBox" v-if="(selectedUser).length == 0">
|
|
|
|
<i class="icon font_family icon-icon_huangguan-weijihuo largehuangguan"></i>
|
|
|
|
<div class="rentou_alrge"></div>
|
|
|
|
</div>
|
|
|
|
<!-- 项目负责人选择后 -->
|
|
|
|
<div v-if="listManagerComputed(selectedUser).length != 0">
|
|
|
|
<div class="user_info_item mainpeople_H" v-for="(user,index) in listManagerComputed(selectedUser)"
|
|
|
|
<!-- <div class="user_info_item mainpeople_H" v-for="(user,index) in listManagerComputed(selectedUser)"
|
|
|
|
:key="index"> -->
|
|
|
|
<div class="user_info_item mainpeople_H" v-for="(user,index) in (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">
|
|
|
|
<span class="user_info_name">{{user.userName}}</span>
|
|
|
|
<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">
|
|
|
|
<li><a href="javascript:;">{{user.roleName}}</a></li>
|
|
|
@@ -503,17 +517,17 @@ |
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div v-if="isShowFirstPeople">
|
|
|
|
<div class="row_painfr" v-for="dept in listDept" :key="dept.deptID" v-show="dept.listUser.length>0">
|
|
|
|
<div class="row_painfr" v-for="dept in listDept" :key="dept.id" v-show="dept.listUser.length>0">
|
|
|
|
<div v-for="deptID in listDeptUserNoZero(selectedUser)" :key="deptID">
|
|
|
|
<div v-if="deptID ==dept.deptID">
|
|
|
|
<div v-if="deptID ==dept.id">
|
|
|
|
<div class="yiyun_line"></div>
|
|
|
|
<span>{{dept.deptName}}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="renyuanbox" v-for="(user,index) in listUserComputed(selectedUser)" :key="index">
|
|
|
|
<div class="user_info_item" v-if="user.deptID ==dept.deptID">
|
|
|
|
<div class="renyuanbox" v-for="(user,index) in selectedUser" :key="index">
|
|
|
|
<div class="user_info_item" v-if="user.deptId == dept.id">
|
|
|
|
<!-- <i class="huangguan" @click="setManageUser(user)" title="设置负责人"></i> -->
|
|
|
|
<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.userName}}</span>
|
|
|
|
<el-popover placement="bottom-start" width="180" trigger="hover">
|
|
|
|
<ul class="popover_ul popover_ul">
|
|
|
@@ -566,6 +580,7 @@ |
|
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
|
|
const currentUser = this.$store.state.userInfo;
|
|
|
|
return {
|
|
|
|
imgSrc: process.env.API_HOST + 'archives/cover?path=',
|
|
|
|
headSrc: process.env.API_HOST + 'archives/head?path=',
|
|
|
@@ -585,6 +600,20 @@ |
|
|
|
selectTemlateData: "", //新建项目时加载的模板
|
|
|
|
selectTemlateID: "",
|
|
|
|
diaBodyheight: false,
|
|
|
|
checkNewProjData: {
|
|
|
|
"Proj": {
|
|
|
|
"ProjName":"",
|
|
|
|
"CompanyId":"",
|
|
|
|
"Notice":"",
|
|
|
|
"ShowImgUrl":"",
|
|
|
|
"TemplateId":"",
|
|
|
|
"CreateUserId":"",
|
|
|
|
"ModifyUserId":""
|
|
|
|
},
|
|
|
|
"Node": {},
|
|
|
|
"CustomProps": []
|
|
|
|
},
|
|
|
|
|
|
|
|
newProjData: {
|
|
|
|
"projectData": {
|
|
|
|
"projID": "",
|
|
|
@@ -630,7 +659,7 @@ |
|
|
|
ischeckAll: false, //是否是全部选中
|
|
|
|
newProjFolderIndex: 1,
|
|
|
|
// projectCreaterName: sessionStorage.cnName,
|
|
|
|
projectCreaterName: JSON.parse(sessionStorage.user).userName,
|
|
|
|
projectCreaterName: currentUser.cnName,
|
|
|
|
createDate: new Date().toLocaleDateString(),
|
|
|
|
listNewFolder: [],
|
|
|
|
listMyPermFolders: [], //获取项目文件夹
|
|
|
@@ -648,7 +677,7 @@ |
|
|
|
nowFolderIndex: '', //当前分配工作文件夹index
|
|
|
|
tempIndex: 0,
|
|
|
|
currSelectData: [],
|
|
|
|
currUser:JSON.parse(sessionStorage.user),
|
|
|
|
currUser:currentUser,
|
|
|
|
isShowManager:true,
|
|
|
|
|
|
|
|
/* */
|
|
|
@@ -731,7 +760,7 @@ |
|
|
|
let temp = [];
|
|
|
|
for (let i = 0; i < user.length; i++) {
|
|
|
|
if (user[i].folderPerm != 2) {
|
|
|
|
temp.push(user[i].deptID);
|
|
|
|
temp.push(user[i].deptId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var x = new Set(temp);
|
|
|
@@ -740,6 +769,12 @@ |
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
/**
|
|
|
|
* 用户自定义字段输入强制刷新 解决无法输入的问题
|
|
|
|
*/
|
|
|
|
userDefineInput: function() {
|
|
|
|
this.$forceUpdate();
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 检测bigbody滚动距离添加样式
|
|
|
|
*/
|
|
|
@@ -864,8 +899,21 @@ |
|
|
|
},
|
|
|
|
"listFolder": [],
|
|
|
|
"listProjProp": [],
|
|
|
|
"userId": "",
|
|
|
|
"userId": ""
|
|
|
|
};
|
|
|
|
thisApp.checkNewProjData = {
|
|
|
|
"Proj": {
|
|
|
|
"ProjName":"",
|
|
|
|
"CompanyId":"",
|
|
|
|
"Notice":"",
|
|
|
|
"ShowImgUrl":"",
|
|
|
|
"TemplateId":"",
|
|
|
|
"CreateUserId":"",
|
|
|
|
"ModifyUserId":""
|
|
|
|
},
|
|
|
|
"Node": {},
|
|
|
|
"CustomProps": []
|
|
|
|
},
|
|
|
|
thisApp.$emit("refreshListProj", false);
|
|
|
|
},
|
|
|
|
/*
|
|
|
@@ -873,7 +921,7 @@ |
|
|
|
*/
|
|
|
|
godistWork: function() {
|
|
|
|
this.isAllhide();
|
|
|
|
this.marchWorkDialog = true; //显示分配工作面板
|
|
|
|
// this.marchWorkDialog = true; //显示分配工作面板
|
|
|
|
//
|
|
|
|
// this.newProjData.projectData.listProjManager.push(JSON.parse(sessionStorage.user));
|
|
|
|
|
|
|
@@ -973,14 +1021,10 @@ |
|
|
|
this.isShowManager=false;
|
|
|
|
//左侧选中状态根据右侧人员状态改变
|
|
|
|
// this.setFolderPerm(this.newProjData.listFolder[parseInt(index)]);
|
|
|
|
fetchPlainDeptUserList(this.$store.state.currentCompanyId).then(res => {
|
|
|
|
this.listDept = res[0].children;
|
|
|
|
// this.$nextTick(() => {
|
|
|
|
// this.listDept = res[0].children//是一个包含公司部门的对象数组 每一个对象里面有具体的数据
|
|
|
|
// this.listDept = [...this.listDept];
|
|
|
|
// console.log('111111111111111111111',this.listDept);
|
|
|
|
// this.$forceUpdate();
|
|
|
|
// })
|
|
|
|
fetchPlainDeptUserList(this.$store.state.currentCompanyId).then(list => {
|
|
|
|
this.listDept = list;
|
|
|
|
this.listDept = [...this.listDept];
|
|
|
|
console.log('1111111111111111111111111',this.listDept);
|
|
|
|
}).catch(err => {
|
|
|
|
console.log(err);
|
|
|
|
})
|
|
|
@@ -1064,19 +1108,19 @@ |
|
|
|
* e:点击触发的事件
|
|
|
|
*/
|
|
|
|
handleCheckItemAll(index, e) {
|
|
|
|
for (var i = 0; i < this.listDept[index].children.length; i++) {
|
|
|
|
for (var i = 0; i < this.listDept[index].listUser[i].length; i++) {
|
|
|
|
if(!this.isShowManager)
|
|
|
|
{
|
|
|
|
if(this.currUser.userID == this.listDept[index].children[i].userID)
|
|
|
|
if(this.currUser.userID == this.listDept[index].listUser[i].id)
|
|
|
|
{
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (e) {
|
|
|
|
this.handleCheckedOne(index, this.listDept[index].children[i], false);
|
|
|
|
this.handleCheckedOne(index, this.listDept[index].children[i], e);
|
|
|
|
this.handleCheckedOne(index, this.listDept[index].listUser[i], false);
|
|
|
|
this.handleCheckedOne(index, this.listDept[index].listUser[i], e);
|
|
|
|
} else {
|
|
|
|
this.handleCheckedOne(index, this.listDept[index].children[i], e);
|
|
|
|
this.handleCheckedOne(index, this.listDept[index].listUser[i], e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
@@ -1105,10 +1149,10 @@ |
|
|
|
/*
|
|
|
|
*选择负责人
|
|
|
|
*/
|
|
|
|
// (group_index,user,$event)
|
|
|
|
handleCheckedOnlyOne(topIndex, user, e) { //三级change事件
|
|
|
|
if (e) {
|
|
|
|
//将选中的人员返回给添加合作人页面
|
|
|
|
|
|
|
|
this.checkDeptUserName(e, user);
|
|
|
|
this.setManagerUser(user);
|
|
|
|
this.isSlectPal = false;
|
|
|
@@ -1126,16 +1170,16 @@ |
|
|
|
getIsCheckSecondLevel(topIndex) {
|
|
|
|
var checkCount = 0;
|
|
|
|
for (var i = 0; i < this.listDept[topIndex].listUser.length; i++) {
|
|
|
|
if (this.listDept[topIndex].listUser[i].selected == true) {
|
|
|
|
if (this.listDept[topIndex].listUser[i]['selected'] == true) {
|
|
|
|
checkCount++;
|
|
|
|
} else {
|
|
|
|
checkCount--;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (checkCount == this.listDept[topIndex].listUser.length) { //三级级全勾选
|
|
|
|
this.listDept[topIndex].selected = true
|
|
|
|
this.listDept[topIndex]['selected'] = true
|
|
|
|
} else { //三级级全不勾选
|
|
|
|
this.listDept[topIndex].selected = false
|
|
|
|
this.listDept[topIndex]['selected'] = false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
/*
|
|
|
@@ -1147,7 +1191,7 @@ |
|
|
|
for (var j = 0; j < this.listDept.length; j++) { //全选checkbox状态
|
|
|
|
if (this.listDept[j].listUser.length > 0) {
|
|
|
|
haveDataCount++;
|
|
|
|
if (this.listDept[j].selected == true) {
|
|
|
|
if (this.listDept[j]['selected'] == true) {
|
|
|
|
checkCount++;
|
|
|
|
}
|
|
|
|
}
|
|
|
@@ -1189,12 +1233,12 @@ |
|
|
|
setFolderPerm: function(data) {
|
|
|
|
for (var j = 0; j < this.listDept.length; j++) {
|
|
|
|
for (var k = 0; k < this.listDept[j].listUser.length; k++) {
|
|
|
|
this.listDept[j].listUser[k].selected = false;
|
|
|
|
this.listDept[j].listUser[k]['selected'] = false;
|
|
|
|
this.listDept[j].listUser[k].folderPerm = 0;
|
|
|
|
for (var i = 0; i < data.listUser.length; i++) {
|
|
|
|
if (this.listDept[j].listUser[k].userID == data.listUser[i].userID) {
|
|
|
|
this.listDept[j].listUser[k].folderPerm = data.listUser[i].folderPerm;
|
|
|
|
this.listDept[j].listUser[k].selected = true;
|
|
|
|
this.listDept[j].listUser[k]['selected'] = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.getIsCheckSecondLevel(j);
|
|
|
@@ -1211,11 +1255,11 @@ |
|
|
|
if (this.selectedUser.length > 0) {
|
|
|
|
for (var k = 0; k < this.selectedUser.length; k++) {
|
|
|
|
if (this.listDept[i].listUser[j].userID === this.selectedUser[k].userID) {
|
|
|
|
this.listDept[i].listUser[j].selected = true;
|
|
|
|
this.listDept[i].listUser[j]['selected'] = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
this.listDept[i].listUser[j].selected = false;
|
|
|
|
this.listDept[i].listUser[j]['selected'] = false;
|
|
|
|
}
|
|
|
|
this.getIsCheckSecondLevel(i);
|
|
|
|
}
|
|
|
@@ -1226,7 +1270,7 @@ |
|
|
|
* 对已选协作人添加和删除
|
|
|
|
*/
|
|
|
|
checkDeptUserName: function(checked, item) {
|
|
|
|
item.selected = checked;
|
|
|
|
item['selected'] = checked;
|
|
|
|
if (checked) {
|
|
|
|
item.folderPerm = 1; // 默认角色为:查看和编辑
|
|
|
|
var valueUser = JSON.parse(JSON.stringify(item));
|
|
|
@@ -1254,43 +1298,35 @@ |
|
|
|
this.cancelCheck(this.selectedUser[i].userID);
|
|
|
|
}
|
|
|
|
this.getSelectTemplateList(this.selectTemlateID);
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 获取模板列表子节点数据
|
|
|
|
*/
|
|
|
|
getSelectTemplateList: function(templateID) {
|
|
|
|
var thisApp = this;
|
|
|
|
this.$axios({
|
|
|
|
method: 'get',
|
|
|
|
url: encodeURI(process.env.API_HOST + "templates/nodes/" + templateID + "/" + templateID),
|
|
|
|
})
|
|
|
|
.then(response => {
|
|
|
|
thisApp.SelectTemplateNodeList = response.data;
|
|
|
|
thisApp.newProjData.listFolder = [];
|
|
|
|
for (var i = 0; i < thisApp.SelectTemplateNodeList.length; i++) {
|
|
|
|
var folder = {
|
|
|
|
"folderID": "",
|
|
|
|
"projID": "",
|
|
|
|
"superID": "",
|
|
|
|
"levelID": "",
|
|
|
|
"firstFolderID": "",
|
|
|
|
"tempNodeID": thisApp.SelectTemplateNodeList[i].nodeID,
|
|
|
|
"folderName": thisApp.SelectTemplateNodeList[i].nodeName,
|
|
|
|
"fileCount": 0,
|
|
|
|
"childCount": 0,
|
|
|
|
"modifyUserID": "",
|
|
|
|
"deleted": 0,
|
|
|
|
"default": true,
|
|
|
|
"listUser": [],
|
|
|
|
"manageUser": []
|
|
|
|
};
|
|
|
|
thisApp.newProjData.listFolder.push(folder);
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.catch(error => {
|
|
|
|
console.log(error);
|
|
|
|
});
|
|
|
|
|
|
|
|
async getSelectTemplateList(templateID) {
|
|
|
|
const { Data } = await templateService.queryTemplateNodeByTemplateId(templateID);
|
|
|
|
const headNodes = (Data.children || []);
|
|
|
|
this.newProjData.listFolder = [];
|
|
|
|
headNodes.forEach(node => {
|
|
|
|
const folder = {
|
|
|
|
folderID: "",
|
|
|
|
projID: "",
|
|
|
|
superID: "",
|
|
|
|
levelID: "",
|
|
|
|
firstFolderID: "",
|
|
|
|
tempNodeID: node.id,
|
|
|
|
folderName: node.topic,
|
|
|
|
fileCount: 0,
|
|
|
|
childCount: 0,
|
|
|
|
modifyUserID: "",
|
|
|
|
deleted: 0,
|
|
|
|
default: true,
|
|
|
|
listUser: [],
|
|
|
|
manageUser: []
|
|
|
|
};
|
|
|
|
this.newProjData.listFolder.push(folder);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 设置随机封面
|
|
|
@@ -1366,7 +1402,7 @@ |
|
|
|
for (var i = 0; i < this.listDept.length; i++) {
|
|
|
|
for (var j = 0; j < this.listDept[i].listUser.length; j++) {
|
|
|
|
if (this.listDept[i].listUser[j].userID === userID) {
|
|
|
|
this.listDept[i].listUser[j].selected = false;
|
|
|
|
this.listDept[i].listUser[j]['selected'] = false;
|
|
|
|
this.listDept[i].listUser[j].folderPerm = 0;
|
|
|
|
this.getIsCheckSecondLevel(i);
|
|
|
|
}
|
|
|
@@ -1388,36 +1424,29 @@ |
|
|
|
/**
|
|
|
|
* 新建项目
|
|
|
|
*/
|
|
|
|
createProject: function() {
|
|
|
|
async createProject() {
|
|
|
|
// this.isAllhide();
|
|
|
|
this.isDisableCreate = true;
|
|
|
|
this.newProjData.userId = sessionStorage.userId;
|
|
|
|
this.newProjData.projectData.templateID = this.selectTemlateID;
|
|
|
|
var thisApp = this;
|
|
|
|
if (thisApp.uploadCoverTimes > 1) {
|
|
|
|
var parm = {
|
|
|
|
ListFilePath: thisApp.arryUnUseCover
|
|
|
|
};
|
|
|
|
this.$axios({
|
|
|
|
method: 'post',
|
|
|
|
url: encodeURI(process.env.API_HOST + 'webupload/files/clear'),
|
|
|
|
data: parm,
|
|
|
|
})
|
|
|
|
.then(response => {})
|
|
|
|
.catch(error => {
|
|
|
|
console.log(error);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
thisApp.newProjData.listProjProp = thisApp.listTempProp;
|
|
|
|
this.$axios({
|
|
|
|
method: 'post',
|
|
|
|
url: encodeURI(process.env.API_HOST + 'projects'),
|
|
|
|
data: thisApp.newProjData,
|
|
|
|
})
|
|
|
|
.then(response => {
|
|
|
|
if (response.data.state == 1) {
|
|
|
|
|
|
|
|
|
|
|
|
this.checkNewProjData.Proj.ProjName = this.newProjData.projectData.projName;
|
|
|
|
this.checkNewProjData.Proj.CompanyId = this.$store.state.currentCompanyId;
|
|
|
|
this.checkNewProjData.Proj.ShowImgUrl = String(this.newProjData.projectData.showImgUrl);
|
|
|
|
this.checkNewProjData.Proj.TemplateId = this.selectTemlateID;
|
|
|
|
this.checkNewProjData.Proj.CreateUserId = sessionStorage.userId;
|
|
|
|
this.checkNewProjData.Proj.ModifyUserId = sessionStorage.userId;
|
|
|
|
|
|
|
|
const res = await templateService.queryTemplateNodeByTemplateId(this.selectTemlateID);
|
|
|
|
this.checkNewProjData.Node = res.Data;
|
|
|
|
this.$fetchApi('project/CreateProject', JSON.stringify(this.checkNewProjData)).then(res => {
|
|
|
|
console.log(res);
|
|
|
|
if(res.Code === 0) {
|
|
|
|
thisApp.$notify({
|
|
|
|
title: "恭喜您",
|
|
|
|
message: response.data.message,
|
|
|
|
message: "项目创建成功",
|
|
|
|
type: "success",
|
|
|
|
offset: 100,
|
|
|
|
duration: 2500,
|
|
|
@@ -1425,19 +1454,22 @@ |
|
|
|
thisApp.reSetDialog();
|
|
|
|
thisApp.isDisableCreate = false;
|
|
|
|
thisApp.coverSrc = 'static\\img\\faceImg\\face01.png';
|
|
|
|
} else {
|
|
|
|
let timer = setTimeout(() => {
|
|
|
|
this.$emit('createProjSuccess');
|
|
|
|
clearTimeout(timer);
|
|
|
|
},3000)
|
|
|
|
} else {
|
|
|
|
thisApp.$notify.error({
|
|
|
|
title: '温馨提示',
|
|
|
|
message: response.data.message,
|
|
|
|
message: res.Msg,
|
|
|
|
offset: 100,
|
|
|
|
duration: 5000,
|
|
|
|
});
|
|
|
|
thisApp.isDisableCreate = false;
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.catch(error => {
|
|
|
|
console.log(error);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}).catch(err => console.log(err));
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 获取全部的Dept数据
|
|
|
@@ -1486,20 +1518,20 @@ |
|
|
|
/**
|
|
|
|
* 获取模板属性字段
|
|
|
|
*/
|
|
|
|
listTempPropLoad: function() {
|
|
|
|
var templateId = this.newProjData.projectData.templateID;
|
|
|
|
var thisApp = this;
|
|
|
|
this.$axios({
|
|
|
|
method: 'get',
|
|
|
|
url: encodeURI(process.env.API_HOST + "templates/templateproperty/" + templateId)
|
|
|
|
})
|
|
|
|
.then(response => {
|
|
|
|
thisApp.listTempProp = response.data;
|
|
|
|
})
|
|
|
|
.catch(error => {
|
|
|
|
console.log(error);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
// listTempPropLoad: function() {
|
|
|
|
// var templateId = this.newProjData.projectData.templateID;
|
|
|
|
// var thisApp = this;
|
|
|
|
// this.$axios({
|
|
|
|
// method: 'get',
|
|
|
|
// url: encodeURI(process.env.API_HOST + "templates/templateproperty/" + templateId)
|
|
|
|
// })
|
|
|
|
// .then(response => {
|
|
|
|
// thisApp.listTempProp = response.data;
|
|
|
|
// })
|
|
|
|
// .catch(error => {
|
|
|
|
// console.log(error);
|
|
|
|
// });
|
|
|
|
// },
|
|
|
|
/*
|
|
|
|
*进入项目概况
|
|
|
|
*/
|
|
|
@@ -1526,7 +1558,22 @@ |
|
|
|
});
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
this.listTempPropLoad(); // 获取模板属性字段
|
|
|
|
// this.listTempPropLoad();
|
|
|
|
// 获取模板属性字段
|
|
|
|
|
|
|
|
templateService.queryTemplateById(this.selectTemlateID).then(res => {
|
|
|
|
res.Data.propertys.forEach((item, index) => {
|
|
|
|
this.checkNewProjData.CustomProps[index] = {};
|
|
|
|
this.checkNewProjData.CustomProps[index]['TempPropId'] = item.Id;
|
|
|
|
this.checkNewProjData.CustomProps[index]['PropertyName'] = item.PropertyName;
|
|
|
|
this.checkNewProjData.CustomProps[index]['PropValue'] = "";
|
|
|
|
let temp = this.checkNewProjData.CustomProps;
|
|
|
|
this.checkNewProjData.CustomProps = [...temp];
|
|
|
|
})
|
|
|
|
this.checkNewProjData = [...this.checkNewProjData];
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
this.isAllhide();
|
|
|
|
this.setSystemCoverRandom();
|
|
|
|
this.ProjInfoDialog = true; //隐藏新建项目面板
|
|
|
@@ -1561,18 +1608,18 @@ |
|
|
|
]);
|
|
|
|
const deptHeadList = treeDeptList[0].children || [];
|
|
|
|
const oList = plainTreeNodes(deptHeadList, userList);
|
|
|
|
return oList;
|
|
|
|
return oList.filter(dept => dept.listUser && dept.listUser.length);
|
|
|
|
}
|
|
|
|
|
|
|
|
function plainTreeNodes(nodesList, userList, outputList = []) {
|
|
|
|
(nodesList || []).forEach(node => {
|
|
|
|
// node.id
|
|
|
|
node.listUser = userList.filter(user => user.deptId === node.id);
|
|
|
|
outputList.push(node);
|
|
|
|
const data = node.data;
|
|
|
|
data.listUser = userList.filter(user => user.deptId === node.id);
|
|
|
|
outputList.push(data);
|
|
|
|
if(node.children && node.children.length) {
|
|
|
|
plainTreeNodes(node.children, userList, outputList);
|
|
|
|
}
|
|
|
|
delete node.children;
|
|
|
|
})
|
|
|
|
return outputList;
|
|
|
|
}
|
|
|
|