This commit is contained in:
parent
7ab1dc4677
commit
61a88398a7
File diff suppressed because it is too large
Load Diff
|
@ -17,6 +17,7 @@ export default {
|
||||||
toHome() {
|
toHome() {
|
||||||
const currentOrganization = getStore('currentOrganization', true);
|
const currentOrganization = getStore('currentOrganization', true);
|
||||||
let home = config.HOME_PAGE;
|
let home = config.HOME_PAGE;
|
||||||
|
console.log(config.HOME_PAGE);
|
||||||
if (currentOrganization) {
|
if (currentOrganization) {
|
||||||
home = home + '/' + currentOrganization.code;
|
home = home + '/' + currentOrganization.code;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,13 @@ export default [
|
||||||
component: resolve => require(['@/views/project/space/taskdetail'], resolve),
|
component: resolve => require(['@/views/project/space/taskdetail'], resolve),
|
||||||
meta: {model: 'Project', info: {show_slider: false}},
|
meta: {model: 'Project', info: {show_slider: false}},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
//任务添加
|
||||||
|
name: 'taskadd',
|
||||||
|
path: 'add/:taskCode',
|
||||||
|
component: resolve => require(['@/views/project/space/taskadd'], resolve),
|
||||||
|
meta: {model: 'Project', info: {show_slider: false}},
|
||||||
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -328,6 +328,7 @@
|
||||||
//点击顶部导航跳转页面
|
//点击顶部导航跳转页面
|
||||||
let that = this;
|
let that = this;
|
||||||
that.menu.forEach(function (v, k) {
|
that.menu.forEach(function (v, k) {
|
||||||
|
console.log(v);
|
||||||
if (v.id == event.key) {
|
if (v.id == event.key) {
|
||||||
that.menus = v.children;
|
that.menus = v.children;
|
||||||
let turnPath = '/';
|
let turnPath = '/';
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
<li class=""><a class="app" data-app="works"
|
<li class=""><a class="app" data-app="works"
|
||||||
@click="$router.push('/project/space/files/' + code)">
|
@click="$router.push('/project/space/files/' + code)">
|
||||||
文件</a>
|
文件</a>
|
||||||
|
</li>
|
||||||
<li class=""><a class="app" data-app="build"
|
<li class=""><a class="app" data-app="build"
|
||||||
@click="$router.push('/project/space/overview/' + code)">
|
@click="$router.push('/project/space/overview/' + code)">
|
||||||
概览</a>
|
概览</a>
|
||||||
|
@ -78,6 +79,13 @@
|
||||||
<span class="task-count"
|
<span class="task-count"
|
||||||
v-if="stage.tasks.length > 0"> · {{ stage.tasks.length }}</span>
|
v-if="stage.tasks.length > 0"> · {{ stage.tasks.length }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
<!--添加任务按钮-->
|
||||||
|
<div @click.stop="addTask(stage.code,index)">
|
||||||
|
<a class="task-creator-handler link-add-handler">
|
||||||
|
<a-icon type="plus-circle" style="padding-left: 10px;padding-right: 5px;"></a-icon>
|
||||||
|
<span style="font-size: 0.8rem;">添加任务</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<div class="stage-menu-toggler popover">
|
<div class="stage-menu-toggler popover">
|
||||||
<a-dropdown :trigger="['click']" placement="bottomCenter">
|
<a-dropdown :trigger="['click']" placement="bottomCenter">
|
||||||
<a-tooltip placement="top">
|
<a-tooltip placement="top">
|
||||||
|
@ -811,71 +819,72 @@
|
||||||
},
|
},
|
||||||
directives: {
|
directives: {
|
||||||
dragscroll2: function (el) {
|
dragscroll2: function (el) {
|
||||||
// el.oncontextmenu = function (ev) {
|
el.oncontextmenu = function (ev) {
|
||||||
el.onmousedown = function (ev) {
|
el.onmousedown = function (ev) {
|
||||||
console.log(ev.target.classList);
|
console.log(ev.target.classList);
|
||||||
const exclude = [
|
const exclude = [
|
||||||
"task-content",
|
"task-content",
|
||||||
"task-content-set",
|
"task-content-set",
|
||||||
"task-content",
|
"task-content",
|
||||||
"stage-name",
|
"stage-name",
|
||||||
"scrum-stage-header",
|
"scrum-stage-header",
|
||||||
"task-creator-handler",
|
"task-creator-handler",
|
||||||
"ant-btn",
|
"ant-btn",
|
||||||
"ant-input",
|
"ant-input",
|
||||||
];
|
];
|
||||||
const isExclude = exclude.some((item) =>
|
const isExclude = exclude.some((item) =>
|
||||||
ev.target.classList.contains(item)
|
ev.target.classList.contains(item)
|
||||||
);
|
);
|
||||||
if (isExclude) {
|
if (isExclude) {
|
||||||
// document.onmousemove = null;
|
// document.onmousemove = null;
|
||||||
// document.onmouseup = null;
|
// document.onmouseup = null;
|
||||||
// el.style["scroll-behavior"] = originalScrollBehavior;
|
// el.style["scroll-behavior"] = originalScrollBehavior;
|
||||||
// el.style["pointer-events"] = originalPointerEvents;
|
// el.style["pointer-events"] = originalPointerEvents;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
document.body.style.cursor = "move";
|
document.body.style.cursor = "move";
|
||||||
const disX = ev.clientX;
|
const disX = ev.clientX;
|
||||||
const disY = ev.clientY;
|
const disY = ev.clientY;
|
||||||
const originalScrollLeft = el.scrollLeft;
|
const originalScrollLeft = el.scrollLeft;
|
||||||
const originalScrollTop = el.scrollTop;
|
const originalScrollTop = el.scrollTop;
|
||||||
const originalScrollBehavior = el.style["scroll-behavior"];
|
const originalScrollBehavior = el.style["scroll-behavior"];
|
||||||
const originalPointerEvents = el.style["pointer-events"];
|
const originalPointerEvents = el.style["pointer-events"];
|
||||||
el.style["scroll-behavior"] = "auto";
|
el.style["scroll-behavior"] = "auto";
|
||||||
let elEvent = ev;
|
let elEvent = ev;
|
||||||
// 鼠标移动事件是监听的整个document,这样可以使鼠标能够在元素外部移动的时候也能实现拖动
|
// 鼠标移动事件是监听的整个document,这样可以使鼠标能够在元素外部移动的时候也能实现拖动
|
||||||
document.onmousemove = function (ev) {
|
document.onmousemove = function (ev) {
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
// elEvent.target.style.cursor = "move";
|
// elEvent.target.style.cursor = "move";
|
||||||
// ev.target.style.cursor = "move";
|
// ev.target.style.cursor = "move";
|
||||||
document.body.style.cursor = "move";
|
document.body.style.cursor = "move";
|
||||||
|
|
||||||
const distanceX = ev.clientX - disX;
|
const distanceX = ev.clientX - disX;
|
||||||
const distanceY = ev.clientY - disY;
|
const distanceY = ev.clientY - disY;
|
||||||
el.scrollTo(
|
el.scrollTo(
|
||||||
originalScrollLeft - distanceX,
|
originalScrollLeft - distanceX,
|
||||||
originalScrollTop - distanceY
|
originalScrollTop - distanceY
|
||||||
);
|
);
|
||||||
// 由于我们的图片本身有点击效果,所以需要在鼠标拖动的时候将点击事件屏蔽掉
|
// 由于我们的图片本身有点击效果,所以需要在鼠标拖动的时候将点击事件屏蔽掉
|
||||||
el.style["pointer-events"] = "none";
|
el.style["pointer-events"] = "none";
|
||||||
|
};
|
||||||
|
document.onmouseup = function (ev) {
|
||||||
|
ev.stopPropagation();
|
||||||
|
// elEvent.target.style.cursor = "auto";
|
||||||
|
// ev.target.style.cursor = "auto";
|
||||||
|
document.body.style.cursor = "auto";
|
||||||
|
|
||||||
|
document.onmousemove = null;
|
||||||
|
document.onmouseup = null;
|
||||||
|
el.style["scroll-behavior"] = originalScrollBehavior;
|
||||||
|
el.style["pointer-events"] = originalPointerEvents;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
document.onmouseup = function (ev) {
|
}
|
||||||
ev.stopPropagation();
|
}
|
||||||
// elEvent.target.style.cursor = "auto";
|
|
||||||
// ev.target.style.cursor = "auto";
|
|
||||||
document.body.style.cursor = "auto";
|
|
||||||
|
|
||||||
document.onmousemove = null;
|
|
||||||
document.onmouseup = null;
|
|
||||||
el.style["scroll-behavior"] = originalScrollBehavior;
|
|
||||||
el.style["pointer-events"] = originalPointerEvents;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init() {
|
init() {
|
||||||
|
@ -991,6 +1000,14 @@
|
||||||
selectExecutor({key}) {
|
selectExecutor({key}) {
|
||||||
this.defaultExecutor = this.projectMembers[key];
|
this.defaultExecutor = this.projectMembers[key];
|
||||||
},
|
},
|
||||||
|
// 添加任务
|
||||||
|
addTask(stageCode, stageIndex){
|
||||||
|
console.log('-----',stageCode);
|
||||||
|
this.task.stage_code = stageCode;
|
||||||
|
this.task.project_code = this.code;
|
||||||
|
this.task.assign_to = this.defaultExecutor.code;
|
||||||
|
this.$router.push(`${this.$route.path}/add/${this.code}?from=${stageIndex}`);
|
||||||
|
},
|
||||||
//准备添加任务
|
//准备添加任务
|
||||||
createTask(stageCode, stageIndex) {
|
createTask(stageCode, stageIndex) {
|
||||||
if (!this.task.name) {
|
if (!this.task.name) {
|
||||||
|
@ -1053,7 +1070,11 @@
|
||||||
// title: '添加任务成功',
|
// title: '添加任务成功',
|
||||||
// msg: '你可以点击该任务继续进行详细设置'
|
// msg: '你可以点击该任务继续进行详细设置'
|
||||||
// }, 'notice', 'success', 5);
|
// }, 'notice', 'success', 5);
|
||||||
}
|
|
||||||
|
// 打开任务详情弹窗
|
||||||
|
this.taskDetail(res.data.code, stageIndex);
|
||||||
|
console.log({...res.data});
|
||||||
|
};
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
app.createTaskLoading = false;
|
app.createTaskLoading = false;
|
||||||
});
|
});
|
||||||
|
@ -1270,6 +1291,11 @@
|
||||||
},
|
},
|
||||||
taskDetail(code, stageIndex) {
|
taskDetail(code, stageIndex) {
|
||||||
this.$router.push(`${this.$route.path}/detail/${code}?from=${stageIndex}`);
|
this.$router.push(`${this.$route.path}/detail/${code}?from=${stageIndex}`);
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.showTaskCard(stageIndex,false);
|
||||||
|
}, 700)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
stageSort(event) {
|
stageSort(event) {
|
||||||
const list = this.getPreAndNextCode(event);
|
const list = this.getPreAndNextCode(event);
|
||||||
|
|
|
@ -0,0 +1,74 @@
|
||||||
|
<template>
|
||||||
|
<a-modal
|
||||||
|
class="task-add-modal"
|
||||||
|
width="min-content"
|
||||||
|
:closable="false"
|
||||||
|
visible
|
||||||
|
title=""
|
||||||
|
:footer="null"
|
||||||
|
@cancel="addClose"
|
||||||
|
>
|
||||||
|
<task-add :taskCode="code" @close="addClose"></task-add>
|
||||||
|
|
||||||
|
</a-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import taskAdd from '../../../components/project/taskAdd'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "task-add-modal",
|
||||||
|
components: {
|
||||||
|
taskAdd
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
code: this.$route.params.taskCode,
|
||||||
|
projectCode: this.$route.params.code,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.init();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init() {
|
||||||
|
this.loading = true;
|
||||||
|
},
|
||||||
|
addClose() {
|
||||||
|
const stageIndex = this.$route.query.from;
|
||||||
|
let url = '';
|
||||||
|
if (stageIndex) {
|
||||||
|
url = `?from=${stageIndex}`;
|
||||||
|
}
|
||||||
|
this.$router.push(`/project/space/task/${this.projectCode}${url}`);
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
.task-add-modal {
|
||||||
|
/*display: flex;*/
|
||||||
|
/*justify-content: center;*/
|
||||||
|
/*flex: 1;*/
|
||||||
|
/*min-height: 1px;*/
|
||||||
|
/*min-width: 1px;*/
|
||||||
|
width: 1200px;
|
||||||
|
|
||||||
|
&.ant-modal {
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-modal-content {
|
||||||
|
/*width: 1200px;*/
|
||||||
|
/*overflow: hidden;*/
|
||||||
|
|
||||||
|
.ant-modal-body {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -130,8 +130,8 @@
|
||||||
showLoadingMore: false,
|
showLoadingMore: false,
|
||||||
loadingMore: false,
|
loadingMore: false,
|
||||||
currentTemplate: {},
|
currentTemplate: {},
|
||||||
cover:'https://beta.vilson.xyz/static/image/default/project-cover.png',
|
// cover:'https://beta.vilson.xyz/static/image/default/project-cover.png',
|
||||||
// cover: config.PROD_URL + '/static/image/default/cover.png',
|
cover: config.PROD_URL + '/static/image/default/cover.png',
|
||||||
newData: {
|
newData: {
|
||||||
id: 0,
|
id: 0,
|
||||||
},
|
},
|
||||||
|
|
|
@ -19,7 +19,7 @@ module.exports = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
devServer: {
|
devServer: {
|
||||||
host: process.env.VUE_APP_DEV_HOST || '127.0.0.1',
|
// host: process.env.VUE_APP_DEV_HOST || '127.0.0.1',
|
||||||
port: process.env.VUE_APP_DEV_PORT || '8045',
|
port: process.env.VUE_APP_DEV_PORT || '8045',
|
||||||
https: false,
|
https: false,
|
||||||
hotOnly: false,
|
hotOnly: false,
|
||||||
|
|
Loading…
Reference in New Issue