feat: 创建任务窗口添加小时钟
This commit is contained in:
parent
83e5c7fadb
commit
748976f393
@ -46,6 +46,10 @@
|
||||
</ETooltip>
|
||||
</li>
|
||||
</ul>
|
||||
<div v-if="taskDays > 0" class="advanced-time">
|
||||
<Icon type="ios-clock-outline" />
|
||||
<em type="primary" :style="addData.p_color ? {backgroundColor:addData.p_color} : {}">{{taskDays}}</em>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -205,6 +209,18 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapState(['userId', 'projects', 'projectId', 'columns', 'taskPriority']),
|
||||
|
||||
taskDays() {
|
||||
const {times} = this.addData;
|
||||
let temp = $A.date2string(times, "Y-m-d H:i");
|
||||
if (temp[0] && temp[1]) {
|
||||
let d = Math.floor(($A.Date(temp[1]).getTime() - $A.Date(temp[0]).getTime()) / 86400000);
|
||||
if (d > 0) {
|
||||
return d;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
value(val) {
|
||||
|
@ -110,6 +110,34 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.advanced-time {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 20px;
|
||||
position: relative;
|
||||
.ivu-icon {
|
||||
font-size: 32px;
|
||||
}
|
||||
> em {
|
||||
position: absolute;
|
||||
top: -5px;
|
||||
left: 16px;
|
||||
font-family: "Monospaced Number", "serif";
|
||||
transform: scale(0.8);
|
||||
height: 20px;
|
||||
min-width: 20px;
|
||||
line-height: 20px;
|
||||
border-radius: 10px;
|
||||
background: #8bcf70;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
padding: 0 6px;
|
||||
font-size: 12px;
|
||||
font-style: normal;
|
||||
white-space: nowrap;
|
||||
box-shadow: 0 0 0 1px #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.task-add-advanced {
|
||||
|
Loading…
x
Reference in New Issue
Block a user