Merge branch 'dev' of http://192.168.0.56:3000/zzyuan/gz-att-web into dev
This commit is contained in:
commit
f3b0f2ff87
|
|
@ -259,6 +259,9 @@
|
|||
// 表单重置
|
||||
reset() {
|
||||
this.queryForm = {};
|
||||
const lastMonth = new Date();
|
||||
lastMonth.setMonth(lastMonth.getMonth() - 1)
|
||||
this.searchAttCurrentMonth = lastMonth;
|
||||
this.resetForm("queryForm");
|
||||
this.getList();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -379,7 +379,11 @@
|
|||
reset() {
|
||||
// this.searchAttCurrentMonth = '';
|
||||
// this.queryParams.attCurrentMonth = null;
|
||||
|
||||
this.queryForm = {};
|
||||
const lastMonth = new Date();
|
||||
lastMonth.setMonth(lastMonth.getMonth() - 1)
|
||||
this.searchAttCurrentMonth = lastMonth;
|
||||
this.resetForm("queryForm");
|
||||
|
||||
this.getList();
|
||||
|
|
|
|||
|
|
@ -25,15 +25,99 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目部名称" align="center" prop="orgName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="项目经理" align="center" prop="projectManager" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="安全员" align="center" prop="safetyOfficer" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="质检员" align="center" prop="qualityInspector" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="项目总工" align="center" prop="chiefEngineer" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="机械员" align="center" prop="mechanicalStaff" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="资料员" align="center" prop="documentStaff" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="施工员" align="center" prop="constructionStaff" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="材料员" align="center" prop="materialStaff" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="其他" align="center" prop="other" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="项目经理" align="center" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.projectManager === '兼职'"
|
||||
style="color: #1890FF; cursor: pointer"
|
||||
@click="handleAllocation(scope.row,1)">
|
||||
{{ scope.row.projectManager }}
|
||||
</div>
|
||||
<span v-else>{{ scope.row.projectManager }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="安全员" align="center" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.safetyOfficer === '兼职'"
|
||||
style="color: #1890FF; cursor: pointer"
|
||||
@click="handleAllocation(scope.row,2)">
|
||||
{{ scope.row.safetyOfficer }}
|
||||
</div>
|
||||
<span v-else>{{ scope.row.safetyOfficer }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="质检员" align="center" :show-overflow-tooltip="true" >
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.qualityInspector === '兼职'"
|
||||
style="color: #1890FF; cursor: pointer"
|
||||
@click="handleAllocation(scope.row,3)">
|
||||
{{ scope.row.qualityInspector }}
|
||||
</div>
|
||||
<span v-else>{{ scope.row.qualityInspector }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目总工" align="center" :show-overflow-tooltip="true" >
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.chiefEngineer === '兼职'"
|
||||
style="color: #1890FF; cursor: pointer"
|
||||
@click="handleAllocation(scope.row,4)">
|
||||
{{ scope.row.chiefEngineer }}
|
||||
</div>
|
||||
<span v-else>{{ scope.row.chiefEngineer }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机械员" align="center" :show-overflow-tooltip="true" >
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.mechanicalStaff === '兼职'"
|
||||
style="color: #1890FF; cursor: pointer"
|
||||
@click="handleAllocation(scope.row,5)" v-hasPermi="['dept:eight:query']">
|
||||
{{ scope.row.mechanicalStaff }}
|
||||
</div>
|
||||
<span v-else>{{ scope.row.mechanicalStaff }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="资料员" align="center" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.documentStaff === '兼职'"
|
||||
style="color: #1890FF; cursor: pointer"
|
||||
@click="handleAllocation(scope.row,6)">
|
||||
{{ scope.row.documentStaff }}
|
||||
</div>
|
||||
<span v-else>{{ scope.row.documentStaff }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="施工员" align="center" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.constructionStaff === '兼职'"
|
||||
style="color: #1890FF; cursor: pointer"
|
||||
@click="handleAllocation(scope.row,7)">
|
||||
{{ scope.row.constructionStaff }}
|
||||
</div>
|
||||
<span v-else>{{ scope.row.constructionStaff }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料员" align="center" :show-overflow-tooltip="true" >
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.materialStaff === '兼职'"
|
||||
style="color: #1890FF; cursor: pointer"
|
||||
@click="handleAllocation(scope.row,8)">
|
||||
{{ scope.row.materialStaff }}
|
||||
</div>
|
||||
<span v-else>{{ scope.row.materialStaff }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="其他" align="center" :show-overflow-tooltip="true" >
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.other === '兼职'"
|
||||
style="color: #1890FF; cursor: pointer"
|
||||
@click="handleAllocation(scope.row,9)">
|
||||
{{ scope.row.other }}
|
||||
</div>
|
||||
<span v-else>{{ scope.row.other }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
|
|
@ -46,39 +130,31 @@
|
|||
/>
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-dialog :title="title" :visible.sync="open" width="650px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="部门名称" prop="orgName">
|
||||
<el-input v-model="form.orgName" :disabled="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="角色名称" prop="deptRoleName">
|
||||
<el-input v-model="form.deptRoleName" :disabled="true" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="人员" >
|
||||
<el-tree
|
||||
class="tree-border"
|
||||
:data="staffOptions"
|
||||
show-checkbox
|
||||
ref="staff"
|
||||
node-key="id"
|
||||
empty-text="加载中,请稍候"
|
||||
:props="defaultProps"
|
||||
default-expand-all
|
||||
:default-checked-keys="defaultCheckedKeys"
|
||||
></el-tree>
|
||||
</el-form-item>
|
||||
<!-- 使用v-for遍历MoreOrgDataList -->
|
||||
<el-row v-for="(item, index) in MoreOrgDataList" :key="index">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="兼职人员:" prop="orgName" label-width="90px">
|
||||
<el-input :value="item.userName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="兼职角色:" prop="deptRoleName" label-width="90px">
|
||||
<el-input :value="item.deptRoleName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
<div slot="footer" class="dialog-footer" align="center">
|
||||
<el-button @click="cancels">关闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getOrgEightRoleDetail} from "@/api/process/eightMembers";
|
||||
import {getOrgEightRoleDetail,getMoreOrgData} from "@/api/process/eightMembers";
|
||||
import { treeselect as staffTreeselect, roleStaffTreeselect } from "@/api/process/tree";
|
||||
|
||||
|
||||
|
|
@ -100,6 +176,7 @@ export default {
|
|||
total: 0,
|
||||
// 字典表格数据
|
||||
typeList: [],
|
||||
MoreOrgDataList:[],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
|
|
@ -111,6 +188,7 @@ export default {
|
|||
parentOrgName:undefined,
|
||||
lackOrgId:this.$route.query.lackOrgId
|
||||
},
|
||||
paramsQuery:{},
|
||||
// 人员列表
|
||||
staffOptions: [],
|
||||
// 默认选中的节点 id 数组
|
||||
|
|
@ -161,21 +239,29 @@ export default {
|
|||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 分配人员按钮操作 */
|
||||
handleAllocation(row) {
|
||||
/** 按钮操作 */
|
||||
handleAllocation(row,deptRoleId) {
|
||||
this.reset();
|
||||
this.getStaffTreeselect(row);
|
||||
this.getDialogData(row,deptRoleId);
|
||||
this.form = row;
|
||||
this.open = true;
|
||||
this.title = "分配人员";
|
||||
},
|
||||
|
||||
/** 查询员工树结构 */
|
||||
getStaffTreeselect(data) {
|
||||
staffTreeselect(data).then(response => {
|
||||
this.staffOptions = response.data;
|
||||
getDialogData(data,deptRoleId) {
|
||||
console.log(data.orgId)
|
||||
this.paramsQuery={
|
||||
orgId:data.orgId,
|
||||
deptRoleId:deptRoleId
|
||||
}
|
||||
getMoreOrgData(this.paramsQuery).then(response => {
|
||||
this.MoreOrgDataList = response.data;
|
||||
});
|
||||
},
|
||||
cancels(){
|
||||
this.open = false;
|
||||
this.MoreOrgDataList=[];
|
||||
},
|
||||
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
<el-button type="primary" size="mini" @click="openDialog">批量修改</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
|
|
@ -54,12 +54,12 @@
|
|||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
</el-col> -->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" align="center" width="80" type="index">
|
||||
|
|
@ -113,7 +113,7 @@
|
|||
<el-table-column label="打卡地址" align="center" prop="offWorkAttAddress" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="异常备注" align="center" prop="offWorkErrorRemake" :show-overflow-tooltip="true" />
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
|
|
@ -134,7 +134,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="修改上班时间" align="center" prop="toWorkAttCurrentTime" width="240">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
<el-date-picker
|
||||
v-model="scope.row.toWorkAttCurrentTime" :clearable="false"
|
||||
type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="width: 95%"
|
||||
placeholder="选择上班时间">
|
||||
|
|
@ -164,7 +164,7 @@
|
|||
|
||||
<el-table-column label="修改下班时间" align="center" prop="offWorkAttCurrentTime" width="240">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
<el-date-picker
|
||||
v-model="scope.row.offWorkAttCurrentTime" :clearable="false"
|
||||
type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="width: 95%"
|
||||
placeholder="选择下班时间">
|
||||
|
|
@ -197,16 +197,16 @@
|
|||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import { getDetailsList,updateAttDetails } from "@/api/report/attReport";
|
||||
import { listDept } from "@/api/system/dept";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
export default {
|
||||
name: "Dict",
|
||||
dicts: ['att_status'],
|
||||
|
|
@ -255,10 +255,10 @@
|
|||
const now = new Date();
|
||||
const dayOfWeek = now.getDay();
|
||||
const dayOffset = dayOfWeek === 0 ? -6 : 1 - dayOfWeek;
|
||||
|
||||
|
||||
const monday = new Date(now);
|
||||
monday.setDate(monday.getDate() + dayOffset);
|
||||
|
||||
|
||||
const sunday = new Date(monday);
|
||||
sunday.setDate(sunday.getDate() + 6);
|
||||
this.dateRange[0]=monday.toISOString().split('T')[0];
|
||||
|
|
@ -332,7 +332,7 @@
|
|||
this.$message({ message: '请先勾选数据!', type: 'warning' })
|
||||
}
|
||||
},
|
||||
submitEdit(){
|
||||
submitEdit(){
|
||||
let paramList = []
|
||||
var index = this.dialogList.findIndex(item => {return !item.toErrorRemake||item.toErrorRemake==""||!item.offErrorRemake||item.offErrorRemake==""})
|
||||
|
||||
|
|
@ -353,7 +353,7 @@
|
|||
offErrorRemake:item.offErrorRemake,
|
||||
}
|
||||
paramList.push(obj)
|
||||
})
|
||||
})
|
||||
// console.log(paramList)
|
||||
updateAttDetails(paramList).then(response => {
|
||||
if(response.code==200){
|
||||
|
|
@ -377,7 +377,7 @@
|
|||
...this.queryParams
|
||||
}, `type_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -291,7 +291,7 @@ export default {
|
|||
openReason: false,
|
||||
dialogList:[],
|
||||
// 日期范围
|
||||
dateRange: this.getDefaultDateRange(),
|
||||
dateRange:[],
|
||||
reasonStr:undefined,
|
||||
deptOptions: [],
|
||||
// 查询参数
|
||||
|
|
@ -309,15 +309,33 @@ export default {
|
|||
console.log(this.$route.query.param)
|
||||
this.queryParams.userName=this.$route.query.param
|
||||
}
|
||||
this.getWeekDates();
|
||||
this.getDeptList();
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
getDefaultDateRange() {
|
||||
const today = new Date();
|
||||
const start = new Date(today.toISOString().split('T')[0]); // 移除时间部分,只保留日期
|
||||
const end = new Date(today.toISOString().split('T')[0]); // 同样只保留日期
|
||||
return [start, end];
|
||||
getWeekDates() {
|
||||
const now = new Date();
|
||||
const dayOfWeek = now.getDay();
|
||||
const dayOffset = dayOfWeek === 0 ? -6 : 1 - dayOfWeek;
|
||||
|
||||
const monday = new Date(now);
|
||||
monday.setDate(monday.getDate() + dayOffset);
|
||||
|
||||
const sunday = new Date(monday);
|
||||
sunday.setDate(sunday.getDate() + 6);
|
||||
this.dateRange[0]=monday.toISOString().split('T')[0];
|
||||
this.dateRange[1]=sunday.toISOString().split('T')[0];
|
||||
},
|
||||
formatDate(dateString){
|
||||
const date = new Date(dateString); // 创建日期对象
|
||||
const year = date.getFullYear(); // 获取年份
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0'); // 获取月份(注意:月份从0开始)
|
||||
const day = String(date.getDate()).padStart(2, '0'); // 获取日期
|
||||
const weekdays = ['星期天', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']; // 星期几数组
|
||||
const weekday = weekdays[date.getDay()]; // 获取星期几
|
||||
|
||||
return `${year}-${month}-${day} ${weekday}`; // 组合成所需格式
|
||||
},
|
||||
getDeptList() {
|
||||
listDept().then(response => {
|
||||
|
|
@ -360,6 +378,7 @@ export default {
|
|||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.getWeekDates();
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -391,8 +391,10 @@
|
|||
//打开月异常详情页面
|
||||
openRecord(row,titleBoss){
|
||||
this.id = row.id;
|
||||
|
||||
this.title = titleBoss;
|
||||
this.queryRecord.userId = row.userId;
|
||||
this.queryRecord.orgId = row.orgId;
|
||||
this.queryRecord.attCurrent = row.attCurrentMonth;
|
||||
if(titleBoss=='打卡记录'){
|
||||
this.queryRecord.attStatis=1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue