fix: 项目任务甘特图图标及优化移动逻辑

This commit is contained in:
韦荣超 2022-03-14 18:17:23 +08:00
parent eb2b11ed3e
commit 6cffd81540
3 changed files with 9 additions and 8 deletions

View File

@ -299,6 +299,9 @@ export default {
if (this.mouseItem != null) {
e.preventDefault();
var diff = e.clientX - this.mouseBak.clientX;
if (diff < 0 && this.mouseItem.time.start > this.mouseItem.time.end) {
return false;
}
this.$set(this.mouseItem, this.mouseBak.type, this.mouseBak.value + diff);
} else if (this.dateMove != null) {
e.preventDefault();
@ -329,6 +332,9 @@ export default {
this.$set(this.mouseItem, 'moveW', 0);
isM = true;
}
if (this.mouseItem.time && this.mouseItem.time.start > this.mouseItem.time.end) {
return false;
}
//
if (isM) {
this.$emit("on-change", this.mouseItem)

View File

@ -84,13 +84,8 @@
<div :class="['project-switch-button', !projectParameter('card') ? 'menu' : '']" @click="$store.dispatch('toggleProjectParameter', 'card')">
<div><i class="taskfont">&#xe60c;</i></div>
<div><i class="taskfont">&#xe66a;</i></div>
<div @click="projectGanttShow=!projectGanttShow"><i class="taskfont">&#xe797;</i></div>
</div>
<div class="project-gantt-item"
:class="{active:projectGanttShow}"
@click="projectGanttShow=!projectGanttShow">
<Icon type="ios-paper-outline" size="26"/>
<label class="gantt-name">{{ $L('甘特图') }}</label>
</div>
</div>
</div>
</div>

View File

@ -202,7 +202,7 @@
position: absolute;
top: 0;
left: 0;
width: 50%;
width: 33.3%;
height: 100%;
z-index: 0;
color: $primary-color;
@ -230,7 +230,7 @@
}
&.menu {
&:before {
left: 50%;
left: 33.3%;
}
> div:first-child {
color: $primary-text-color;