工作日志展示进度

项目执行表增加总计时间,增加状态筛选
v1.2.0
‘wangjiuyun 2024-11-06 17:49:10 +08:00
parent c8bb8ef089
commit bfa923b3ac
3 changed files with 51 additions and 9 deletions

View File

@ -20,7 +20,7 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="项目状态" class="form-item"> <el-form-item label="项目状态" class="form-item">
<el-select v-model="searchForm.projectState" placeholder="项目状态"> <el-select v-model="searchForm.projectState" placeholder="项目状态" clearable>
<el-option <el-option
v-for="item in statusList" v-for="item in statusList"
:key="item.dictValue" :key="item.dictValue"

View File

@ -5,6 +5,22 @@
<div class="shadowBox"></div> <div class="shadowBox"></div>
<div class="flex-row aic mb20"> <div class="flex-row aic mb20">
<h2 class="textC">项目执行表</h2> <h2 class="textC">项目执行表</h2>
<div class="ml20">
项目状态
<el-select
v-model="projectState"
placeholder="项目状态"
@change="getProjectProgress"
clearable
>
<el-option
v-for="item in statusList"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
/>
</el-select>
</div>
<div class="date-range-container"> <div class="date-range-container">
<span class="date-range-label">统计时间</span> <span class="date-range-label">统计时间</span>
<el-date-picker <el-date-picker
@ -53,6 +69,7 @@ export default {
fixedColumns: [], fixedColumns: [],
executionData: [], executionData: [],
statusList: [], statusList: [],
projectState: "",
}; };
}, },
methods: { methods: {
@ -69,6 +86,7 @@ export default {
const res = await projectBank.porjectProgress({ const res = await projectBank.porjectProgress({
startDate: this.dateRange[0] + " 00:00:00", startDate: this.dateRange[0] + " 00:00:00",
endDate: this.dateRange[1] + " 00:00:00", endDate: this.dateRange[1] + " 00:00:00",
projectState: this.projectState,
}); });
this.timeRange = [this.dateRange[0], this.dateRange[1]]; this.timeRange = [this.dateRange[0], this.dateRange[1]];
this.executionData = res.data; this.executionData = res.data;
@ -83,7 +101,7 @@ export default {
} }
let values; let values;
if (column.property == "detailList") { if (column.property == "detailList") {
values = data.map((item) => Number(item[column.property][index - 4])); values = data.map((item) => Number(item[column.property][index - 5]));
} else if (column.property == "projectState") { } else if (column.property == "projectState") {
values = []; values = [];
} else { } else {
@ -219,6 +237,12 @@ export default {
width: 100, width: 100,
fixed: "left", fixed: "left",
}, },
{
prop: "allDateWorkTime",
label: "总计工时\n",
width: 100,
fixed: "left",
},
{ {
prop: "allWorkTime", prop: "allWorkTime",
label: "统计工时\n", label: "统计工时\n",
@ -320,7 +344,7 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
width: 500px; width: 500px;
margin-left: 350px; margin-left: 180px;
} }
.date-range-label { .date-range-label {
white-space: nowrap; white-space: nowrap;
@ -353,7 +377,23 @@ export default {
// left: 450px; // left: 450px;
// z-index: 100; // z-index: 100;
} }
::v-deep .el-table__footer td { // ::v-deep .el-table__footer td {
border: none !important; // border: none !important;
} // }
// ::v-deep .el-table__body-wrapper,::v-deep thead.has-gutter{
// position: relative;
// left: 550px;
// .el-table__cell{
// width: 100px !important;
// }
// .is-hidden {
// display: none;
// }
// }
// ::v-deep .el-table__body-wrapper{
// max-width: 68% !important;
// }
// ::v-deep .el-table--fit{
// overflow-x: hidden;
// }
</style> </style>

View File

@ -170,7 +170,9 @@
v-if="projectInfo.userId == $store.state.user.id" v-if="projectInfo.userId == $store.state.user.id"
> >
<el-button @click="logDialogVisible = false">取消</el-button> <el-button @click="logDialogVisible = false">取消</el-button>
<el-button v-if="logForm.loggerId" type="danger" @click="delWorkLog"></el-button> <el-button v-if="logForm.loggerId" type="danger" @click="delWorkLog"
>删除</el-button
>
<el-button type="primary" @click="saveWorkLog"></el-button> <el-button type="primary" @click="saveWorkLog"></el-button>
</span> </span>
</template> </template>
@ -245,7 +247,7 @@ export default {
if (item.state == -1) { if (item.state == -1) {
ele.style = "background:#ecf5ff"; ele.style = "background:#ecf5ff";
} else { } else {
ele.style = "background:#409eff;color:#fff"; ele.style = `background:linear-gradient(to right, #409eff ${(item.workTime||1)*100}% , #ecf5ff ${(item.workTime||1)*100}%);color:${item.workTime>0.65?'#fff':'#333'};`;
} }
} }
}); });
@ -455,7 +457,7 @@ export default {
this.$modal.confirm(`是否确认删日志`).then(async () => { this.$modal.confirm(`是否确认删日志`).then(async () => {
await workLogApi.delLog(this.logForm.loggerId); await workLogApi.delLog(this.logForm.loggerId);
this.$modal.msgSuccess("操作成功"); this.$modal.msgSuccess("操作成功");
this.logDialogVisible=false this.logDialogVisible = false;
this.changeMonth(); this.changeMonth();
const response = await workLogApi.userProject(this.projectInfo.userId); const response = await workLogApi.userProject(this.projectInfo.userId);
this.projectList = response.data; this.projectList = response.data;