oa二期内容更新
This commit is contained in:
@@ -30,11 +30,14 @@
|
||||
<tbody>
|
||||
<tr v-for="(item,index) in userList">
|
||||
<td :class="(item.userId===selectUser.userId || selectAll)?'selectBox':''">{{ item.nickName }}</td>
|
||||
<td style="font-size: small" v-for="(item2,index2) in dateLength" @click="selectAttendDay(item,index,index2+1)"
|
||||
<td style="font-size: small" v-for="(item2,index2) in dateLength"
|
||||
@click="selectAttendDay(item,index,index2+1)"
|
||||
:style="{backgroundColor:(item.attendances.length>0 && item.attendances.findIndex(i=>i.attendanceDay === index2+1) >-1) ?
|
||||
(item.attendances[item.attendances.findIndex(i=>i.attendanceDay === index2+1)].projectId!==0?item.attendances[item.attendances.findIndex(i=>i.attendanceDay === index2+1)].color:'#fdf6e4'):
|
||||
(index2+1===selectIndex&&(item.userId===selectUser.userId || selectAll)?'#f3ff52':'')}"
|
||||
>{{item.attendances.length>0 && item.attendances.findIndex(i=>i.attendanceDay === index2+1) >-1 && item.attendances[item.attendances.findIndex(i=>i.attendanceDay === index2+1)].projectId===0?'出差':''}}</td>
|
||||
>
|
||||
{{ item.attendances.length > 0 && item.attendances.findIndex(i => i.attendanceDay === index2 + 1) > -1 && item.attendances[item.attendances.findIndex(i => i.attendanceDay === index2 + 1)].projectId === 0 ? '出差' : '' }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -48,19 +51,19 @@
|
||||
<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 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 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">
|
||||
@@ -99,8 +102,6 @@
|
||||
|
||||
<el-row :gutter="20" class="mb8">
|
||||
<el-col :span="2">
|
||||
|
||||
|
||||
<span class="demonstration">计算月份:</span>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@@ -119,47 +120,52 @@
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-table
|
||||
:data="userList"
|
||||
stripe
|
||||
style="width: 100%">
|
||||
|
||||
<el-table
|
||||
:data="userList"
|
||||
stripe
|
||||
style="width: 60%">
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="nickName"
|
||||
label="员工姓名"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="nickName"
|
||||
label="员工姓名"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-if="calcFlag"
|
||||
@click="handleCalc(scope.row)"
|
||||
v-hasPermi="['oa:oaWarehouse:edit']"
|
||||
>查看考勤结果
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
v-else
|
||||
disabled
|
||||
icon="el-icon-edit"
|
||||
@click="handleCalc(scope.row)"
|
||||
v-hasPermi="['oa:oaWarehouse:edit']"
|
||||
>请选择日期计算
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<bar-chart :projectList="projects"></bar-chart>
|
||||
</el-col>
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-if="calcFlag"
|
||||
@click="handleCalc(scope.row)"
|
||||
v-hasPermi="['oa:oaWarehouse:edit']"
|
||||
>查看考勤结果
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
v-else
|
||||
disabled
|
||||
icon="el-icon-edit"
|
||||
@click="handleCalc(scope.row)"
|
||||
v-hasPermi="['oa:oaWarehouse:edit']"
|
||||
>请选择日期计算
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
|
||||
|
||||
@@ -219,7 +225,7 @@
|
||||
label="项目名"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<div>{{scope.row.projectId===0?'出差':scope.row.projectName}}</div>
|
||||
<div>{{ scope.row.projectId === 0 ? '出差' : scope.row.projectName }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -267,9 +273,12 @@ import {
|
||||
delOaAttendanceAll
|
||||
} from "../../../api/oa/oaAttendance";
|
||||
import item from "../../../layout/components/Sidebar/Item.vue";
|
||||
import BarChart from "../../dashboard/BarChart.vue";
|
||||
import {projectData} from "../../../api/oa/project";
|
||||
|
||||
export default {
|
||||
name: "Project",
|
||||
components: {BarChart},
|
||||
dicts: ['work_time_length', 'work_time_length_hour'],
|
||||
data() {
|
||||
return {
|
||||
@@ -326,6 +335,7 @@ export default {
|
||||
calcResultUser: {},
|
||||
calcResultAttendances: [],
|
||||
calcResultProject: {},
|
||||
projects:[]
|
||||
|
||||
}
|
||||
},
|
||||
@@ -333,10 +343,12 @@ export default {
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
this.getDate();
|
||||
this.getProjectData();
|
||||
this.getList();
|
||||
},
|
||||
computed:{
|
||||
computed: {
|
||||
sortedProjects() {
|
||||
let projectList = [...this.projectList];
|
||||
projectList.sort((a, b) => {
|
||||
@@ -350,8 +362,14 @@ export default {
|
||||
|
||||
methods: {
|
||||
|
||||
// 获取条形图数据
|
||||
getProjectData(){
|
||||
projectData().then(res => {
|
||||
this.projects = res.data;
|
||||
})
|
||||
},
|
||||
// 出差标记
|
||||
toTravel(){
|
||||
toTravel() {
|
||||
if (!this.selectAll) {
|
||||
this.form = {
|
||||
projectId: 0,
|
||||
|
||||
Reference in New Issue
Block a user