Merge branch 'dev' of http://192.168.0.56:3000/zzyuan/gz-att-web into dev
This commit is contained in:
commit
f4186a150c
|
|
@ -9,5 +9,13 @@ export function getDetailsList(query) {
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询考勤明细修改记录列表
|
||||||
|
export function getDetailsRecordList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/attDetails/getAttUpdateList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,230 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
||||||
|
<el-form-item label="分公司名称" prop="orgName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.orgName"
|
||||||
|
maxlength="28"
|
||||||
|
placeholder="请输入分公司名称"
|
||||||
|
clearable
|
||||||
|
style="width: 200px"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="typeList" >
|
||||||
|
<el-table-column label="序号" align="center" width="80" type="index">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="分公司名称" align="center" prop="orgName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="缺员情况" align="center" :show-overflow-tooltip="true">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div style="color: #1890FF; cursor: pointer" @click="goShortageSituation(scope.row)">{{scope.row.deptRoleName}}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="兼职情况" align="center" :show-overflow-tooltip="true">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div style="color: #1890FF; cursor: pointer" @click="goPartTimeSituation(scope.row)">{{scope.row.deptRoleName}}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改参数配置对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" 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>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {getRoleUserList, proDeptRole} from "@/api/process/rolesRemind";
|
||||||
|
import { treeselect as staffTreeselect, roleStaffTreeselect } from "@/api/process/tree";
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Roles",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 字典表格数据
|
||||||
|
typeList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
deptRoleName: undefined,
|
||||||
|
orgName: undefined,
|
||||||
|
userName: undefined,
|
||||||
|
departmentId:"-1"
|
||||||
|
},
|
||||||
|
// 人员列表
|
||||||
|
staffOptions: [],
|
||||||
|
// 默认选中的节点 id 数组
|
||||||
|
defaultCheckedKeys: [],
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
defaultProps: {
|
||||||
|
children: "children",
|
||||||
|
label: "name",
|
||||||
|
disabled: "disabled" // 添加 disabled 属性
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
getRoleUserList(this.queryParams).then(response => {
|
||||||
|
this.typeList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
orgId: undefined,
|
||||||
|
orgName: undefined,
|
||||||
|
departmentId: undefined,
|
||||||
|
deptRoleId: undefined,
|
||||||
|
deptRoleName: undefined,
|
||||||
|
userId: undefined,
|
||||||
|
userName: undefined,
|
||||||
|
reviewerStatus: undefined,
|
||||||
|
reviewerTime: undefined,
|
||||||
|
reviewerUserId: undefined,
|
||||||
|
roleType: undefined,
|
||||||
|
staffOptions:[]
|
||||||
|
};
|
||||||
|
this.defaultCheckedKeys = []; // 重置默认选中的节点
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
/** 分配人员按钮操作 */
|
||||||
|
handleAllocation(row) {
|
||||||
|
this.reset();
|
||||||
|
this.getStaffTreeselect(row);
|
||||||
|
this.form = row;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "分配人员";
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 查询员工树结构 */
|
||||||
|
getStaffTreeselect(data) {
|
||||||
|
staffTreeselect(data).then(response => {
|
||||||
|
this.staffOptions = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
goShortageSituation(item){
|
||||||
|
this.$router.push({path:"/process/shortageSituation",query:{orgId:item.orgId}})
|
||||||
|
},
|
||||||
|
goPartTimeSituation(item){
|
||||||
|
this.$router.push({path:"/process/partTimeSituation",query:{orgId:item.orgId}})
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm: function() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
const checkedKeys = this.getStaffAllCheckedKeys();
|
||||||
|
if (checkedKeys.length === 0) {
|
||||||
|
this.$message.error("请至少选择一个人员");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.form.userId = checkedKeys.join(",");
|
||||||
|
console.log("form",this.form)
|
||||||
|
proDeptRole(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 所有菜单节点数据
|
||||||
|
getStaffAllCheckedKeys() {
|
||||||
|
// 目前被选中的菜单节点
|
||||||
|
let checkedKeys = this.$refs.staff.getCheckedKeys();
|
||||||
|
// 半选中的菜单节点
|
||||||
|
// let halfCheckedKeys = this.$refs.staff.getHalfCheckedKeys();
|
||||||
|
// checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
|
||||||
|
checkedKeys.unshift.apply(checkedKeys);
|
||||||
|
return checkedKeys;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
@ -0,0 +1,271 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
||||||
|
<el-form-item label="项目部名称" prop="orgName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.orgName"
|
||||||
|
maxlength="28"
|
||||||
|
placeholder="请输入项目部名称"
|
||||||
|
clearable
|
||||||
|
style="width: 200px"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="人员" prop="userName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.userName"
|
||||||
|
maxlength="28"
|
||||||
|
placeholder="请输入人员名称"
|
||||||
|
clearable
|
||||||
|
style="width: 200px"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="typeList" >
|
||||||
|
<el-table-column label="序号" align="center" width="80" type="index">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="项目部名称" align="center" prop="orgName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="项目经理" align="center" prop="deptRoleName" :show-overflow-tooltip="true" />
|
||||||
|
|
||||||
|
<el-table-column label="安全员" align="center" :show-overflow-tooltip="true">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div style="color: #1890FF; cursor: pointer" @click="handleAllocation(scope.row)">{{scope.row.deptRoleName}}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
|
||||||
|
<el-table-column label="质检员" align="center" prop="orgName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="项目总工" align="center" prop="deptRoleName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="机械员" align="center" prop="deptRoleName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="资料员" align="center" :show-overflow-tooltip="true">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div style="color: #1890FF; cursor: pointer" @click="handleAllocation(scope.row)">{{scope.row.orgName}}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="施工员" align="center" :show-overflow-tooltip="true">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div style="color: #1890FF; cursor: pointer" @click="handleAllocation(scope.row)">{{scope.row.deptRoleName}}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="材料员" align="center" prop="deptRoleName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="其他" align="center" prop="deptRoleName" :show-overflow-tooltip="true" />
|
||||||
|
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改参数配置对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="650px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="兼职人员:" prop="orgName" label-width="90px">
|
||||||
|
<el-input v-model="form.orgName" :disabled="true" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="兼职角色:" prop="deptRoleName" label-width="90px">
|
||||||
|
<el-input v-model="form.deptRoleName" :disabled="true" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="兼职人员:" prop="orgName" label-width="90px">
|
||||||
|
<el-input v-model="form.orgName" :disabled="true" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="兼职角色:" prop="deptRoleName" label-width="90px">
|
||||||
|
<el-input v-model="form.deptRoleName" :disabled="true" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="兼职人员:" prop="orgName" label-width="90px">
|
||||||
|
<el-input v-model="form.orgName" :disabled="true" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="兼职角色:" prop="deptRoleName" label-width="90px">
|
||||||
|
<el-input v-model="form.deptRoleName" :disabled="true" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer" align="center">
|
||||||
|
<el-button @click="cancel">关闭</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {getRoleUserList, proDeptRole} from "@/api/process/rolesRemind";
|
||||||
|
import { treeselect as staffTreeselect, roleStaffTreeselect } from "@/api/process/tree";
|
||||||
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Roles",
|
||||||
|
components: {Treeselect},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 字典表格数据
|
||||||
|
typeList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
deptRoleName: undefined,
|
||||||
|
orgName: undefined,
|
||||||
|
userName: undefined,
|
||||||
|
departmentId:"-1"
|
||||||
|
},
|
||||||
|
// 人员列表
|
||||||
|
staffOptions: [],
|
||||||
|
// 默认选中的节点 id 数组
|
||||||
|
defaultCheckedKeys: [],
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
defaultProps: {
|
||||||
|
children: "children",
|
||||||
|
label: "name",
|
||||||
|
disabled: "disabled" // 添加 disabled 属性
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
getRoleUserList(this.queryParams).then(response => {
|
||||||
|
this.typeList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
orgId: undefined,
|
||||||
|
orgName: undefined,
|
||||||
|
departmentId: undefined,
|
||||||
|
deptRoleId: undefined,
|
||||||
|
deptRoleName: undefined,
|
||||||
|
userId: undefined,
|
||||||
|
userName: undefined,
|
||||||
|
reviewerStatus: undefined,
|
||||||
|
reviewerTime: undefined,
|
||||||
|
reviewerUserId: undefined,
|
||||||
|
roleType: undefined,
|
||||||
|
staffOptions:[]
|
||||||
|
};
|
||||||
|
this.defaultCheckedKeys = []; // 重置默认选中的节点
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
/** 分配人员按钮操作 */
|
||||||
|
handleAllocation(row) {
|
||||||
|
this.reset();
|
||||||
|
this.getStaffTreeselect(row);
|
||||||
|
this.form = row;
|
||||||
|
this.open = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 查询员工树结构 */
|
||||||
|
getStaffTreeselect(data) {
|
||||||
|
staffTreeselect(data).then(response => {
|
||||||
|
this.staffOptions = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm: function() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
const checkedKeys = this.getStaffAllCheckedKeys();
|
||||||
|
if (checkedKeys.length === 0) {
|
||||||
|
this.$message.error("请至少选择一个人员");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.form.userId = checkedKeys.join(",");
|
||||||
|
console.log("form",this.form)
|
||||||
|
proDeptRole(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 所有菜单节点数据
|
||||||
|
getStaffAllCheckedKeys() {
|
||||||
|
// 目前被选中的菜单节点
|
||||||
|
let checkedKeys = this.$refs.staff.getCheckedKeys();
|
||||||
|
// 半选中的菜单节点
|
||||||
|
// let halfCheckedKeys = this.$refs.staff.getHalfCheckedKeys();
|
||||||
|
// checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
|
||||||
|
checkedKeys.unshift.apply(checkedKeys);
|
||||||
|
return checkedKeys;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
@ -0,0 +1,236 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
|
||||||
|
<el-form-item label="项目部名称" prop="orgName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.orgName"
|
||||||
|
maxlength="28"
|
||||||
|
placeholder="请输入项目部名称"
|
||||||
|
clearable
|
||||||
|
style="width: 200px"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="人员" prop="userName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.userName"
|
||||||
|
maxlength="28"
|
||||||
|
placeholder="请输入人员名称"
|
||||||
|
clearable
|
||||||
|
style="width: 200px"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="typeList" >
|
||||||
|
<el-table-column label="序号" align="center" width="80" type="index">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="项目部名称" align="center" prop="orgName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="项目经理" align="center" prop="deptRoleName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="安全员" align="center" prop="deptRoleName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="质检员" align="center" prop="orgName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="项目总工" align="center" prop="deptRoleName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="机械员" align="center" prop="deptRoleName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="资料员" align="center" prop="orgName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="施工员" align="center" prop="deptRoleName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="材料员" align="center" prop="deptRoleName" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="其他" align="center" prop="deptRoleName" :show-overflow-tooltip="true" />
|
||||||
|
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改参数配置对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" 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>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {getRoleUserList, proDeptRole} from "@/api/process/rolesRemind";
|
||||||
|
import { treeselect as staffTreeselect, roleStaffTreeselect } from "@/api/process/tree";
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Roles",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 字典表格数据
|
||||||
|
typeList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
deptRoleName: undefined,
|
||||||
|
orgName: undefined,
|
||||||
|
userName: undefined,
|
||||||
|
departmentId:"-1"
|
||||||
|
},
|
||||||
|
// 人员列表
|
||||||
|
staffOptions: [],
|
||||||
|
// 默认选中的节点 id 数组
|
||||||
|
defaultCheckedKeys: [],
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
defaultProps: {
|
||||||
|
children: "children",
|
||||||
|
label: "name",
|
||||||
|
disabled: "disabled" // 添加 disabled 属性
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
getRoleUserList(this.queryParams).then(response => {
|
||||||
|
this.typeList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
orgId: undefined,
|
||||||
|
orgName: undefined,
|
||||||
|
departmentId: undefined,
|
||||||
|
deptRoleId: undefined,
|
||||||
|
deptRoleName: undefined,
|
||||||
|
userId: undefined,
|
||||||
|
userName: undefined,
|
||||||
|
reviewerStatus: undefined,
|
||||||
|
reviewerTime: undefined,
|
||||||
|
reviewerUserId: undefined,
|
||||||
|
roleType: undefined,
|
||||||
|
staffOptions:[]
|
||||||
|
};
|
||||||
|
this.defaultCheckedKeys = []; // 重置默认选中的节点
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
/** 分配人员按钮操作 */
|
||||||
|
handleAllocation(row) {
|
||||||
|
this.reset();
|
||||||
|
this.getStaffTreeselect(row);
|
||||||
|
this.form = row;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "分配人员";
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 查询员工树结构 */
|
||||||
|
getStaffTreeselect(data) {
|
||||||
|
staffTreeselect(data).then(response => {
|
||||||
|
this.staffOptions = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm: function() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
const checkedKeys = this.getStaffAllCheckedKeys();
|
||||||
|
if (checkedKeys.length === 0) {
|
||||||
|
this.$message.error("请至少选择一个人员");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.form.userId = checkedKeys.join(",");
|
||||||
|
console.log("form",this.form)
|
||||||
|
proDeptRole(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 所有菜单节点数据
|
||||||
|
getStaffAllCheckedKeys() {
|
||||||
|
// 目前被选中的菜单节点
|
||||||
|
let checkedKeys = this.$refs.staff.getCheckedKeys();
|
||||||
|
// 半选中的菜单节点
|
||||||
|
// let halfCheckedKeys = this.$refs.staff.getHalfCheckedKeys();
|
||||||
|
// checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
|
||||||
|
checkedKeys.unshift.apply(checkedKeys);
|
||||||
|
return checkedKeys;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
@ -0,0 +1,232 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
|
||||||
|
<el-form-item label="日期">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="dateRange"
|
||||||
|
style="width: 240px"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
type="daterange"
|
||||||
|
range-separator="-"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
:clearable="false"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="部门" prop="orgId">
|
||||||
|
<treeselect v-model="queryParams.orgId" :options="deptOptions" :normalizer="normalizer" placeholder="选择部门"
|
||||||
|
style="width: 240px"/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="姓名" prop="userName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.userName"
|
||||||
|
placeholder="请输入姓名"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="状态筛选" prop="attStatus">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.attStatus"
|
||||||
|
placeholder="状态"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.att_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="typeList">
|
||||||
|
<el-table-column label="序号" align="center" width="80" type="index">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="审批状态" align="center" prop="reviewerStatus"/>
|
||||||
|
<el-table-column label="姓名" align="center" prop="userName"/>
|
||||||
|
<el-table-column label="所属部门" align="center" prop="orgName" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="考勤日期" align="center" prop="attCurrentDay" :show-overflow-tooltip="true">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="上班打卡时间" align="center" prop="toWorkAttCurrentTime" width="180"></el-table-column>
|
||||||
|
<el-table-column label="上班状态" align="center" prop="toWorkAttStatus">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div v-if="scope.row.toWorkAttStatus==0">未打卡</div>
|
||||||
|
<div v-if="scope.row.toWorkAttStatus==1">正常</div>
|
||||||
|
<div style="color: #F1A4AD" v-if="scope.row.toWorkAttStatus==2">迟到</div>
|
||||||
|
<div style="color: #29C9C9" v-if="scope.row.toWorkAttStatus==3">旷工</div>
|
||||||
|
<div v-if="scope.row.toWorkAttStatus==4">早退</div>
|
||||||
|
<div v-if="scope.row.toWorkAttStatus==5">轮休</div>
|
||||||
|
<div style="color: #14ACF0" v-if="scope.row.toWorkAttStatus==6">请假</div>
|
||||||
|
<div v-if="scope.row.toWorkAttStatus==7">临时外出</div>
|
||||||
|
<div style="color: #DD1E36" v-if="scope.row.toWorkAttStatus==8">出入异常</div>
|
||||||
|
<div v-if="scope.row.toWorkAttStatus==9">打卡地异常</div>
|
||||||
|
<div v-if="scope.row.toWorkAttStatus==10">出差</div>
|
||||||
|
<div v-if="scope.row.toWorkAttStatus==11">法定节假日</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="打卡地址" align="center" prop="toWorkAttAddress" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="修改后时间" align="center" prop="toWorkErrorRemake" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="修改后状态" align="center" prop="toWorkErrorRemake" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="下班打卡时间" align="center" prop="offWorkAttCurrentTime" width="180"></el-table-column>
|
||||||
|
<el-table-column label="下班状态" align="center" prop="offWorkAttStatus">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div v-if="scope.row.offWorkAttStatus==0">未打卡</div>
|
||||||
|
<div v-if="scope.row.offWorkAttStatus==1">正常</div>
|
||||||
|
<div style="color: #F1A4AD" v-if="scope.row.offWorkAttStatus==2">迟到</div>
|
||||||
|
<div style="color: #29C9C9" v-if="scope.row.offWorkAttStatus==3">旷工</div>
|
||||||
|
<div v-if="scope.row.offWorkAttStatus==4">早退</div>
|
||||||
|
<div v-if="scope.row.offWorkAttStatus==5">轮休</div>
|
||||||
|
<div style="color: #14ACF0" v-if="scope.row.offWorkAttStatus==6">请假</div>
|
||||||
|
<div v-if="scope.row.offWorkAttStatus==7">临时外出</div>
|
||||||
|
<div style="color: #DD1E36" v-if="scope.row.offWorkAttStatus==8">出入异常</div>
|
||||||
|
<div v-if="scope.row.offWorkAttStatus==9">打卡地异常</div>
|
||||||
|
<div v-if="scope.row.offWorkAttStatus==10">出差</div>
|
||||||
|
<div v-if="scope.row.offWorkAttStatus==11">法定节假日</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<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-column label="修改后状态" align="center" prop="offWorkErrorRemake" :show-overflow-tooltip="true"/>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {listType, getType, delType, addType, updateType, refreshCache} from "@/api/system/dict/type";
|
||||||
|
import {getDetailsRecordList} from "@/api/report/attReport";
|
||||||
|
import {listDept} from "@/api/system/dept";
|
||||||
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Dict",
|
||||||
|
dicts: ['att_status'],
|
||||||
|
components: {Treeselect},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 字典表格数据
|
||||||
|
typeList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 日期范围
|
||||||
|
dateRange: this.getDefaultDateRange(),
|
||||||
|
deptOptions: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
userName: undefined,
|
||||||
|
orgId: undefined,
|
||||||
|
attStatus: undefined
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
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];
|
||||||
|
},
|
||||||
|
getDeptList() {
|
||||||
|
listDept().then(response => {
|
||||||
|
this.deptOptions = this.handleTree(response.data, "id");
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 转换部门数据结构 */
|
||||||
|
normalizer(node) {
|
||||||
|
if (node.children && !node.children.length) {
|
||||||
|
delete node.children;
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
id: node.id,
|
||||||
|
label: node.orgName,
|
||||||
|
children: node.children
|
||||||
|
};
|
||||||
|
},
|
||||||
|
/** 查询字典类型列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
console.log(this.dateRange)
|
||||||
|
if (this.dateRange && this.dateRange.length > 0) {
|
||||||
|
this.queryParams.startDate = this.dateRange[0]
|
||||||
|
this.queryParams.endDate = this.dateRange[1]
|
||||||
|
} else {
|
||||||
|
this.queryParams.startDate = undefined
|
||||||
|
this.queryParams.endDate = undefined
|
||||||
|
}
|
||||||
|
getDetailsRecordList(this.queryParams).then(response => {
|
||||||
|
this.typeList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.dateRange = [];
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('system/dict/type/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `type_${new Date().getTime()}.xlsx`)
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
Loading…
Reference in New Issue