|
- <!--
- * @Description: 分配工作组件
- * @version: V1.0
- * @Author: xzx
- * @Date: 2019-11-14 13:55:16
- * @LastEditors : xzx
- * @LastEditTime : 2020-01-07 19:56:20
- -->
- <template>
- <div>
- <!-- 底部弹框 -->
- <div class="bottomdialog" v-show="isBottomNewProj" style="height: 60px;">
- <!-- <div style="margin-top: 10px;" class="yiyun_dialog_left yiyun_zhedie" @click="showContinueNewProj">
- <span class="yiyun_zhankaibtn">
- <i class="Cicon text_gray icon font_family icon-icon_zhankai" title="展开面板"></i>
- </span>
- </div> -->
- <div style="margin-top: 10px;" class="yiyun_dialog_left yiyun_zhedie" @click="offDialog">
- 关闭
- </div>
-
- <div class="yiyun_dialog_center">
- <div class="bottomdialogbox_list_head newProject_next_taggle1 line_H60">
- <div class="yiyun_col-6 fl">
- <h3>继续-新建项目</h3>
- </div>
- </div>
- </div>
- <!-- <div class="yiyun_dialog_right yiyundialog_close" style="margin-top: 15px;" @click="offDialog">
- 关闭
- </div> -->
- </div>
-
- <!-- 新建项目弹框 -->
- <div class="bottomdialog">
- <div class="yiyun_dialog_left yiyun_zhedie">
- <span @click="offDialog">关闭</span>
- <!-- <span class="yiyun_zhediebtn">
- <i
- class="Cicon text_gray icon font_family icon-icon_shouqi"
- @click="showzhankai"
- title="折叠面板"
- v-show="isShowThreePage != true"
- ></i>
- </span> -->
- </div>
- <div class="yiyun_dialog_center">
- <!-- 头部信息 -->
- <span class="backshangyicheng prev_to_2" @click="toSecondPage" v-show="isShowThreePage == true && isShowManager"><i class="yiyun_icon icon_topnav_backicon"></i></span>
- <span class="backshangyicheng prev_to_2" @click="toFirstPage" v-show="isShowSecondPage == true"><i class="yiyun_icon icon_topnav_backicon"></i></span>
- <span class="backshangyicheng prev_to_2" @click="backFirstPage" v-show="isShowPrjDesc == true"><i class="yiyun_icon icon_topnav_backicon"></i></span>
- <div class="bottomdialogbox_list_head newProject_next_taggle1">
- <div class="EC_col_16">
- <h3 v-show="isShowFirstPage" :title="curProjCreatePeop">
- {{ curProjCreatePeop }}
- </h3>
- <h3 v-show="isShowPrjDesc == true">项目概况</h3>
- <h3 v-show="isShowThreePage == true">指派职员</h3>
- <h3 v-show="isShowSecondPage == true">指派工作负责人</h3>
- </div>
- <div class="EC_col_8">
- <div class="fr mt-26">
- <el-button type="primary" round class="fr width_120" @click="toThreePage" v-show="isShowSecondPage == true">分配职员</el-button>
- <el-button type="primary" round class="fr width_120" @click="backFirstPage" v-show="isShowThreePage == true">完成或跳过</el-button>
- <el-button type="primary" round class="fr width_120" @click="submitAndClose" v-show="isShowFirstPage == true">完成</el-button>
- </div>
- </div>
- <div class="clear"></div>
- <div class="yiyun_Tbline"></div>
- </div>
- </div>
- <div class="yiyun_dialog_right yiyundialog_close">
- <!-- <span @click="offDialog">关闭</span> -->
- </div>
- <div class="clear"></div>
- <div class="linescoll" v-show="isShowdivid2"></div>
- <div class="dialogcontentbody" id="bottomDiaBody2">
- <div class="dialogcontentbodyrow" id="bottomDiaChild2">
- <div class="centerWarpDia" >
- <div v-show="isShowFirstPage" class="PaincenterBox">
- <!-- first pane -->
- <!-- 线下内容区 -->
- <div class="xiezuobox">
- <!-- <div class="maxlongBtn" v-on:click="goShowPrjDesc">
- 查看项目概况
- <i class="icon font_family icon-icon_fanhui rightIcon"></i>
- </div> -->
- <div class="clear"></div>
- <!-- 分配业主工作 -->
- <div class="line_from">
- <!-- 项目管理权限 start -->
- <div class="fuzeren" v-if="isProjManager">
- <div><span class="label_text">项目管理权限</span> </div>
- <div class="mt-10">
- <div class="fl firstPeople">
- <!-- 默认添加 -->
- <div >
- <div class="avtarface" :title="currUser.cnName">
- <img :src="currUser.userInfo.headImgUrl | resolveAvator"/>
- </div>
- <span class="Text_tiny tinyText_wirte">{{currUser.cnName}}</span>
- </div>
- </div>
- <!-- 竖线 -->
- <div class="fl vhLine mlr-20"></div>
- <!-- 添加职员 -->
- <div class="fl addBtn_new" title="添加项目负责人" @click="addProjManager()">
- <i class="el-icon-plus middleaddEC"></i>
- </div>
- <div class="fl chengyuanbox">
- <ul class="ECworkerList">
- <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="user.headImgUrl | resolveAvator" />
- </div>
- <span class="Text_tiny tinyText_wirte">{{user.cnName}}</span>
- </div>
- </li>
- </ul>
- </div>
- </div>
- </div>
- <!-- 项目管理权限 end -->
- <div>
- <div class="tianjiaxiezuorenBox" v-for="(folder, folderIndex) in listNewFolder" :key="folderIndex">
- <div v-if="tempIndex!=folderIndex||folderIndex==0" class="self_newitem">
- <h5 class="fl label_text">
- <i class="el-icon-caret-right hand" v-show="opentree" @click="openECtree"></i>
- <i class="el-icon-caret-bottom hand" v-show="!opentree" @click="closeECtree"></i>
- {{ folderIndex + 1 }} <span>.</span>
- {{ folder.folderName }}
- </h5>
- <div class="selfoptiongroup">
- <el-button v-if="folder.default == false" v-on:click="eidtTitle(folderIndex)">编辑</el-button>
- </div>
- </div>
- <div v-if="showTitle == 2&&tempIndex==folderIndex" class="self_newitem">
- <input v-model="folder.folderName" :class="
- folder.default == false
- ? 'bianji_input self_Inputwork'
- : 'fl label_text_moren'
- " :disabled="folder.default" />
- <div class="selfoptiongroup">
- <el-button type="primary" v-if="folder.default == false" v-on:click="saveTitle">保存</el-button>
- <el-button v-if="folder.default == false" v-on:click="deleTitle(folderIndex)">删除</el-button>
- </div>
- </div>
- <div>
- <div class="fl firstPeople">
- <!-- 默认添加 -->
- <div v-if="folder.manageUser == ''">
- <div class="avtarface" @click="aloneAddUserForFolder(folder)">
- <!-- <i class="large_huangguan icon font_family icon-icon_huangguan-jihuo"></i> -->
- <i class="large_huangguan el-icon-plus"></i>
- </div>
- <span class="Text_tiny tinyText_wirte">工作负责人</span>
- </div>
- <li v-for="(user, index) in folder.manageUser" :key="index">
- <div>
- <div class="avtarface" title="编辑">
- <!-- <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
- }}</span>
- </div>
- </li>
- </div>
- <!-- 竖线 -->
- <div class="fl vhLine mlr-20"></div>
- <!-- 添加职员 -->
- <div class="fl addBtn_new" title="添加职员" @click="aloneAddUserOnlyStaff(folder)" v-if="folder.manageUser != ''">
- <i class="el-icon-plus middleaddEC"></i>
- </div>
- <div class="fl chengyuanbox">
- <ul class="ECworkerList">
- <li v-for="(user, index) in listUserComputed(
- folder.listUser
- )" :key="index">
- <div v-if="index < 14 || showAll">
- <div class="avtarface" title="编辑">
- <!-- <img src="" v-lazy="headSrc + user.headImgUrl" /> -->
- <img :src="user.headImgUrl | resolveAvator" />
- </div>
- <span class="Text_tiny tinyText_wirte">{{
- user.cnName
- }}</span>
- </div>
- <div class v-if="index == 14 && !showAll" @click="showAllClick">
- <span class="zhangkai_down"></span>
- <span class="Text_tiny tinyText_wirte">展开全部</span>
- </div>
- <div v-if="
- showAll &&
- index == folder.listUser.length - 1 &&
- index > 14
- " @click="showAll = false" class="newweizhi">
- <span class="zhangkai_up"></span>
- <span class="Text_tiny tinyText_wirte">收起职员</span>
- </div>
- </li>
- </ul>
- </div>
- <div class="clear"></div>
- </div>
- <div class="tianjiaxiezuorenBox" v-for="(folderChild, childIndex) in folder.listChildren" :key="childIndex" v-show="nodeLeaves">
- <div v-if="tempIndex!=childIndex||childIndex==0" class="self_newitem">
- <h5 class="fl label_text">
- {{ childIndex + 1 }}.{{ folderChild.folderName }}
- </h5>
- <div class="selfoptiongroup">
- <el-button v-if="folderChild.default == false" v-on:click="eidtTitle(childIndex)">编辑</el-button>
- </div>
- </div>
- <div v-if="showTitle == 2&&tempIndex==folderIndex" class="self_newitem">
- <input v-model="folderChild.folderName" :class="
- folderChild.default == false
- ? 'bianji_input self_Inputwork'
- : 'fl label_text_moren'
- " :disabled="folderChild.default" />
- <div class="selfoptiongroup">
- <el-button type="primary" v-if="folderChild.default == false" v-on:click="saveTitle">保存</el-button>
- <el-button v-if="folderChild.default == false" v-on:click="deleTitle(folderIndex)">删除</el-button>
- </div>
- </div>
- <div>
- <div class="fl firstPeople">
- <!-- 默认添加 -->
- <div v-if="folderChild.manageUser == ''">
- <div class="avtarface" @click="aloneAddUserForFolder(folderChild)">
- <i class="large_huangguan el-icon-plus"></i>
- </div>
- <span class="Text_tiny tinyText_wirte">工作负责人</span>
- </div>
- <li v-for="(user, index) in folderChild.manageUser" :key="index">
- <div>
- <div class="avtarface" title="编辑">
- <!-- <img src="" v-lazy="headSrc + user.headImgUrl" @click="aloneAddUserForFolder(folderChild)" /> -->
- <img :src="user.headImgUrl | resolveAvator" @click="aloneAddUserForFolder(folderChild)" />
- </div>
- <span class="Text_tiny tinyText_wirte">{{
- user.cnName
- }}</span>
- </div>
- </li>
- </div>
- <!-- 竖线 -->
- <div class="fl vhLine mlr-20"></div>
- <!-- 添加职员 -->
- <div class="fl addBtn_new" title="添加职员" @click="aloneAddUserOnlyStaff(folderChild)">
- <i class="el-icon-plus middleaddEC"></i>
- </div>
- <div class="fl chengyuanbox">
- <ul class="ECworkerList">
- <li v-for="(user, index) in listUserComputed(
- folderChild.listUser
- )" :key="index">
- <div v-if="index < 14 || showAll">
- <div class="avtarface" title="编辑">
- <img :src=" user.headImgUrl | resolveAvator" />
- </div>
- <span class="Text_tiny tinyText_wirte">{{
- user.cnName
- }}</span>
- </div>
- <div class v-if="index == 14 && !showAll" @click="showAllClick">
- <span class="zhangkai_down"></span>
- <span class="Text_tiny tinyText_wirte">展开全部</span>
- </div>
- <div v-if="
- showAll &&
- index ==
- folderChild.listUser.length - 1 &&
- index > 14
- " @click="showAll = false" class="newweizhi">
- <span class="zhangkai_up"></span>
- <span class="Text_tiny tinyText_wirte">收起职员</span>
- </div>
- </li>
- </ul>
- </div>
- <div class="clear"></div>
- </div>
- </div>
- </div>
- </div>
- <div v-show="listNewFolder.length>0">
- <span class="fl label_text">自定义工作</span>
- <span class="fr mt-10" @click="addProjFolderWork()"><i class="yiyunPlusmini"></i></span>
- </div>
- </div>
- </div>
- </div>
- <!-- 分配工作--项目概况 -->
- <div v-show="isShowPrjDesc" class="PaincenterBox">
- <!-- 表单 横线输入框表单-->
- <el-form ref="" v-model="nowProject" class="line_from" label-width="100px" label-position="left">
- <div class="yiyun_col-6 fl">
- <div class="bianju_item_fr">
- <el-form-item label="项目负责:">
- <span>{{ nowProject.cnName }}</span>
- </el-form-item>
- </div>
- </div>
- <div class="yiyun_col-6 fl">
- <div class="bianju_item_fr">
- <el-form-item label="创建时间:">
- <span>{{ nowProject.strCreateTime }}</span>
- </el-form-item>
- </div>
- </div>
- <div class="yiyun_col-12 fl" v-for="prop in listProjProp" :key="prop.propertyID">
- <div class="yiyunlargeItem">
- <el-form-item :label="prop.propName + ':'">
- <span>{{ prop.propValue }}</span>
- </el-form-item>
- </div>
- </div>
- </el-form>
- </div>
- <!-- 选择负责人 -->
- <div v-show="isShowSecondPage" class="PaincenterBox">
- <div class="xiezuobox">
- <!-- 左侧折叠面板 -->
- <div class="yiyun_col-6 bg_text_wirte mt-8">
- <div class="row_painfl">
- <!-- 折叠面板 -->
- <el-collapse accordion v-model="activeName">
- <!-- 添加协作群与工作 -->
- <el-collapse-item name="1" class="nomidline">
- <template slot="title">
- <span class="fr mr_20">
- <el-checkbox class="checkBoxCol" v-model="ischeckAll" @change="handleCheckTopAll">全选</el-checkbox>
- </span>
- <span>从部门中选择职员</span>
- </template>
- <el-collapse accordion v-for="(dept, group_index) in listDept" v-show="dept.listUser.length>0" :key="group_index">
- <!-- 二级折叠面板 -->
- <el-collapse-item>
- <template slot="title">
- <span class="fr mr_20">
- <el-checkbox class="checkBoxCol" v-model="dept.selected" :key="group_index" @change="handleCheckItemAll(group_index,$event)">全选</el-checkbox>
- </span>
- <span>{{ dept.deptName }} </span>
- </template>
- <!-- <div class="user_info_item" v-for="(user, index) in listUserManager(
- 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">
- <li>
- <a href="javascript:;">{{
- user.companyName
- }}</a>
- </li>
- <li>
- <a href="javascript:;">{{
- user.phone
- }}</a>
- </li>
- <li>
- <a href="javascript:;">所在项目{{ user.projCount }}个</a>
- </li>
- </ul>
- <span class="user_info_job" slot="reference">{{user.position }}</span>
- </el-popover>
- <span class="user_info_role">{{
- user.roleName
- }}</span>
- </div>
- </el-checkbox>
- </div>
- </el-collapse-item>
- </el-collapse>
- </el-collapse-item>
- </el-collapse>
- </div>
- </div>
- <div class="shuxian"></div>
- <!-- 右侧折叠面板 -->
- <div class="yiyun_col-6">
- <h4 class="rightXiezuoren">已选职员</h4>
- <div class="row_painfr">
- <div class="yiyun_line"></div>
- <span>工作负责人</span>
- <div class="yiyun_line"></div>
- <!-- 项目负责人选择前 isSlectPal -->
- <div class="main_workerBox" v-if="listManagerComputed(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
- )" :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">
- <li>
- <a href="javascript:;">{{ user.roleName }}</a>
- </li>
- <li>
- <a href="javascript:;">{{ user.phone }}</a>
- </li>
- <li>
- <a href="javascript:;">所在项目{{ user.projCount }}个</a>
- </li>
- </ul>
- <span class="user_info_job" slot="reference">{{
- user.position
- }}</span>
- </el-popover>
- <span class="user_info_role">
- <i class="el-icon-close largeclose" @click="removeManageUser(user)" title="移除负责人"></i>
- </span>
- </div>
- </div>
- <p class="diaTip">
- 工作负责人有且仅有一人,其将对:{{
- currWorkName
- }},进行职员指派。
- </p>
- </div>
- <div v-if="isShowStaffList">
- <div class="row_painfr" v-for="dept in listDeptComputed" :key="dept.deptID" >
- <div class="yiyun_line"></div>
- <div v-for="deptID in listDeptUserNoZero(selectedUser)" :key="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="renyuanbox" v-for="(user,index) in selectedUser" :key="index">
- <div class="user_info_item" v-if="user.deptId == dept.id">
- <!-- <img v-lazy="headSrc+user.headImgUrl" alt="" class="user_info_faceImg"> -->
- <img v-lazy="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>
- <li><a href="javascript:;">{{user.phone}}</a></li>
- <li><a href="javascript:;">所在项目{{user.projCount}}个</a></li>
- </ul>
- <span class="user_info_job" slot="reference">{{user.position}}</span>
- </el-popover>
- <span class="user_info_role">
- <template>
- <el-select v-model="user.folderPerm" placeholder="设置角色" class="setroleselect">
- <el-option v-for="item in roles" allow-create :key="item.value" :label="item.label"
- :value="item.value">
- <span style="float: left;margin-right:30px;">{{ item.label }}</span>
- <span style="float: right; color: #8492a6; font-size: 13px">{{ item.description }}</span>
- </el-option>
- </el-select>
- </template>
- <i class="el-icon-close" @click="removeSelectUser(user)" title="移除协作人"></i>
- </span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- 选择员工 -->
- <div v-show="isShowThreePage" class="PaincenterBox">
- <div class="xiezuobox">
- <!-- 左侧折叠面板 -->
- <div class="yiyun_col-6 bg_text_wirte mt-8">
- <div class="row_painfl">
- <!-- 折叠面板 -->
- <el-collapse accordion v-model="activeName">
- <!-- 添加协作群与工作 -->
- <el-collapse-item name="1" class="nomidline">
- <template slot="title">
- <el-checkbox class=" checkxiezuoren" style="color:white" v-model="ischeckAll" @change="handleCheckTopAll">全选</el-checkbox>
- <span class="checkBoxCol">从部门中选择职员</span>
- </template>
- <el-collapse accordion v-for="(dept, group_index) in listDept" v-show="dept.listUser.length>0" :key="group_index">
- <!-- 二级折叠面板 -->
- <el-collapse-item>
- <template slot="title">
- <span class=" checkBoxCol">{{ dept.deptName }}
- </span>
- <el-checkbox class="checkxiezuoren" style="color:white" v-model="dept.selected" :key="group_index" @change="
- handleCheckItemAll(group_index, $event)
- ">全选</el-checkbox>
- </template>
- <!-- <div class="user_info_item" v-for="(user, index) in listUserStaff(
- 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="
- 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.cnName
- }}</span>
- <el-popover placement="bottom-start" width="180" trigger="hover">
- <ul class="popover_ul popover_ul">
- <li>
- <a href="javascript:;">{{
- user.companyName
- }}</a>
- </li>
- <li>
- <a href="javascript:;">{{
- user.phone
- }}</a>
- </li>
- <li>
- <a href="javascript:;">所在项目{{ user.projCount }}个</a>
- </li>
- </ul>
- <span class="user_info_job" slot="reference">{{ user.position}}</span>
- </el-popover>
- <span class="user_info_role">{{
- user.roleName
- }}</span>
- </div>
- </el-checkbox>
- </div>
- </el-collapse-item>
- </el-collapse>
- </el-collapse-item>
- </el-collapse>
- </div>
- </div>
- <div class="shuxian"></div>
- <!-- 右侧折叠面板 -->
- <div class="yiyun_col-6">
- <h4 class="rightXiezuoren" v-if="isShowManager">已选职员</h4>
- <h4 class="rightXiezuoren" v-if="!isShowManager">已选项目负责人</h4>
- <div class="row_painfr" v-if="isShowManager">
- <div class="yiyun_line"></div>
- <span>工作负责人</span>
- <div class="yiyun_line"></div>
- <!-- 项目负责人选择前 -->
- <!-- <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 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">
- <li>
- <a href="javascript:;">{{ user.roleName }}</a>
- </li>
- <li>
- <a href="javascript:;">{{ user.phone }}</a>
- </li>
- <li>
- <a href="javascript:;">所在项目{{ user.projCount }}个</a>
- </li>
- </ul>
- <span class="user_info_job" slot="reference">{{user.position}}</span>
- </el-popover>
- <span class="user_info_role" @click="removeManageUser(user)">修改</span>
- </div>
- </div>
- <p class="diaTip">
- 工作负责人有且仅有一人,其将对:{{
- currWorkName
- }},进行职员指派。
- </p>
- </div>
- <div v-if="isShowStaffList">
- <div class="row_painfr" v-for="dept in listDept" v-show="dept.listUser.length > 0" :key="dept.id">
- <div v-for="deptID in listDeptUserNoZero(selectedUser)" :key="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.id">
- <!-- <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">
- <li>
- <a href="javascript:;">{{ user.roleName }}</a>
- </li>
- <li>
- <a href="javascript:;">{{ user.phone }}</a>
- </li>
- <li>
- <a href="javascript:;">所在项目{{ user.projCount }}个</a>
- </li>
- </ul>
- <span class="user_info_job" slot="reference">{{
- user.position
- }}</span>
- </el-popover>
- <span class="user_info_role" v-if="isShowManager">
- <template>
- <el-select v-model="user.folderPerm" placeholder="设置角色" class="setroleselect">
- <el-option v-for="item in roles" allow-create :key="item.value" :label="item.label" :value="item.value">
- <span style="float: left;margin-right:30px;">{{ item.label }}</span>
- <!-- <span style="float: right; color: #8492a6; font-size: 13px">{{ item.description }}</span> -->
- </el-option>
- </el-select>
- </template>
- <i class="el-icon-close" @click="removeSelectUser(user)" title="移除协作人"></i>
- </span>
- <span class="user_info_role" v-if="!isShowManager">
- <template>
- <span style="float: left;margin-right:30px;">查看与编辑</span>
- </template>
- <i class="el-icon-close" @click="removeSelectUser(user)" title="移除项目负责人"></i>
- </span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
-
- <script>
- import { getUserInfo, fetchAddressBook, getUserListByNode} from '@/services/user.js';
-
-
- export default {
- data() {
- return {
- imgSrc: process.env.API_HOST + "archives/cover?path=",
- headSrc: process.env.API_HOST + "archives/head?path=",
- cnName: "",
- selectedUser: [], // 当前文件夹的已选协作人
- selectedManageUser: [], // 当前文件夹的已选负责人
- showTitle: "1", //默认显示标题
- disabled: false, //添加合作人可点击
- checked: false,
- activeName: "1",
- showAll: false, //项目信息概况
- isBottomNewProj: false, //底部弹框
- nodeLeaves: false, //工作树叶子
- isShowStaffList: false, //显示项目负责人
- opentree: true, //工作树三角
- ischeckAll: false, //是否是全部选中
- nowProject: {},
- isShowPrjDesc: false, //分配项目--项目概况
- isSlectPal: true, //分配项目--项目概况
- roles: [
- {
- value: 1,
- label: "编辑和查看",
- description: ""
- },
- {
- value: 0,
- label: "仅查看",
- description: ""
- }],
- folderPerm: "1",
- // -----------------------------------------------
- isShowFirstPage: true,
- isShowSecondPage: false,
- isShowThreePage: false,
- InitData: [],
- listNewFolder: [],
- listProjProp: [],
- listDept: [],
- curProjCreatePeop: [],
- currWorkName: "",
- newProjFolderIndex:1,
- tempIndex:0,
- isShowdivid2:false,
- currSelectData:[],
- currUser:JSON.parse(sessionStorage.user),
- isShowManager:true,// 当前是否是设置项目负责人
- listManagerUser:[], //项目负责人
- isProjManager: false,
- currListDeptUserData:[]
- };
- },
- created:function(){
- this.loadProjManager();
- },
- mounted: function () {
- this._getUserInfo(sessionStorage.createUserID);
- this.getNowProject();
- this.getListProjProp();
- this.listFolderChildren();
- this.listDeptUsers();
- this.loadListManagerUser();
- this.cnName = JSON.parse(sessionStorage.user).cnName;
- // 监听滚动事件
- window.addEventListener('scroll',this.handleScroll,true);
- // 获取部门列表信息
-
- this.fetchPlainDeptUserList(this.$store.state.currentCompanyId).then(list => {
- this.listDept = list;
- this.listDept = [...this.listDept];
- console.log('1111111111111111111111111',this.listDept);
- // 对listDept进行过滤 不显示与当前用户相同的用户
- this.listDept.some(dept => {
- dept.listUser.some((user, index) => {
- if(this.$store.state.accountId === user.id) {
- dept.listUser.splice(index, 1);
- return true;
- }
- })
- })
- this.currListDeptUserData = [...this.listDept];
- }).catch(err => {
- console.log(err);
- })
- },
- computed: {
-
- /**
- * 过滤后的部门列表:去除没有用户数据的部门
- */
- listDeptComputed: function () {
- return this.listDept.filter(function (dept) {
- return dept.listUser.length > 0;
- });
- },
- /**
- * 过滤后的已选择负责人列表
- */
- listManagerComputed: function () {
- return function (listUsers) {
- return listUsers.filter(function(user) {
- return user.folderPerm == 2;
- });
- };
- },
- /**
- * 过滤后的已选择非负责人列表
- */
- listUserComputed: function () {
- return function (listUsers) {
- return listUsers.filter(function(user) {
- return user.folderPerm != 2;
- });
- };
- },
- /**
- * 过滤后的左侧负责人列表
- */
- listUserManager: function (listUsers) {
- return function (listUsers) {
- return listUsers.filter(function (user) {
- return user.folderPerm == 2 || user.folderPerm == 0;
- });
- };
- },
- /**
- * 过滤后的左侧员工列表(staff员工)
- */
- listUserStaff: function (listUsers) {
- var thisApp = this;
- return function (listUsers) {
- return listUsers.filter(function (user) {
- return user.folderPerm != 2;
- });
- };
- },
- /**
- * 当未选择人员时,部门不显示
- */
- listDeptUserNoZero: function (user) {
- return function (user) {
- let temp = [];
- for (let i = 0; i < user.length; i++) {
- if (user[i].folderPerm != 2) {
- temp.push(user[i].deptId);
- }
- }
- var x = new Set(temp);
- return [...x];
- };
- }
- },
- methods: {
- /**
- * 判断用户是否是项目负责人
- */
- loadProjManager: function () {
- var thisApp = this;
- this.$axios({
- method: "get",
- url: encodeURI(
- process.env.API_HOST +
- "projects/manager/" +
- sessionStorage.projId +
- "/" +
- sessionStorage.userId
- )
- })
- .then(response => {
- if (response.data != null && response.data != "") {
- thisApp.isProjManager = response.data.isProjManager;
- }
- })
- .catch(error => {
- console.log(error);
- });
- },
- /**
- * 检测bigbody滚动距离添加样式
- */
- handleScroll:function(){
- let scrollBody= document.getElementById("bottomDiaChild2");
- if(scrollBody.scrollTop&&scrollBody.scrollTop > 0){
- this.isShowdivid2 =true
- }else{
- this.isShowdivid2 =false
- }
- },
- /**
- * 初始底部弹框
- */
- isAllhide: function () {
- this.isShowPrjDesc = false;
- this.isShowThreePage = false; //分配工作人员面板
- this.isShowSecondPage = false; //分配负责人面板
- },
- /*
- * 关闭新建项目弹框
- */
- offDialog: function () {
- this.selectedUser = [];
- this.selectedManageUser = [];
- this.$emit("offDialog", this.$route.name);
- },
- /*
- *隐藏项目弹框,显示底部弹框
- */
- showzhankai: function () {
- this.isBottomNewProj = true;
- },
- /**
- * 项目窗口展现
- */
- showContinueNewProj: function () {
- this.isBottomNewProj = false;
- },
- /*
- *返回文件夹页面
- */
- backFirstPage: function () {
- // this.listDept=JSON.parse(JSON.stringify(this.currListDeptUserData));
- if(!this.isShowManager)
- {
- this.listManagerUser=[];
- this.selectedUser.forEach(user => {
- if( user.id != this.currUser.userInfo.id)
- {
- this.listManagerUser.push(user);
- }
- });
- }
- this.isAllhide();
- this.isShowManager=true;
- this.isShowFirstPage = true;
- },
- toFirstPage(){
- this.$confirm("退出职员选择将清空您的所有操作!确定返回吗?", "", {
- confirmButtonText: "退出",
- cancelButtonText: "取消",
- showClose:false,
- type: "warning"
- }).then(() => {
- for (var i = 0; i < this.listNewFolder.length; i++) {
- if( this.listNewFolder[i].folderID==this.currSelectData.folderID){
- this.listNewFolder[i] = this.currSelectData;
- }
- for (var j = 0; j < this.listNewFolder[i].listChildren.length; j++) {
- if( this.listNewFolder[i].listChildren[j].folderID==this.currSelectData.folderID){
- this.listNewFolder[i].listChildren[j] = this.currSelectData;
- }
- }
- }
- this.listDept=JSON.parse(JSON.stringify(this.currListDeptUserData));
- this.isAllhide();
- this.isShowFirstPage = true;
- this.isShowManager=true;
- });
- },
- /*
- *指派员工页面
- */
- toThreePage: function () {
- this.isShowSecondPage = false;
- this.isShowFirstPage = false;
- this.isShowThreePage = true;
- this.isShowStaffList = true;
- },
- toSecondPage: function () {
- this.isShowSecondPage = true;
- this.isShowFirstPage = false;
- this.isShowThreePage = false;
- this.isShowStaffList = false;
- },
- /*
- *分配完成并关闭窗体
- */
- submitAndClose: function () {
- this.createFolders();
- },
- /*
- *编辑自定义工作
- */
- eidtTitle: function (index) {
- // this.newProjData.listFolder;
- this.tempIndex=index;
- this.showTitle = 2;
- },
- /*
- *保存自定义工作
- */
- saveTitle: function (index) {
- this.tempIndex=0;
- this.showTitle = 1
- },
- /*
- *删除新建项目的自定义工作
- */
- deleTitle: function (index) {
- this.listNewFolder.splice(index, 1);
- },
- /**
- * 添加自定义工作-创建项目时
- */
- addProjFolderWork: function () {
- this.eidtTitle(this.listNewFolder.length);
- this.newfolder = {
- superID:this.listNewFolder[0].superID,
- folderName: '自定义工作' + this.newProjFolderIndex,
- default: false,
- deleted: 0,
- listUser: [],
- manageUser: [],
- listChildren:[],
- listNotice:[],
- listsShareFrom:[]
- }
- this.listNewFolder.push(this.newfolder); //新增工作
- this.newProjFolderIndex = this.newProjFolderIndex + 1;
- },
- /**
- * 设置负责人
- */
- setManagerUser: function (nowUser) {
- if (this.InitData.manageUser.length != 0) {
- this.InitData.manageUser[0].selected = false;
- // this.InitData.manageUser[0].roleName = "普通职员";
- for (var i = 0; i < this.selectedUser.length; i++) {
- if (
- this.selectedUser[i].userID == this.InitData.manageUser[0].userID
- ) {
- this.InitData.manageUser[0].folderPerm = 0;
- this.selectedUser.splice(i, 1);
- }
- }
- }
- var listManageUser = [];
- nowUser.folderPerm = 2;
- listManageUser.push(nowUser);
- this.selectedUser.forEach(user => {
- if (user.folderPerm == 2 && user.userID != nowUser.userID) {
- user.folderPerm = 1;
- }
- if (user.userID == nowUser.userID) {
- user.folderPerm = 2;
- }
- });
- this.InitData.manageUser = listManageUser;
- },
- /**
- * 分配人员
- */
- aloneAddUserForFolder: function (data,index) {
- this.currSelectData=data;
- this.currWorkName = data.folderName;
- if (data.listUser == null) {
- data.listUser = [];
- if (this.isShowSecondPage == true) {
- this.isShowStaffList = false;
- }
- }
- this.InitData = data;
- this.setFolderPerm(data);
- this.selectedUser = data.listUser;
- this.selectedManageUser = data.manageUser;
- this.isShowSecondPage = true;
- this.isShowFirstPage = false;
- },
- /**
- * 进入时,重置权限
- */
- setFolderPerm: function (data) {
- this.listDept=JSON.parse(JSON.stringify(this.currListDeptUserData));
- 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;
- 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].id == data.listUser[i].id
- ) {
- this.listDept[j].listUser[k].folderPerm =
- data.listUser[i].folderPerm;
- this.listDept[j].listUser[k]['selected'] = true;
- }
- if(!this.isShowManager)
- {
- // if(this.currUser.accountId == sessionStorage.userId && sessionStorage.accountId == this.listDept[j].listUser[k].userID )
- if(this.currUser.accountId == sessionStorage.userId && sessionStorage.accountId == this.listDept[j].listUser[k].id)
- {
- this.listDept[j].listUser[k].selected = true;
- }
- }
- }
- this.getIsCheckSecondLevel(j);
- }
- }
- this.getIsCheckAll();
- },
- /*
- *添加职员按钮直接进入 指派职员页面
- */
- aloneAddUserOnlyStaff: function (data) {
- this.isShowManager=true;
- this.currWorkName = data.folderName;
- if (data.listUser == null) {
- data.listUser = [];
- }
- this.isShowStaffList = true;
- this.InitData = data;
- this.setFolderPerm(data);
- this.selectedUser = data.listUser;
- 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);
- },
- /*
- * 设置项目负责人
- */
- addProjManager:function(){
- this.isShowManager=false;
- this.isShowStaffList = true;
- var data={listUser:[]};
- data.listUser=this.listManagerUser;
- this.setFolderPerm(data);
-
- this.selectedUser = data.listUser;
- this.selectedManageUser = [];
- this.isShowThreePage = true;
- this.isShowFirstPage = false;
-
- },
- /*
- *顶部全选
- * e:点击触发的事件
- */
- handleCheckTopAll(e) {
- //首级全选
- for (var j = 0; j < this.listDept.length; j++) {
- if (this.listDept[j].listUser.length > 0) {
- // this.handleCheckItemAll(j, false); //清除已经被选中的状态
- this.handleCheckItemAll(j, e);
- }
- }
- },
- /*
- *二级条目全选
- * index:当前点击的条目位置
- * e:点击触发的事件
- */
- handleCheckItemAll(index, e) {
- for (var i = 0; i < this.listDept[index].listUser.length; i++) {
- if (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].listUser[i], e);
- }
- }
- },
- /*
- *子项单选
- * topIndex:当前所选条目的上级
- *index:当前所选条目
- * e:点击触发的事件
- */
- handleCheckedOne(topIndex, user, e) {
- if(!this.isShowManager)
- {
- // if(user.id == sessionStorage.userId)
- // {
- // this.$notify.info({
- // title: "温馨提示",
- // message: "不能移除自己哦",
- // offset: 100,
- // duration: 5000
- // });
- // user.selected=true;
- // return;
- // }
- if(user.id== this.currUser.accountId)
- {
- this.$notify.info({
- title: "温馨提示",
- message: "项目负责人已存在哦",
- offset: 100,
- duration: 5000
- });
- user.selected=false;
- return;
- }
- }
- // 跳过负责人
- if(user.folderPerm == 2)
- {
- return;
- }
- //三级change事件
- if (e) {
- this.checkDeptUserName(e, user); //将选中的人员返回给添加合作人页面
- user.folderPerm = 1;
- } else {
- this.checkDeptUserName(e, user); //将选中的人员返回给添加合作人页面
- user.folderPerm = 0;
- }
- this.getIsCheckSecondLevel(topIndex);
- this.getIsCheckAll();
- },
- /*
- *选择负责人
- */
- handleCheckedOnlyOne(topIndex, user, e) {
- //三级change事件
- if (e) {
- //将选中的人员返回给添加合作人页面
- this.checkDeptUserName(e, user);
- this.setManagerUser(user);
- this.isSlectPal = false;
- } else {
- //将选中的人员返回给添加合作人页面
- this.checkDeptUserName(e, user);
- this.InitData.manageUser =[];
- this.isSlectPal = true;
- }
- this.getIsCheckSecondLevel(topIndex);
- this.getIsCheckAll();
- },
- /**
- * 当前二级选中状态修正
- */
- getIsCheckSecondLevel(topIndex) {
- var checkCount = 0;
- for (var i = 0; i < this.listDept[topIndex].listUser.length; i++) {
- if (this.listDept[topIndex].listUser[i].selected == true) {
- checkCount++;
- } else {
- checkCount--;
- }
- }
- if (checkCount == this.listDept[topIndex].listUser.length) {
- //三级级全勾选
- this.listDept[topIndex].selected = true;
- } else {
- //三级级全不勾选
- this.listDept[topIndex].selected = false;
- }
- },
- /*
- *当前首级全选状态修正
- */
- getIsCheckAll() {
- var checkCount = 0;
- var haveDataCount = 0;
- for (var j = 0; j < this.listDept.length; j++) {
- //全选checkbox状态
- if (this.listDept[j].listUser.length > 0) {
- haveDataCount++;
- if (this.listDept[j].selected == true) {
- checkCount++;
- }
- }
- }
- // 取消如果还没有获取到数据 两个都为0 一打开就是全选按钮被选中的情况
- if ((checkCount == haveDataCount) && checkCount !== 0 && haveDataCount !== 0) {
- this.ischeckAll = true;
- } else {
- this.ischeckAll = false;
- }
- },
- /**
- * 移除选中人员
- */
- removeSelectUser: function (item) {
- if(item.userID == sessionStorage.userId)
- {
- this.$notify.info({
- title: "温馨提示",
- message: "不能移除自己哦",
- offset: 100,
- duration: 5000
- });
- return;
- }
- this.checkDeptUserName(false, item);
- this.cancelCheck(item.userID);
- },
- /**
- * 移除负责人
- */
- removeManageUser: function (user) {
- user.folderPerm = 0;
- // user.roleName = "查看编辑";
- for (var k = 0; k < this.selectedUser.length; k++) {
- if (this.selectedUser[k].userID == user.userID) {
- this.selectedUser[k].folderPerm = 0;
- this.selectedUser.splice(k, 1);
- }
- }
- this.cancelCheck(user.userID);
- this.toSecondPage();
- },
- /*
- *取消选中
- */
- cancelCheck: function (userID) {
- 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].folderPerm = 0;
- this.getIsCheckSecondLevel(i);
- }
- }
- }
- this.getIsCheckAll();
- },
- /**
- * 对已选协作人添加和删除
- */
- checkDeptUserName: function (checked, item) {
- item.selected = checked;
- if (checked) {
- item.folderPerm = 1; // 默认角色为:查看和编辑
- var valueUser = JSON.parse(JSON.stringify(item));
- this.selectedUser.push(valueUser);
- } else {
- for (var i = 0; i < this.selectedUser.length; i++) {
- if (this.selectedUser[i].userID == item.userID) {
- this.selectedUser.splice(i, 1);
- }
- }
- }
- if (this.selectedUser.length > 0 && this.isShowThreePage == true) {
- this.isShowStaffList = true;
- } else {
- this.isShowStaffList = false;
- }
- },
- /**
- * 查看项目概况
- */
- goShowPrjDesc: function () {
- this.isShowPrjDesc = true;
- this.isShowFirstPage = false;
- },
- /**
- * 查看全部
- */
- showAllClick: function () {
- this.showAll = true;
- },
- /**
- * 展开
- */
- openECtree: function (data) {
- this.nodeLeaves = true;
- this.opentree = false;
- },
- /**
- * 收起
- */
- closeECtree: function (data) {
- this.nodeLeaves = false;
- this.opentree = true;
- },
- /**
- * 获取listprojprop
- */
- getListProjProp: function () {
- this.$axios({
- method: "get",
- url: encodeURI(
- process.env.API_HOST +
- "templates/templateproperty/" +
- sessionStorage.templateID +
- "/" +
- sessionStorage.projId
- )
- })
- .then(response => {
- this.listProjProp = response.data.data;
- })
- .catch(error => {
- console.log(error);
- });
- },
- /**
- * 获取当前项目信息
- */
-
- getNowProject() {
- // var thisApp = this;
- // this.$axios({
- // method: "get",
- // url: encodeURI(
- // process.env.API_HOST + "projects/project/" + sessionStorage.projId
- // )
- // })
- // .then(response => {
- // thisApp.nowProject = response.data;
- // })
- // .catch(error => {
- // console.log(error);
- // });
- // const projectInfoRes = await prjService.QueryProjectInfoByProjId(id);
- // this.nowProject=projectInfoRes.Data;
- },
- /**
- * 加载需要分配的文件夹
- */
- listFolderChildren: function () {
- var thisApp = this;
- this.$axios({
- method: "get",
- url: encodeURI(
- process.env.API_HOST +
- "folders/allot/children/" +
- sessionStorage.userId +
- "/" +
- sessionStorage.projId
- )
- })
- .then(response => {
- for (var i = 0; i < response.data.length; i++) {
- thisApp.listNewFolder.push(response.data[i]);
- }
- })
- .catch(error => {
- console.log(error);
- });
- },
- /**
- * 获取全部的Dept数据
- */
- listDeptUsers: function () {
- var companyId = sessionStorage.companyId;
- var thisApp = this;
- this.$axios({
- method: "get",
- url: encodeURI(process.env.API_HOST + "sysinfo/deptusers/" + companyId)
- })
- .then(response => {
- thisApp.listDept = response.data.data;
- thisApp.currListDeptUserData=response.data.data;
- })
- .catch(error => {
- console.log(error);
- });
- },
- //获取用户个人信息
- async _getUserInfo(userId) {
- try {
- let res = await getUserInfo(userId);
- 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);
- // });
- // },
- /**
- * 分配工作完成
- */
- createFolders: function () {
- var thisApp = this;
- var sendMethod = "put";
- var param = {
- superFolderId: "",
- userId: sessionStorage.userId,
- projId: sessionStorage.projId,
- listFolder: thisApp.listNewFolder,
- listManageUser:thisApp.listManagerUser
- };
- this.$axios({
- method: sendMethod,
- url: encodeURI(process.env.API_HOST + "folders/set"),
- data: param
- })
- .then(response => {
- if (response.data.state == 1) {
- thisApp.$notify({
- title: "恭喜您",
- message: response.data.message,
- type: "success",
- offset: 100,
- duration: 2500
- });
- thisApp.offDialog();
- } else {
- thisApp.$notify.error({
- title: "温馨提示",
- message: response.data.message,
- offset: 100,
- duration: 5000
- });
- }
- })
- .catch(error => {
- console.log(error);
- });
- },
- /**
- * 加载需要分配的文件夹
- */
- loadListManagerUser: function () {
- var thisApp = this;
- this.$axios({
- method: "get",
- url: encodeURI(
- process.env.API_HOST +
- "projects/manager/user/" +
- sessionStorage.projId +"/"+sessionStorage.userId
- )
- })
- .then(response => {
- thisApp.listManagerUser=response.data.listManager;
- thisApp.currUser=response.data.defaultManager;
- })
- .catch(error => {
- console.log(error);
- });
- },
- /**
- * 设置与用户的positon 相对应的字段映射
- */
-
- },
- beforeDestroy(){
- // 销毁监听
- window.removeEventListener('scroll', this.handleScroll,true)
- }
- };
- </script>
- <style scoped lang="scss">
- ::v-deep .el-checkbox:last-of-type {
- margin-right: 30px;
- }
-
-
- </style>
|