perf: 优化任务时间冲突提示

This commit is contained in:
kuaifan 2023-07-21 12:15:07 +08:00
parent c9d9afc72b
commit 5b079018e8
3 changed files with 12 additions and 26 deletions

View File

@ -1250,5 +1250,5 @@ Markdown 格式发送
退出
会议组件加载失败!
以下人员已存在任务
确定
计划时间冲突提示
忽略并继续

View File

@ -1,10 +1,10 @@
<template>
<Modal v-model="show" :title="$L('以下人员已存在任务')" class="task-exist-tips" width="640">
<Modal v-model="show" :title="$L('计划时间冲突提示')" class="task-exist-tips">
<List :split="false" size="small">
<ListItem v-for="(items, userid) in tipsTask" :key="userid">
<div class="list-content">
<UserAvatar :userid="userid" :size="28" :show-icon="true" :show-name="true" tooltipDisabled />
<div class="list-task" v-for="(item, key) in items" :key="key">
<div class="list-task clearfix" v-for="(item, key) in items" :key="key">
<div class="list-task-info">
<span>[{{ item.project_name }}] </span>
<span>{{ item.name }}</span>
@ -16,18 +16,14 @@
</List>
<div slot="footer">
<Button type="default" @click="show = false">{{ $L('取消') }}</Button>
<Button type="primary" @click="onAdd()">{{ $L('确定') }}</Button>
<Button type="primary" @click="onAdd">{{ $L('忽略并继续') }}</Button>
</div>
</Modal>
</template>
<script>
import TEditor from "../../../components/TEditor";
import UserSelect from "../../../components/UserSelect.vue";
export default {
name: "TaskExistTips",
components: { UserSelect, TEditor },
props: {
value: {
type: Boolean,
@ -57,7 +53,7 @@ export default {
if ($A.formatDate('Y/m/d', start_at) == $A.formatDate('Y/m/d', end_at)) {
string = $A.formatDate('Y/m/d H:i', start_at) + " ~ " + $A.formatDate('H:i', end_at)
} else if ($A.formatDate('Y', start_at) == $A.formatDate('Y', end_at)) {
string = $A.formatDate('Y/m/d', start_at) + " ~ " + $A.formatDate('m/d', end_at)
string = $A.formatDate('Y/m/d H:i', start_at) + " ~ " + $A.formatDate('m/d H:i', end_at)
string = string.replace(/( 00:00| 23:59)/g, "")
} else {
string = $A.formatDate('Y/m/d H:i', start_at) + " ~ " + $A.formatDate('Y/m/d H:i', end_at)

View File

@ -1,7 +1,7 @@
.task-exist-tips {
.ivu-modal-body {
padding: 0px 26px 16px 26px !important;
padding: 0 26px 16px 26px !important;
max-height: 500px;
overflow: auto;
}
@ -12,29 +12,19 @@
}
.list-task {
@media (min-width: 450px) {
display: flex;
}
margin-left: 34px;
margin-left: 22px;
margin-top: 10px;
width: calc(100% - 34px);
}
.list-task-info {
min-width: 135px;
flex: 1;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
float: left;
padding: 0 12px;
span:first-child {
color: #A7ABB5;
}
}
.list-task-date {
min-width: 135px;
text-align: left;
float: right;
}
}
}