样式调整
parent
d365e61242
commit
ecacb4dc02
|
@ -67,7 +67,7 @@ export default {
|
|||
total: 0,
|
||||
selectedUsers: [],
|
||||
currentDepartment: '',
|
||||
tableHeight: 350, // 设置一个合适的高度
|
||||
tableHeight: '350', // 设置一个合适的高度
|
||||
treeData: [],
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
|
|
|
@ -63,8 +63,8 @@ export default {
|
|||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
|
@ -72,7 +72,7 @@ export default {
|
|||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: #c0c0c0;
|
||||
background-color: #d2d1d1;
|
||||
border-radius: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
:show-index="true"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
tableHeight="600"
|
||||
tableHeight="80%"
|
||||
>
|
||||
<template slot="operation" slot-scope="{ row }">
|
||||
<div class="operation-buttons">
|
||||
|
@ -104,8 +104,8 @@ export default {
|
|||
projectState: "",
|
||||
},
|
||||
columns: [
|
||||
{ prop: "projectName", label: "项目名称" },
|
||||
{ prop: "projectCode", label: "项目编号" },
|
||||
{ prop: "projectName", label: "项目名称",width:300, },
|
||||
{ prop: "projectCode", label: "项目编号",width:200, },
|
||||
{ prop: "projectLeaderName", label: "负责人" },
|
||||
{ prop: "budgetDate", label: "预计工时(天)" },
|
||||
{
|
||||
|
|
|
@ -90,6 +90,7 @@
|
|||
type="month"
|
||||
format="yyyy年MM月"
|
||||
:clearable="false"
|
||||
@change="changeMonth"
|
||||
/>
|
||||
</div>
|
||||
<div class="calendar-view" v-if="projectInfo">
|
||||
|
@ -106,7 +107,9 @@
|
|||
disabled: isFutureDate(data.date) && isInProjectRange(data),
|
||||
}"
|
||||
>
|
||||
{{ data.day.split("-")[2] }}
|
||||
{{
|
||||
data.day.split("-")[1] + "/" + data.day.split("-")[2]
|
||||
}}
|
||||
</div>
|
||||
</template>
|
||||
</el-calendar>
|
||||
|
@ -220,7 +223,11 @@ export default {
|
|||
res.data.startDate.split(" ")[0] + " 00:00:00";
|
||||
this.projectInfo.endDate = res.data.endDate.split(" ")[0] + " 23:59:59";
|
||||
|
||||
this.selectedDate = new Date(this.projectInfo.startDate); // 设置为项目开始时间
|
||||
if (this.projectInfo.userId == this.$store.state.user.id) {
|
||||
this.selectedDate = new Date();
|
||||
} else {
|
||||
this.selectedDate = new Date(this.projectInfo.startDate); // 设置为项目开始时间
|
||||
}
|
||||
|
||||
const res2 = await workLogApi.getLogData({
|
||||
projectId: this.projectInfo.projectId,
|
||||
|
@ -254,7 +261,6 @@ export default {
|
|||
this.$modal.msgWarning("请先选择一个项目");
|
||||
return;
|
||||
}
|
||||
this.handleProjectClick(this.projectInfo);
|
||||
|
||||
const clickedDate = new Date(data.day);
|
||||
const currentDate = new Date();
|
||||
|
@ -289,9 +295,15 @@ export default {
|
|||
projectId: this.projectInfo.projectId,
|
||||
loggerDate: this.logForm.loggerDate,
|
||||
});
|
||||
this.logForm.workTime = res.data.workTime;
|
||||
this.logForm.workContent = res.data.workContent;
|
||||
this.logForm.loggerId = res.data.loggerId;
|
||||
if (res.data) {
|
||||
this.logForm.workTime = res.data.workTime;
|
||||
this.logForm.workContent = res.data.workContent;
|
||||
this.logForm.loggerId = res.data.loggerId;
|
||||
} else {
|
||||
this.logForm.workTime = "";
|
||||
this.logForm.workContent = "";
|
||||
this.logForm.loggerId = "";
|
||||
}
|
||||
} else {
|
||||
this.logForm.workTime = "";
|
||||
this.logForm.workContent = "";
|
||||
|
@ -300,9 +312,32 @@ export default {
|
|||
const res = await workLogApi.getDayTime({
|
||||
loggerDate: this.logForm.loggerDate,
|
||||
});
|
||||
|
||||
this.logForm.max =
|
||||
Number(res.data) + (Number(this.logForm.workTime) || 0);
|
||||
this.logDialogVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.changeMonth();
|
||||
});
|
||||
},
|
||||
changeMonth() {
|
||||
let that = this;
|
||||
this.$nextTick(async () => {
|
||||
const res2 = await workLogApi.getLogData({
|
||||
projectId: that.projectInfo.projectId,
|
||||
startDate:
|
||||
that
|
||||
.moment(that.selectedDate)
|
||||
.startOf("month")
|
||||
.format("YYYY-MM-DD") + " 00:00:00",
|
||||
endDate:
|
||||
that.moment(that.selectedDate).endOf("month").format("YYYY-MM-DD") +
|
||||
" 23:59:59",
|
||||
userId: that.projectInfo.userId,
|
||||
});
|
||||
that.logData = res2.data;
|
||||
that.initDateColor(1);
|
||||
});
|
||||
},
|
||||
isInProjectRange(data) {
|
||||
if (!this.projectInfo) return false;
|
||||
|
@ -511,22 +546,30 @@ export default {
|
|||
color: white; /* 白色文字 */
|
||||
padding: 5px 0; /* 增加一些内边距 */
|
||||
}
|
||||
|
||||
.project-info-calendar ::v-deep .el-calendar__body th{
|
||||
height: 60px !important;
|
||||
font-weight: bold !important;
|
||||
font-size: 20px;
|
||||
}
|
||||
.project-info-calendar .calendar-view ::v-deep .el-calendar-day {
|
||||
height: 65px; /* 增加日期单元格高度(原高度 + 5px) */
|
||||
height: 85px; /* 增加日期单元格高度(原高度 + 5px) */
|
||||
// padding-top: 5px;
|
||||
padding: 3px;
|
||||
padding: 10px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.project-info-calendar .calendar-view ::v-deep .el-calendar-day.disabled {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.project-info-calendar .calendar-view ::v-deep table *{
|
||||
border: none;
|
||||
}
|
||||
.project-info-calendar .calendar-view ::v-deep .date-cell {
|
||||
cursor: pointer;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
line-height: 55px;
|
||||
line-height: 65px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.project-info-calendar .calendar-view ::v-deep .in-range {
|
||||
|
@ -534,7 +577,7 @@ export default {
|
|||
}
|
||||
|
||||
.project-info-calendar .calendar-view ::v-deep .out-range {
|
||||
background-color: rgba(0, 0, 0, 0.05) !important;
|
||||
background-color: rgba(0, 0, 0, 0.1) !important;
|
||||
}
|
||||
|
||||
.project-info-calendar .calendar-view ::v-deep .disabled {
|
||||
|
|
Loading…
Reference in New Issue