This commit is contained in:
parent
61a88398a7
commit
b2770044e0
|
@ -4,6 +4,7 @@
|
|||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"dev": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
|
|
|
@ -75,6 +75,10 @@ export function resume(accountCode) {
|
|||
return $http.post('project/account/resume', {accountCode: accountCode, status: 1});
|
||||
}
|
||||
|
||||
export function liaisonMan(data) {
|
||||
return $http.post('project/account/set_liaison_man', data);
|
||||
}
|
||||
|
||||
export function doAccount(data) {
|
||||
let url = 'project/account/add';
|
||||
if (data.code) {
|
||||
|
|
|
@ -23,6 +23,48 @@
|
|||
</div>
|
||||
<div class="task-basic-attrs-view muted">
|
||||
<div class="field-list">
|
||||
<div class="component-mount pink-bg">
|
||||
<div class="field">
|
||||
<div class="field-left">
|
||||
<a-icon type="file-text"/>
|
||||
<span class="field-name">工作内容</span>
|
||||
</div>
|
||||
<div class="field-right width-block">
|
||||
<div class="task-description" :class="{'disabled': task.deleted}"
|
||||
v-show="!showTaskDescriptionEdit"
|
||||
@click="showTaskDesc">
|
||||
<div class="description-txt description-txt-con img-preview-content" v-show="task.description"
|
||||
v-html="task.description"></div>
|
||||
<span v-show="!task.description">添加工作内容</span>
|
||||
</div>
|
||||
<div class="m-t-sm" v-if="hasMoreDesc">
|
||||
<a v-show="!showMoreDesc"
|
||||
@click="checkShowMoreDesc(true)">显示更多</a>
|
||||
<a v-show="showMoreDesc"
|
||||
@click="checkShowMoreDesc(false)">收起工作内容</a>
|
||||
</div>
|
||||
<div v-show="showTaskDescriptionEdit">
|
||||
<editor ref="vueWangeditor"
|
||||
id="editor"
|
||||
:uploadImgServer="editorConfig.uploadImgServer"
|
||||
:uploadImgHeaders="editorConfig.uploadImgHeaders"
|
||||
:menus="editorConfig.menus"
|
||||
></editor>
|
||||
<div class="action-btn pull-right">
|
||||
<a type="text" class="cancel-text muted"
|
||||
@click="showTaskDescriptionEdit = false,initContent(false)">
|
||||
取消
|
||||
</a>
|
||||
<a-button type="primary" htmlType='submit'
|
||||
class="middle-btn"
|
||||
@click="doContent">保存
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="component-mount">
|
||||
<div class="field">
|
||||
<div class="field-left">
|
||||
|
@ -100,47 +142,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="component-mount pink-bg">
|
||||
<div class="field">
|
||||
<div class="field-left">
|
||||
<a-icon type="file-text"/>
|
||||
<span class="field-name">工作内容</span>
|
||||
</div>
|
||||
<div class="field-right width-block">
|
||||
<div class="task-description" :class="{'disabled': task.deleted}"
|
||||
v-show="!showTaskDescriptionEdit"
|
||||
@click="showTaskDesc">
|
||||
<div class="description-txt description-txt-con img-preview-content" v-show="task.description"
|
||||
v-html="task.description"></div>
|
||||
<span v-show="!task.description">添加工作内容</span>
|
||||
</div>
|
||||
<div class="m-t-sm" v-if="hasMoreDesc">
|
||||
<a v-show="!showMoreDesc"
|
||||
@click="checkShowMoreDesc(true)">显示更多</a>
|
||||
<a v-show="showMoreDesc"
|
||||
@click="checkShowMoreDesc(false)">收起工作内容</a>
|
||||
</div>
|
||||
<div v-show="showTaskDescriptionEdit">
|
||||
<editor ref="vueWangeditor"
|
||||
id="editor"
|
||||
:uploadImgServer="editorConfig.uploadImgServer"
|
||||
:uploadImgHeaders="editorConfig.uploadImgHeaders"
|
||||
:menus="editorConfig.menus"
|
||||
></editor>
|
||||
<div class="action-btn pull-right">
|
||||
<a type="text" class="cancel-text muted"
|
||||
@click="showTaskDescriptionEdit = false,initContent(false)">
|
||||
取消
|
||||
</a>
|
||||
<a-button type="primary" htmlType='submit'
|
||||
class="middle-btn"
|
||||
@click="doContent">保存
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="component-mount">
|
||||
<div class="field">
|
||||
<div class="field-left">
|
||||
|
@ -151,7 +152,6 @@
|
|||
<a-dropdown
|
||||
:trigger="['click']"
|
||||
v-model="visibleTaskMemberMenu"
|
||||
|
||||
placement="bottomCenter"
|
||||
>
|
||||
<a-tooltip :mouseEnterDelay="0.5" >
|
||||
|
@ -173,11 +173,12 @@
|
|||
<div slot="overlay">
|
||||
<task-member-menu
|
||||
v-if="visibleTaskMemberMenu"
|
||||
:projectCode="projectCodeCurrent"
|
||||
:taskCode="code"
|
||||
:projectCode="projectCode"
|
||||
:isCommit="false"
|
||||
@inviteProjectMember="
|
||||
showInviteMember = true,
|
||||
visibleTaskMemberMenu = false"
|
||||
@close="changeRecipient"
|
||||
></task-member-menu>
|
||||
</div>
|
||||
</a-dropdown>
|
||||
|
@ -187,17 +188,94 @@
|
|||
<div class="component-mount">
|
||||
<div class="field">
|
||||
<div class="field-left">
|
||||
<a-icon type="user"/>
|
||||
<a-icon type="apartment"/>
|
||||
<span class="field-name">处理部门</span>
|
||||
</div>
|
||||
<div class="field-right">
|
||||
<!-- <a-dropdown
|
||||
<a-dropdown>
|
||||
<template #overlay>
|
||||
<a-menu class="field-right-menu" slot="overlay" @click="departmentDropClick">
|
||||
<a-menu-item :key="item.code" v-for="item in departmentList">
|
||||
<div class="menu-item-content">
|
||||
<a-tag>{{item.name}}</a-tag>
|
||||
<a-icon type="check" class="check muted"
|
||||
v-show="item.code == department.code"></a-icon>
|
||||
</div>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<div>
|
||||
<span v-if="department.name">{{ department.name }} / {{ liasionMan.name }}</span>
|
||||
<span v-else>选择部门</span>
|
||||
</div>
|
||||
</a-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="component-mount">
|
||||
<div class="field">
|
||||
<div class="field-left">
|
||||
<a-icon type="gateway"/>
|
||||
<span class="field-name">工作流转</span>
|
||||
</div>
|
||||
<div class="field-right field-flex" style="flex-wrap: wrap;">
|
||||
<div v-for="exc in task.exchangeList" :key="exc.f_key">
|
||||
<a-dropdown
|
||||
:trigger="['click']"
|
||||
v-model="visibleTaskMemberMenu"
|
||||
v-model="exc.show"
|
||||
placement="bottomCenter"
|
||||
>
|
||||
|
||||
</a-dropdown> -->
|
||||
<a-tooltip :mouseEnterDelay="0.5" >
|
||||
<template slot="title">
|
||||
<span>更换人员</span>
|
||||
</template>
|
||||
<div class="field-flex" style="flex-wrap: wrap;align-items: center;">
|
||||
<a-avatar :src="exc.avatar" icon="user" size="small"/>
|
||||
<a class="muted name">{{exc.name}}</a>
|
||||
<a-icon type="double-right" style="margin-right: 10px;"></a-icon>
|
||||
</div>
|
||||
</a-tooltip>
|
||||
<div slot="overlay">
|
||||
<task-member-menu
|
||||
v-if="exc.show"
|
||||
:projectCode="projectCode"
|
||||
:isCommit="false"
|
||||
@inviteProjectMember="
|
||||
showInviteMember = true,
|
||||
exc.show = false"
|
||||
@close="changeExchangeShow"
|
||||
></task-member-menu>
|
||||
</div>
|
||||
</a-dropdown>
|
||||
</div>
|
||||
<a-dropdown
|
||||
:trigger="['click']"
|
||||
v-model="exchangeMenu"
|
||||
placement="bottomCenter"
|
||||
>
|
||||
<a-tooltip :mouseEnterDelay="0.5" >
|
||||
<template slot="title">
|
||||
<span>添加工作流转人员</span>
|
||||
</template>
|
||||
<div class="field-flex" style="flex-wrap: wrap;">
|
||||
<template>
|
||||
<a-avatar icon="user" size="small"/>
|
||||
<a class="muted name">未设置</a>
|
||||
</template>
|
||||
</div>
|
||||
</a-tooltip>
|
||||
<div slot="overlay">
|
||||
<task-member-menu
|
||||
v-if="exchangeMenu"
|
||||
:projectCode="projectCode"
|
||||
:isCommit="false"
|
||||
@inviteProjectMember="
|
||||
showInviteMember = true,
|
||||
exchangeMenu = false"
|
||||
@close="changeExchange"
|
||||
></task-member-menu>
|
||||
</div>
|
||||
</a-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -353,6 +431,8 @@
|
|||
import {notice} from "@/assets/js/notice";
|
||||
import {relativelyTaskTime, relativelyTime} from "@/assets/js/dateTime";
|
||||
import {checkResponse} from "../../assets/js/utils";
|
||||
import {list as getDepartment} from "../../api/department";
|
||||
import {list as getliasonMan} from "../../api/user";
|
||||
import {
|
||||
_taskWorkTimeList, delTaskWorkTime,
|
||||
editTaskWorkTime,
|
||||
|
@ -400,7 +480,8 @@
|
|||
projectCodeCurrent: '',
|
||||
task: {
|
||||
pri: 0,
|
||||
priText: '普通'
|
||||
priText: '普通',
|
||||
exchangeList: [], //流转
|
||||
},
|
||||
taskStatusList: COMMON.TASK_STATUS,
|
||||
taskLogList: [],
|
||||
|
@ -414,6 +495,8 @@
|
|||
|
||||
/*成员菜单*/
|
||||
visibleTaskMemberMenu: false,
|
||||
/*工作流转*/
|
||||
exchangeMenu: false,
|
||||
/*工单标签*/
|
||||
visibleTaskTagMenu: false,
|
||||
showInviteMember: false,
|
||||
|
@ -489,7 +572,11 @@
|
|||
},
|
||||
//显示评论提及
|
||||
showMentions: false,
|
||||
mentionsList: []
|
||||
mentionsList: [],
|
||||
projectCode: '', // 项目编码
|
||||
departmentList: [], //部门列表
|
||||
department: {}, //选择的部门
|
||||
liasionMan: {}, //选择的联络员
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -559,6 +646,9 @@
|
|||
created() {
|
||||
},
|
||||
mounted() {
|
||||
this.getDepartment();
|
||||
// console.log('router', this.$route);
|
||||
this.projectCode = this.$route.params.code;
|
||||
this.$nextTick(()=>{
|
||||
this.changeModalHeight();
|
||||
})
|
||||
|
@ -590,6 +680,61 @@
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取部门
|
||||
getDepartment(){
|
||||
getDepartment().then((res)=>{
|
||||
this.departmentList = res.data.list;
|
||||
})
|
||||
},
|
||||
// 选择部门
|
||||
departmentDropClick(e){
|
||||
let obj = this.departmentList.find(item=>item.code == e.key);
|
||||
this.department = obj;
|
||||
getliasonMan({
|
||||
searchType: 4,
|
||||
type: 1,
|
||||
departmentCode: obj.code
|
||||
}).then(res=>{
|
||||
if(res.data.list[0]) this.liasionMan = res.data.list[0];
|
||||
else notice({
|
||||
title: '该部门没有联络员',
|
||||
}, 'notice', 'error', 5)
|
||||
})
|
||||
},
|
||||
// 选择抄送人
|
||||
changeRecipient(e){
|
||||
this.task.executor = e;
|
||||
this.showInviteMember = false;
|
||||
this.visibleTaskMemberMenu = false;
|
||||
},
|
||||
// 选择流转人员
|
||||
changeExchange(e){
|
||||
this.task.exchangeList.push({
|
||||
f_key: new Date().getTime(),
|
||||
show: false,
|
||||
...e
|
||||
})
|
||||
},
|
||||
// 替换流转人员
|
||||
changeExchangeShow(e){
|
||||
let index = this.task.exchangeList.findIndex(item=>item.show==true);
|
||||
if(index!=-1){
|
||||
this.task.exchangeList[index].show = false;
|
||||
let list = JSON.parse(JSON.stringify(this.task.exchangeList));
|
||||
if(e){
|
||||
list[index] = {
|
||||
f_key: new Date().getTime(),
|
||||
show: false,
|
||||
...e
|
||||
};
|
||||
}else {
|
||||
list.splice(index, 1)
|
||||
}
|
||||
this.$nextTick(()=>{
|
||||
this.task.exchangeList = list;
|
||||
})
|
||||
}
|
||||
},
|
||||
detailClose() {
|
||||
this.$emit('close', this.task);
|
||||
// this.$router.push(`/project/space/task/${this.task.project_code}`);
|
||||
|
|
|
@ -954,7 +954,7 @@
|
|||
</a-spin>
|
||||
<invite-project-member v-model="showInviteMember" :project-code="projectCodeCurrent"
|
||||
v-if="showInviteMember"></invite-project-member>
|
||||
<a-modal
|
||||
<!-- <a-modal
|
||||
class="work-time-modal"
|
||||
v-model="workTimeDo.modalStatus"
|
||||
:title="workTimeDo.modalTitle"
|
||||
|
@ -1037,8 +1037,8 @@
|
|||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-modal>
|
||||
<a-modal
|
||||
</a-modal> -->
|
||||
<!-- <a-modal
|
||||
v-model="plainWorkTime.modalStatus"
|
||||
:title="plainWorkTime.modalTitle"
|
||||
:bodyStyle="{paddingBottom:'1px'}"
|
||||
|
@ -1064,7 +1064,7 @@
|
|||
</a-input>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-modal>
|
||||
</a-modal> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<a-avatar icon="user"></a-avatar>
|
||||
</div>
|
||||
<div class="ant-list-item-meta-content">
|
||||
<h4 class="ant-list-item-meta-title"><span>待认领</span></h4>
|
||||
<h4 class="ant-list-item-meta-title"><span>未设置</span></h4>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="ant-list-item-action">
|
||||
|
|
|
@ -154,6 +154,7 @@
|
|||
}}
|
||||
</router-link>
|
||||
<a-tag class="m-l-sm" v-if="item.is_owner">拥有者</a-tag>
|
||||
<a-tag class="m-l-sm" v-if="item.is_liaison_man">{{item.departments}}联络员</a-tag>
|
||||
</div>
|
||||
<div slot="description">
|
||||
<!--<a-tooltip :mouseEnterDelay="0.3" :title="item.create_time">-->
|
||||
|
@ -164,6 +165,18 @@
|
|||
</div>
|
||||
</a-list-item-meta>
|
||||
<template v-if="!item.is_owner">
|
||||
<a class="muted" slot="actions" v-if="item.is_liaison_man==0"
|
||||
@click="setLiasionMan(item,0)">
|
||||
<a-tooltip title="设置为联络员">
|
||||
<a-icon type="usergroup-add"/>
|
||||
</a-tooltip>
|
||||
</a>
|
||||
<a class="muted" slot="actions" v-else
|
||||
@click="setLiasionMan(item,1)">
|
||||
<a-tooltip title="取消联络员">
|
||||
<a-icon type="usergroup-delete"/>
|
||||
</a-tooltip>
|
||||
</a>
|
||||
<a class="muted" slot="actions" v-if="item.status == 0"
|
||||
@click="resumeAccount(item,index)">
|
||||
<a-tooltip title="启用账号">
|
||||
|
@ -198,7 +211,7 @@
|
|||
import inviteDepartmentMember from '../../components/project/inviteDepartmentMember'
|
||||
import createDepartment from '../../components/project/createDepartment'
|
||||
import {list} from "../../api/department";
|
||||
import {del, forbid, list as getMembers, resume} from "../../api/user";
|
||||
import {del, forbid, list as getMembers, resume, liaisonMan} from "../../api/user";
|
||||
import pagination from "../../mixins/pagination";
|
||||
import {checkResponse, getApiUrl, getAuthorization, getUploadUrl} from "../../assets/js/utils";
|
||||
import {notice} from "../../assets/js/notice";
|
||||
|
@ -431,6 +444,33 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
setLiasionMan(item, type){ // 设置为联络员
|
||||
let app = this;
|
||||
this.$confirm({
|
||||
title: `您确定要${type==0?'':'取消'}设置${item.name}为${item.departments}的联络员吗?`,
|
||||
content: ``,
|
||||
okText: '确认',
|
||||
okType: 'primary',
|
||||
cancelText: '再想想',
|
||||
onOk() {
|
||||
liaisonMan({
|
||||
member_code: item.member_code,
|
||||
type: type==0?1:0
|
||||
}).then((res) => {
|
||||
if (!checkResponse(res)) {
|
||||
return;
|
||||
}
|
||||
notice({title: type==0?'设置联络员成功':'取消联络员成功'}, 'notice', 'success');
|
||||
app.members.forEach((e)=>{
|
||||
if(e.member_code==item.member_code){
|
||||
e.is_liaison_man = type==0?1:0;
|
||||
}
|
||||
})
|
||||
});
|
||||
return Promise.resolve();
|
||||
}
|
||||
});
|
||||
},
|
||||
resumeAccount(member, index) {
|
||||
let app = this;
|
||||
this.$confirm({
|
||||
|
|
Loading…
Reference in New Issue