缺少上传文件组件的完整代码,期待获取,完成签到页的全面优化

This commit is contained in:
2024-12-15 21:41:23 +08:00
parent 9fd16697d5
commit ba0d565424
27 changed files with 1102 additions and 57 deletions

View File

@@ -3,7 +3,20 @@
<el-row :gutter="20">
<el-col :span="16">
<el-header> 签到表</el-header>
<el-header>
<div style="">
<span>签到表</span>
<span style="float:right;">
<el-date-picker
v-model="queryParams.selectTime"
value-format="yyyy-MM-dd"
type="month"
@change="getList()"
placeholder="选择月">
</el-date-picker>
</span>
</div>
</el-header>
<table>
<thead>
<tr>
@@ -35,18 +48,20 @@
<el-button @click="removeAttendance" type="danger" plain>取消操作</el-button>
<el-button @click="toTravel" type="warning" plain>出差</el-button>
</el-card>
<el-card class="box-card">
<el-card class="box-card" >
<div slot="" class="">
<span><i class="el-icon-s-order"></i> 项目列表</span>
<!-- <el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button>-->
</div>
<div v-for="(item,index) in projectList" style="display: flex;justify-content: space-between">
<div style="height: 250px;overflow: auto">
<div v-for="(item,index) in sortedProjects" style="display: flex;justify-content: space-between;">
<el-button class="text" :style="{backgroundColor:item.color===''?'':item.color}" @click="signIn(item)">
{{ item.projectName }}
</el-button>
<el-color-picker class="color-picker" v-model="item.color"
@change="changeItemColor(item)"></el-color-picker>
</div>
</div>
</el-card>
<el-card class="box-card">
<div slot="" class="">
@@ -288,13 +303,14 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 50,
selectTime: new Date(),
},
selectArrayIndex: new Date().getDate(),
timeFlag: 0,
// 项目查询参数
projectQueryParams: {
pageNum: 1,
pageSize: 10,
pageSize: 99,
projectStatus: 0,
projectName: undefined,
projectNum: undefined,
@@ -310,6 +326,7 @@ export default {
calcResultUser: {},
calcResultAttendances: [],
calcResultProject: {},
}
},
mounted() {
@@ -319,6 +336,17 @@ export default {
this.getDate();
this.getList();
},
computed:{
sortedProjects() {
let projectList = [...this.projectList];
projectList.sort((a, b) => {
if (a.color && !b.color) return -1;
if (!a.color && b.color) return 1;
return 0;
});
return projectList;
}
},
methods: {
@@ -403,14 +431,14 @@ export default {
getList() {
this.loading = true;
listOaAttendance(this.queryParams).then(res => {
this.userList = res.data;
this.total = res.total;
this.userList = res.rows;
console.log(this.userList);
this.dateLength = res.total;
this.loading = false;
});
listProject(this.projectQueryParams).then(response => {
this.projectList = response.rows;
this.total = response.total;
})
},