This commit is contained in:
weipengfei 2024-01-10 18:00:35 +08:00
parent 99cb6a6e16
commit a7d92cda03
12 changed files with 107 additions and 126 deletions

View File

@ -4,7 +4,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<!--<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">--> <!--<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">-->
<link id="icon" rel="icon" type="image/x-icon" href="<%= BASE_URL %>favicon.ico"> <link id="icon" rel="icon" type="image/x-icon" href="<%= BASE_URL %>favicon.ico">
<title>Pear Project</title> <title>工单系统</title>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>

View File

@ -33,7 +33,7 @@
desc: { desc: {
type: [String], type: [String],
default() { default() {
return '欢迎使用Pear Project项目管理系统'; return '欢迎使用工单项目管理系统';
} }
} }
} }

View File

@ -350,10 +350,10 @@
<a-list-item-meta> <a-list-item-meta>
<a-avatar size="small" slot="avatar" shape="square" <a-avatar size="small" slot="avatar" shape="square"
icon="link" icon="link"
:src="item.sourceDetail.file_url"/> :src="item.fileUrl"/>
<div slot="title"> <div slot="title">
<a class="muted" target="_blank" <a class="muted" target="_blank"
:href="item.sourceDetail.file_url">{{ item.title :href="item.fileUrl">{{ item.name
}}</a> }}</a>
</div> </div>
<div slot="description"> <div slot="description">
@ -361,33 +361,10 @@
</div> </div>
</a-list-item-meta> </a-list-item-meta>
<a class="muted" slot="actions"> <a class="muted" slot="actions">
<span>{{item.sourceDetail.projectName}}</span> <span>{{item.projectName}}</span>
</a> </a>
<a class="muted" slot="actions"> <a class="muted" slot="actions" @click="removeTaskSource(item, index)">
<a-dropdown :trigger="['click']" <a-icon type="delete"/>
placement="bottomCenter">
<!-- <a-tooltip :mouseEnterDelay="0.5">
<template slot="title">
<span>更多操作</span>
</template>-->
<a class="action-item muted">
<a-icon type="down"/>
</a>
<!--</a-tooltip>-->
<a-menu v-clipboard="item.sourceDetail.file_url"
@click="doSource($event,item)"
class="field-right-menu"
slot="overlay">
<a-menu-item key="copy">
<a-icon type="link"/>
<span>复制链接</span>
</a-menu-item>
<a-menu-item key="unlink">
<a-icon type="disconnect"/>
<span>取消关联</span>
</a-menu-item>
</a-menu>
</a-dropdown>
</a> </a>
</a-list-item> </a-list-item>
</a-list> </a-list>
@ -477,6 +454,7 @@
loading: false, loading: false,
code: this.taskCode, code: this.taskCode,
projectCodeCurrent: '', projectCodeCurrent: '',
projectName: '',
task: { task: {
pri: 0, pri: 0,
priText: '普通', priText: '普通',
@ -631,13 +609,11 @@
uploader: { uploader: {
handler(newVal, oldVal) { handler(newVal, oldVal) {
// //
console.log(newVal); console.log('上传文件', newVal);
console.log(newVal.fileList); console.log('上传文件', newVal.fileList, oldVal.fileList);
const files = newVal.fileList; const files = newVal.fileList;
const index = files.findIndex(item => item.projectName == this.task.projectName); if(files[files.length-1].projectName == this.projectName){
if (index !== -1) { this.taskSourceList.push(files[files.length-1])
this.taskSources();
this.getTaskLog();
} }
}, },
deep: true deep: true
@ -649,6 +625,7 @@
this.getDepartment(); this.getDepartment();
// console.log('router', this.$route); // console.log('router', this.$route);
this.projectCode = this.$route.params.code; this.projectCode = this.$route.params.code;
this.projectName = this.$route.query.name;
this.$nextTick(()=>{ this.$nextTick(()=>{
this.changeModalHeight(); this.changeModalHeight();
}) })
@ -741,6 +718,10 @@
}) })
} }
}, },
//
removeTaskSource(e, index){
this.taskSourceList.splice(index, 1);
},
// //
addTask(){ addTask(){
if(!this.task.name) return notice({title: '请输入工单名称'}, 'error', 5000); if(!this.task.name) return notice({title: '请输入工单名称'}, 'error', 5000);
@ -755,6 +736,9 @@
task.exchangeList = task.exchangeList.map(item=>{ task.exchangeList = task.exchangeList.map(item=>{
return item.code; return item.code;
}) })
task.file_list = this.taskSourceList.map(item=>{
return item.code;
}).join(',');
task.exchangeList = task.exchangeList.join(','); task.exchangeList = task.exchangeList.join(',');
task.copied_list = task.copied_list.map(item=>{ task.copied_list = task.copied_list.map(item=>{
return item.code; return item.code;
@ -841,7 +825,7 @@
// }) // })
}, },
taskSources() { taskSources() {
// taskSources({taskCode: this.code,}).then((res) => { // taskSources().then((res) => {
// this.taskSourceList = res.data; // this.taskSourceList = res.data;
// }) // })
}, },

View File

@ -103,7 +103,7 @@
<div class="content-left"> <div class="content-left">
<vue-scroll :ops="scrollOps"> <vue-scroll :ops="scrollOps">
<div class="task-title" :class="{'disabled': task.deleted}" :style="{'pointer-events': userInfo.code==task.create_by? 'all':'none'}"> <div class="task-title" :class="{'disabled': task.deleted}" :style="{'pointer-events': userInfo.code==task.create_by? 'all':'none'}">
<a-input ref="inputTitle" auto-focus @blur="doName" v-model="task.name" size="large" <a-input ref="inputTitle" @blur="doName" v-model="task.name" size="large"
v-show="showEditName"/> v-show="showEditName"/>
<a-tooltip :mouseEnterDelay="0.5" v-if="!task.deleted"> <a-tooltip :mouseEnterDelay="0.5" v-if="!task.deleted">
<template slot="title"> <template slot="title">
@ -117,16 +117,16 @@
{{task.name}} {{task.name}}
</div> </div>
</div> </div>
<div class="task-basic-attrs-view muted" :style="{'pointer-events': userInfo.code==task.create_by? 'all':'none'}"> <div class="task-basic-attrs-view muted" >
<div class="field-list" :class="{'disabled': task.deleted}"> <div class="field-list" :class="{'disabled': task.deleted}">
<div class="component-mount pink-bg"> <div class="component-mount pink-bg" :style="{'pointer-events': userInfo.code==task.create_by? 'all':'none'}">
<div class="field"> <div class="field">
<div class="field-left"> <div class="field-left">
<a-icon type="file-text"/> <a-icon type="file-text"/>
<span class="field-name">工作内容</span> <span class="field-name">工作内容</span>
</div> </div>
<div class="field-right width-block"> <div class="field-right width-block">
<div class="task-description" :class="{'disabled': task.deleted}" <div :class="{'task-description': userInfo.code==task.create_by}"
v-show="!showTaskDescriptionEdit" v-show="!showTaskDescriptionEdit"
@click="showTaskDesc"> @click="showTaskDesc">
<div class="description-txt img-preview-content" v-show="task.description" <div class="description-txt img-preview-content" v-show="task.description"
@ -371,7 +371,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="component-mount"> <div class="component-mount" style="pointer-events:none">
<div class="field"> <div class="field">
<div class="field-left"> <div class="field-left">
<a-icon type="user"/> <a-icon type="user"/>
@ -415,7 +415,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="component-mount"> <div class="component-mount" style="pointer-events:none">
<div class="field"> <div class="field">
<div class="field-left"> <div class="field-left">
<a-icon type="apartment"/> <a-icon type="apartment"/>
@ -431,7 +431,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="component-mount"> <div class="component-mount" style="pointer-events:none">
<div class="field"> <div class="field">
<div class="field-left"> <div class="field-left">
<a-icon type="gateway"/> <a-icon type="gateway"/>
@ -550,11 +550,11 @@
</div> </div>
</div> </div>
</div> </div>
<div class="component-mount" v-if="userInfo.code==task.create_by"> <div class="component-mount" v-show="userInfo.code==task.create_by||(userInfo.code==task.assign_to&&task.status==2)" >
<div class="field"> <div class="field">
<div class="block-field width-block"> <div class="block-field width-block">
<div class="task-child" > <div class="task-child" >
<a class="add-handler" id="upload-file"> <a class="add-handler" id="d-upload-file">
<a-icon type="plus" style="margin-right: 6px;"/> <a-icon type="plus" style="margin-right: 6px;"/>
上传文件 上传文件
</a> </a>
@ -698,7 +698,7 @@
<a class="show-more muted" v-show="checkShowMoreLog" <a class="show-more muted" v-show="checkShowMoreLog"
@click="getMoreTaskLog"> @click="getMoreTaskLog">
<a-icon type="ellipsis"/> <a-icon type="ellipsis"/>
显示较早的 {{taskLogTotal - taskLogList.length}} 动态 显示较早的 {{taskLogTotal - taskLogList.length}} 数据
</a> </a>
<div :class="{'log-comment': log.is_comment,'list-item': !log.is_comment, 'log-pass': log.type=='pass', 'log-reject': log.type=='reject', 'log-add': log.type=='add'}" <div :class="{'log-comment': log.is_comment,'list-item': !log.is_comment, 'log-pass': log.type=='pass', 'log-reject': log.type=='reject', 'log-add': log.type=='add'}"
v-for="log in taskLogList" :key="log.code"> v-for="log in taskLogList" :key="log.code">
@ -741,7 +741,7 @@
</vue-scroll> </vue-scroll>
</div> </div>
<div class="footer" id="footer"> <div class="footer" id="footer">
<a-popover v-if="userInfo.code==task.create_by||userInfo.code==task.assign_to" trigger="click" placement="top" :visible="showMentions" arrowPointAtCenter :getPopupContainer="getPopup"> <a-popover v-if="(userInfo.code==task.create_by&&task.status==4)||(userInfo.code == task.assign_to&&task.status==2)" trigger="click" placement="top" :visible="showMentions" arrowPointAtCenter :getPopupContainer="getPopup">
<template slot="content"> <template slot="content">
<div class="mentions-content" style="width: 200px;"> <div class="mentions-content" style="width: 200px;">
<div class="mentions-wrapper" v-for="member in taskMemberList" :key="member.id" @click="selectMentionMember(member)"> <div class="mentions-wrapper" v-for="member in taskMemberList" :key="member.id" @click="selectMentionMember(member)">
@ -753,11 +753,11 @@
<a-textarea @focus="commenting = true" @blur="commenting = false" ref="commentText" v-model="comment" :rows="1" placeholder="@提及任务成员Ctrl+Enter发送" <a-textarea @focus="commenting = true" @blur="commenting = false" ref="commentText" v-model="comment" :rows="1" placeholder="@提及任务成员Ctrl+Enter发送"
style="margin-right: 15px;"/> style="margin-right: 15px;"/>
</a-popover> </a-popover>
<template v-if="userInfo.code == task.create_by"> <template v-if="userInfo.code == task.create_by&&task.status==4">
<a-button class="middle-btn" type="danger" @click="createComment(2)">驳回</a-button> <a-button class="middle-btn" type="danger" @click="createComment(2)">驳回</a-button>
<a-button class="middle-btn" type="primary" style="margin-left: 15px;" @click="createComment(1)">通过</a-button> <a-button class="middle-btn" type="primary" style="margin-left: 15px;" @click="createComment(1)">通过</a-button>
</template> </template>
<template v-if="userInfo.code == task.assign_to"> <template v-if="userInfo.code == task.assign_to&&task.status==2">
<a-button class="middle-btn" type="primary" @click="createComment(3)">提交</a-button> <a-button class="middle-btn" type="primary" @click="createComment(3)">提交</a-button>
</template> </template>
</div> </div>
@ -1114,7 +1114,6 @@
}, },
created() { created() {
this.init(); this.init();
console.log(this.userInfo);
}, },
mounted() { mounted() {
this.$nextTick(()=>{ this.$nextTick(()=>{
@ -1139,7 +1138,7 @@
} }
}; };
setTimeout(() => { setTimeout(() => {
this.uploader.assignBrowse(document.getElementById('upload-file')); this.uploader.assignBrowse(document.getElementById('d-upload-file'));
}, 500) }, 500)
}, },
filters: { filters: {
@ -1236,6 +1235,7 @@
this.$store.commit('viewRefresh'); this.$store.commit('viewRefresh');
this.clearMemberMenu(); this.clearMemberMenu();
read(this.code).then((res) => { read(this.code).then((res) => {
try {
this.getTaskLog(); this.getTaskLog();
this.taskSources(); this.taskSources();
this.taskName = res.data.name; this.taskName = res.data.name;
@ -1267,6 +1267,9 @@
taskCode: this.code, taskCode: this.code,
projectName: res.data.projectName projectName: res.data.projectName
}) })
} catch (error) {
console.error(error);
}
}); });
}, },
getTaskLog() { getTaskLog() {

View File

@ -177,7 +177,7 @@
let ignored = false; let ignored = false;
let fileName = ''; let fileName = '';
const singleMaxSize = this.singleMaxSize * 1024 * 1024; const singleMaxSize = this.singleMaxSize * 1024 * 1024;
console.log(fileList); // console.log(fileList);
fileList.forEach((v, k) => { fileList.forEach((v, k) => {
if (v.size > singleMaxSize) { if (v.size > singleMaxSize) {
ignored = true; ignored = true;
@ -214,6 +214,7 @@
} }
rootFile.projectName = response.data.projectName; rootFile.projectName = response.data.projectName;
rootFile.fileUrl = response.data.url; rootFile.fileUrl = response.data.url;
rootFile.code = response.data.code || '';
console.log('file success', rootFile); console.log('file success', rootFile);
this.completeTotal++; this.completeTotal++;
}, },

View File

@ -1,10 +1,10 @@
<template> <template>
<div class="home-index"> <div class="home-index">
<div class="page-header"> <div class="page-header">
<p class="day-text muted"> {{ yiyan.hitokoto }} {{ yiyan.from }} <a class="muted" @click="getYiYan"> <!-- <p class="day-text muted"> {{ yiyan.hitokoto }} {{ yiyan.from }} <a class="muted" @click="getYiYan">
<a-icon type="reload"/> <a-icon type="reload"/>
</a> </a>
</p> </p> -->
<div class="header-content" v-if="userInfo"> <div class="header-content" v-if="userInfo">
<div class="left-content"> <div class="left-content">
<div class="avatar"> <div class="avatar">
@ -104,7 +104,7 @@
<div slot="title"> <div slot="title">
<span>{{ item.member_name }}</span> <span>{{ item.member_name }}</span>
<span v-if="item.is_comment == 0"> <span v-html="item.remark "></span></span>&nbsp; <span v-if="item.is_comment == 0"> <span v-html="item.remark "></span></span>&nbsp;
<template v-if="item.is_comment == 1">表了评论 <template v-if="item.is_comment == 1">布了审核流程
<p class="comment-text">{{ item.content }}</p> <p class="comment-text">{{ item.content }}</p>
</template> </template>
<router-link target="_blank" <router-link target="_blank"
@ -173,13 +173,7 @@
<span v-if="item.hasUnDone" style="font-size: 12px;">子任务尚未全部完成无法完成父任务</span> <span v-if="item.hasUnDone" style="font-size: 12px;">子任务尚未全部完成无法完成父任务</span>
</template> </template>
</template> </template>
<span class="check-box-wrapper task-item"
@click.stop="()=>{if(item.deleted || item.hasUnDone || (item.pcode && item.parentDone)) return false;taskDone(item.code, !item.done)}">
<a-icon class="check-box"
:class="{'disabled': item.deleted || item.parentDone || item.hasUnDone}"
:type="item.done ? 'check-square' : 'border'"
:style="{fontSize:'16px'}"/>
</span>
</a-tooltip> </a-tooltip>
<a-tooltip :title="item.name"> <a-tooltip :title="item.name">
<span @click="showTaskDetail = true;taskCode = item.code">{{ item.name }}</span> <span @click="showTaskDetail = true;taskCode = item.code">{{ item.name }}</span>

View File

@ -33,14 +33,14 @@
@click="$router.push('/project/space/overview/' + code)"> @click="$router.push('/project/space/overview/' + code)">
概览</a> 概览</a>
</li> </li>
<li class=""><a class="app" data-app="build" <!-- <li class=""><a class="app" data-app="build"
@click="$router.push('/project/space/features/' + code)"> @click="$router.push('/project/space/features/' + code)">
版本</a> 版本</a>
</li> </li>
<li class="actives"><a class="app" data-app="works" <li class="actives"><a class="app" data-app="works"
@click="$router.push('/project/space/events/' + code)"> @click="$router.push('/project/space/events/' + code)">
日程</a> 日程</a>
</li> </li> -->
</ul> </ul>
</section> </section>
</div> </div>

View File

@ -33,14 +33,14 @@
@click="$router.push('/project/space/overview/' + code)"> @click="$router.push('/project/space/overview/' + code)">
概览</a> 概览</a>
</li> </li>
<li class="actives"><a class="app" data-app="build" <!-- <li class="actives"><a class="app" data-app="build"
@click="$router.push('/project/space/features/' + code)"> @click="$router.push('/project/space/features/' + code)">
版本</a> 版本</a>
</li> </li>
<li><a class="app" data-app="build" <li><a class="app" data-app="build"
@click="$router.push('/project/space/events/' + code)"> @click="$router.push('/project/space/events/' + code)">
日程</a> 日程</a>
</li> </li> -->
</ul> </ul>
</section> </section>
</div> </div>

View File

@ -33,14 +33,14 @@
@click="$router.push('/project/space/overview/' + code)"> @click="$router.push('/project/space/overview/' + code)">
概览</a> 概览</a>
</li> </li>
<li class=""><a class="app" data-app="build" <!-- <li class=""><a class="app" data-app="build"
@click="$router.push('/project/space/features/' + code)"> @click="$router.push('/project/space/features/' + code)">
版本</a> 版本</a>
</li> </li>
<li><a class="app" data-app="build" <li><a class="app" data-app="build"
@click="$router.push('/project/space/events/' + code)"> @click="$router.push('/project/space/events/' + code)">
日程</a> 日程</a>
</li> </li> -->
</ul> </ul>
</section> </section>
</div> </div>

View File

@ -33,14 +33,14 @@
@click="$router.push('/project/space/overview/' + code)"> @click="$router.push('/project/space/overview/' + code)">
概览</a> 概览</a>
</li> </li>
<li class=""><a class="app" data-app="build" <!-- <li class=""><a class="app" data-app="build"
@click="$router.push('/project/space/features/' + code)"> @click="$router.push('/project/space/features/' + code)">
版本</a> 版本</a>
</li> </li>
<li><a class="app" data-app="build" <li><a class="app" data-app="build"
@click="$router.push('/project/space/events/' + code)"> @click="$router.push('/project/space/events/' + code)">
日程</a> 日程</a>
</li> </li> -->
</ul> </ul>
</section> </section>
</div> </div>
@ -125,7 +125,7 @@
<span>{{ item.member_name }} </span> <span>{{ item.member_name }} </span>
<span v-if="item.is_comment == 0"> <span <span v-if="item.is_comment == 0"> <span
v-html="item.remark "></span></span>&nbsp; v-html="item.remark "></span></span>&nbsp;
<template v-if="item.is_comment == 1">表了评论 <template v-if="item.is_comment == 1">布了审核流程
<p class="comment-text">{{ item.content }}</p> <p class="comment-text">{{ item.content }}</p>
</template> </template>
<span class="right-item muted"> {{ formatTime(item.create_time) }} <span class="right-item muted"> {{ formatTime(item.create_time) }}

View File

@ -62,7 +62,7 @@
概览</a 概览</a
> >
</li> </li>
<li class=""> <!-- <li class="">
<a <a
class="app" class="app"
data-app="build" data-app="build"
@ -79,7 +79,7 @@
> >
日程</a 日程</a
> >
</li> </li> -->
</ul> </ul>
</section> </section>
<div class="project-nav-footer"> <div class="project-nav-footer">
@ -87,13 +87,13 @@
<a-icon type="plus-circle"></a-icon> <a-icon type="plus-circle"></a-icon>
<span> 创建任务</span> <span> 创建任务</span>
</a> </a>
<a class="footer-item" @click="changeViewType()"> <!-- <a class="footer-item" @click="changeViewType()">
<span> <span>
<span v-if="viewType == 'task-board'"> <span v-if="viewType == 'task-board'">
<a-icon type="database"></a-icon> </span <a-icon type="database"></a-icon> </span
><span v-else> <a-icon type="table"></a-icon> </span></span ><span v-else> <a-icon type="table"></a-icon> </span></span
> >
</a> </a> -->
<a class="footer-item" @click="visibleDraw('taskSearch')"> <a class="footer-item" @click="visibleDraw('taskSearch')">
<a-icon type="search"></a-icon> <a-icon type="search"></a-icon>
<span> 筛选</span> <span> 筛选</span>
@ -117,10 +117,10 @@
</div> </div>
</div> </div>
<wrapper-content :showHeader="false"> <wrapper-content :showHeader="false">
<draggable <!-- draggable组件拖动 v-model="taskStages" -->
<div
e e
v-show="viewType == 'task-board'" v-show="viewType == 'task-board'"
v-model="taskStages"
:options="{ :options="{
group: 'stages', group: 'stages',
filter: '.undraggables', filter: '.undraggables',
@ -132,7 +132,6 @@
id="board-scrum-stages" id="board-scrum-stages"
class="board-scrum-stages" class="board-scrum-stages"
@end="stageSort" @end="stageSort"
v-dragscroll2
> >
<div <div
class="scrum-stage" class="scrum-stage"
@ -215,9 +214,8 @@
wrapperClassName="tasks-loading" wrapperClassName="tasks-loading"
:spinning="stage.tasksLoading" :spinning="stage.tasksLoading"
> >
<!--未完成列表--> <!--未完成列表 v-model="stage.unDoneTasks" 拖动 -->
<draggable <div
v-model="stage.unDoneTasks"
:options="{ :options="{
group: 'task', group: 'task',
ghostClass: 'task-ghost', ghostClass: 'task-ghost',
@ -373,7 +371,7 @@
</div> </div>
</div> </div>
</template> </template>
</draggable> </div>
<!--创建任务卡片--> <!--创建任务卡片-->
<div <div
class="task-creator-wrap card" class="task-creator-wrap card"
@ -448,8 +446,7 @@
</form> </form>
</div> </div>
<!--已完成列表--> <!--已完成列表-->
<draggable <div
v-model="stage.doneTasks"
:options="{ :options="{
group: 'task-done', group: 'task-done',
ghostClass: 'task-ghost', ghostClass: 'task-ghost',
@ -527,7 +524,7 @@
</div> </div>
</template> </template>
<!--</ul>--> <!--</ul>-->
</draggable> </div>
<div <div
class="scrum-stage-tasks-done" class="scrum-stage-tasks-done"
v-show="stage.canNotReadCount" v-show="stage.canNotReadCount"
@ -602,7 +599,7 @@
</div> </div>
</header> </header>
</div> </div>
</draggable> </div>
<task-table <task-table
v-if="viewType == 'task-table' && !loading" v-if="viewType == 'task-table' && !loading"
:project-code="this.code" :project-code="this.code"
@ -722,19 +719,19 @@
项目设置 项目设置
</a> </a>
</li> </li>
<li class="menu-item"> <!-- <li class="menu-item">
<a @click="taskTagModal.modalStatus = true"> <a @click="taskTagModal.modalStatus = true">
<a-icon type="tags" /> <a-icon type="tags" />
标签 标签
</a> </a>
</li> </li> -->
<li class="menu-item"> <li class="menu-item">
<a @click="recycleModal.modalStatus = true"> <a @click="recycleModal.modalStatus = true">
<a-icon type="delete" /> <a-icon type="delete" />
查看回收站 查看回收站
</a> </a>
</li> </li>
<li class="menu-item"> <!-- <li class="menu-item">
<a :href="downLoadUrl" target="_blank"> <a :href="downLoadUrl" target="_blank">
<a-icon type="copy" /> <a-icon type="copy" />
下载导入任务模板 下载导入任务模板
@ -759,7 +756,7 @@
上传文件导入任务 上传文件导入任务
</a> </a>
</a-upload> </a-upload>
</li> </li> -->
<li class="menu-item"> <li class="menu-item">
<a> <a>
<a-icon type="logout" /> <a-icon type="logout" />
@ -941,6 +938,7 @@ export default {
data() { data() {
return { return {
viewType: "task-board", viewType: "task-board",
// viewType: "task-table",
code: this.$route.params.code, code: this.$route.params.code,
loading: true, loading: true,
project: { task_board_theme: "simple" }, project: { task_board_theme: "simple" },
@ -1147,6 +1145,7 @@ export default {
}, },
directives: { directives: {
dragscroll2: function (el) { dragscroll2: function (el) {
return;
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);
@ -1336,7 +1335,7 @@ export default {
// this.task.project_code = this.code; // this.task.project_code = this.code;
// this.task.assign_to = this.defaultExecutor.code; // this.task.assign_to = this.defaultExecutor.code;
this.$router.push( this.$router.push(
`${this.$route.path}/add/${this.code}?from=${0}&stage_code=${this.taskStages[0].code}` `${this.$route.path}/add/${this.code}?name=${this.project.name}&from=${0}&stage_code=${this.taskStages[0].code}`
); );
}, },
// //

View File

@ -26,8 +26,8 @@ module.exports = {
proxy: { // 配置跨域 proxy: { // 配置跨域
'/api': { '/api': {
//要访问的跨域的api的域名 //要访问的跨域的api的域名
target: `https://work.lihaink.cn`, // target: `https://work.lihaink.cn`,
// target: `${process.env.VUE_APP_API_URL}/`, target: `${process.env.VUE_APP_API_URL}/`,
ws: true, ws: true,
changOrigin: true, changOrigin: true,
pathRewrite: { pathRewrite: {