This commit is contained in:
zzyuan 2024-10-18 09:39:21 +08:00
commit ace9369dc9
8 changed files with 203 additions and 56 deletions

View File

@ -72,8 +72,8 @@ export default {
return {
codeUrl: "",
loginForm: {
username: "admin",
password: "admin123",
username: "15240004260",
password: "YNsbd@123456",
rememberMe: false,
code: "",
uuid: ""

View File

@ -35,7 +35,7 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['dept:org:add']"
>新增
</el-button>
</el-col>
@ -46,6 +46,7 @@
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['dept:org:export']"
>导出
</el-button>
</el-col>
@ -56,6 +57,7 @@
icon="el-icon-s-custom"
size="mini"
@click="allocation"
v-hasPermi="['dept:org:all']"
>权限分配
</el-button>
</el-col>
@ -91,6 +93,7 @@
type="text"
icon="el-icon-search"
@click="detailsUpdate(scope.row)"
v-hasPermi="['dept:org:query']"
>详情
</el-button>
<el-button
@ -99,6 +102,7 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-if="scope.row.reviewerStatus != 1 "
v-hasPermi="['dept:org:query']"
>修改
</el-button>
<el-button
@ -107,6 +111,7 @@
icon="el-icon-refresh-left"
@click="handleWithdraw(scope.row)"
v-if="scope.row.reviewerStatus == 0"
v-hasPermi="['dept:org:edit']"
>撤回
</el-button>
<el-button
@ -115,6 +120,7 @@
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-if="scope.row.reviewerStatus == 3 "
v-hasPermi="['dept:org:remove']"
>删除
</el-button>
</template>
@ -148,17 +154,29 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="部门负责人" prop="orgHeadUserId">
<treeselect v-model="form.orgHeadUserId" :flat="true" :options="personOptions" :normalizer="normalizer2"
placeholder="选择部门负责人" @select="handleSelect1"/>
<el-form-item label="部门负责人" prop="orgHeadUserIdList">
<el-select v-model="form.orgHeadUserIdList" multiple placeholder="部门负责人" clearable style="width: 100%;">
<el-option
v-for="item in personOptions"
:key="item.userIds"
:label="item.userName"
:value="item.userIds"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="考勤员" prop="attendanceUserId">
<treeselect v-model="form.attendanceUserId" :flat="true" :options="personOptions"
:normalizer="normalizer2" placeholder="选择考勤员" @select="handleSelect2"/>
<el-select v-model="form.attendanceUserId" placeholder="考勤员" clearable style="width: 100%;">
<el-option
v-for="item in personOptions"
:key="item.userIds"
:label="item.userName"
:value="item.userIds"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
@ -285,6 +303,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import {treeselect as staffTreeselect} from "@/api/process/tree";
import {exportSubOrg} from "@/api/process/branchProExamine";
import {downloadFile} from "@/utils/download";
import {getPersonSelect} from "@/api/system/userInfo";
export default {
name: "BranchPro",
@ -321,7 +340,7 @@ export default {
orgName: [
{required: true, message: "部门名称不能为空", trigger: "blur"}
],
orgHeadUserId: [
orgHeadUserIdList: [
{required: true, message: "部门负责人不能为空", trigger: "blur"}
],
attendanceUserId: [
@ -414,10 +433,17 @@ export default {
oldOrgName: [],
};
},
created() {
mounted() {
this.getList();
this.getPersonSelect();
},
methods: {
/** 人员选择下拉 */
getPersonSelect() {
getPersonSelect().then(response => {
this.personOptions=response.data
});
},
/** 查询列表 */
getList() {
this.loading = true;
@ -442,6 +468,7 @@ export default {
attendanceUserId: undefined,
attendanceUserName: undefined,
orgHeadUserId: undefined,
orgHeadUserIdList: [],
orgHeadUserName: undefined,
province: undefined,
isProvince: "1",
@ -479,12 +506,7 @@ export default {
await listDept().then(response => {
this.deptOptions = this.handleTree(response.data, "id");
});
/**
* 项目部负责人
*/
await orgPersonSelect().then(response => {
this.personOptions = this.changeData(response.data);
});
/** 人员 */
this.getStaffTreeselect("-1", "1", "", "manager");
@ -526,14 +548,18 @@ export default {
this.form = response.data;
this.oldOrgName = row.orgName
if(!this.form.parentId){
this.form.parentId=0
}
if(this.form.orgHeadUserId!=null){
let arr = this.form.orgHeadUserId.split(',')
this.$set(this.form,"orgHeadUserIdList",arr)
}
listDept().then(response => {
this.deptOptions = this.handleTree(response.data, "id");
});
orgPersonSelect().then(response => {
this.personOptions = this.changeData(response.data);
});
/** 人员 */
this.getStaffTreeselect(ids, "1", "", "manager");
this.getStaffTreeselect(ids, "2", "", "safety");
@ -592,12 +618,16 @@ export default {
const ids = row.id
getType(ids).then(response => {
this.form = response.data;
if(!this.form.parentId){
this.form.parentId=0
}
if(this.form.orgHeadUserId!=null){
let arr = this.form.orgHeadUserId.split(',')
this.$set(this.form,"orgHeadUserIdList",arr)
}
listDept().then(response => {
this.deptOptions = this.handleTree(response.data, "id");
});
orgPersonSelect().then(response => {
this.personOptions = this.changeData(response.data);
});
/** 人员 */
this.getStaffTreeselect(ids, "1", "", "manager");
@ -653,6 +683,7 @@ export default {
this.$refs["form"].validate(valid => {
console.log(this.form);
if (valid) {
this.form.orgHeadUserId=this.form.orgHeadUserIdList.join(',');
let managerIds = this.form.managerId;
let safetyIds = this.form.safetyId;

View File

@ -41,6 +41,7 @@
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['dept:org:export']"
>导出
</el-button>
</el-form-item>
@ -77,6 +78,7 @@
type="text"
icon="el-icon-search"
@click="detailsUpdate(scope.row)"
v-hasPermi="['dept:org:query']"
>详情
</el-button>
<el-button
@ -84,6 +86,7 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['dept:org:edit']"
>审核
</el-button>
</template>
@ -117,16 +120,28 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="部门负责人" prop="orgHeadUserId">
<treeselect v-model="form.orgHeadUserId" :flat="true" :options="personOptions" :normalizer="normalizer2"
placeholder="选择部门负责人" @select="handleSelect1" :disabled="true"/>
<el-form-item label="部门负责人" prop="orgHeadUserIdList">
<el-select v-model="form.orgHeadUserIdList" multiple placeholder="部门负责人" clearable style="width: 100%;">
<el-option
v-for="item in personOptions"
:key="item.userIds"
:label="item.userName"
:value="item.userIds"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="考勤员" prop="attendanceUserId">
<treeselect v-model="form.attendanceUserId" :flat="true" :options="personOptions"
:normalizer="normalizer2" placeholder="选择考勤员" :disabled="true"/>
<el-select v-model="form.attendanceUserId" placeholder="考勤员" clearable style="width: 100%;">
<el-option
v-for="item in personOptions"
:key="item.userIds"
:label="item.userName"
:value="item.userIds"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
@ -253,6 +268,7 @@ import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import {treeselect as staffTreeselect} from "@/api/process/tree";
import {downloadFile} from "@/utils/download";
import {getPersonSelect} from "@/api/system/userInfo";
export default {
name: "BranchPro",
@ -291,7 +307,7 @@ export default {
orgName: [
{required: true, message: "部门名称不能为空", trigger: "blur"}
],
orgHeadUserId: [
orgHeadUserIdList: [
{required: true, message: "部门负责人不能为空", trigger: "blur"}
],
attendanceUserId: [
@ -386,8 +402,17 @@ export default {
this.queryParams.applyName=this.$route.query.param
}
this.getList();
this.getPersonSelect();
},
methods: {
/** 人员选择下拉 */
getPersonSelect() {
getPersonSelect().then(response => {
this.personOptions=response.data
});
},
/** 查询列表 */
getList() {
this.loading = true;
@ -412,6 +437,7 @@ export default {
attendanceUserId: undefined,
attendanceUserName: undefined,
orgHeadUserId: undefined,
orgHeadUserIdList: [],
orgHeadUserName: undefined,
province: undefined,
applyName: undefined,
@ -463,17 +489,18 @@ export default {
await getType(ids).then(response => {
this.form = response.data;
if(!this.form.parentId){
this.form.parentId=0
}
if(this.form.orgHeadUserId!=null){
let arr = this.form.orgHeadUserId.split(',')
this.$set(this.form,"orgHeadUserIdList",arr)
}
listDept().then(response => {
this.deptOptions = this.handleTree(response.data, "id");
});
/**
* 项目部负责人
*/
orgPersonSelect().then(response => {
this.personOptions = this.changeData(response.data);
});
/** 人员 */
this.getStaffTreeselect(ids, "1", "", "manager");
this.getStaffTreeselect(ids, "2", "", "safety");
@ -530,17 +557,17 @@ export default {
const ids = row.id
getType(ids).then(response => {
this.form = response.data;
if(!this.form.parentId){
this.form.parentId=0
}
if(this.form.orgHeadUserId!=null){
let arr = this.form.orgHeadUserId.split(',')
this.$set(this.form,"orgHeadUserIdList",arr)
}
listDept().then(response => {
this.deptOptions = this.handleTree(response.data, "id");
});
/**
* 项目部负责人
*/
orgPersonSelect().then(response => {
this.personOptions = this.changeData(response.data);
});
/** 人员 */
this.getStaffTreeselect(ids, "1", "", "manager");
this.getStaffTreeselect(ids, "2", "", "safety");

View File

@ -72,7 +72,7 @@
<template slot-scope="scope">
<div v-if="scope.row.mechanicalStaff === '兼职'"
style="color: #1890FF; cursor: pointer"
@click="handleAllocation(scope.row,5)">
@click="handleAllocation(scope.row,5)" v-hasPermi="['dept:eight:query']">
{{ scope.row.mechanicalStaff }}
</div>
<span v-else>{{ scope.row.mechanicalStaff }}</span>

View File

@ -66,7 +66,7 @@
icon="el-icon-edit"
v-if="scope.row.reviewerStatus == null"
@click="handleAllocation(scope.row)"
v-hasPermi="['dept:role:edit']"
>分配人员
</el-button>
<el-button
@ -75,7 +75,7 @@
icon="el-icon-edit"
v-if="scope.row.reviewerStatus == 1 || scope.row.reviewerStatus == 2"
@click="handleChange(scope.row)"
v-hasPermi="['dept:role:edit']"
>人员变更
</el-button>
</template>

View File

@ -65,6 +65,7 @@
type="text"
icon="el-icon-edit"
@click="handleAllocation(scope.row)"
v-hasPermi="['dept:check:edit']"
>审核</el-button>
</template>
</el-table-column>

View File

@ -58,6 +58,7 @@
icon="el-icon-edit"
v-if="scope.row.reviewerStatus == null"
@click="handleAllocation(scope.row)"
v-hasPermi="['dept:role:edit']"
>分配人员</el-button>
</template>
</el-table-column>

View File

@ -49,7 +49,7 @@
<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-button type="success" icon="el-icon-s-check" size="mini" @click="openDialog">批量审批</el-button>
<el-button type="success" icon="el-icon-s-check" size="mini" @click="openDialog" v-hasPermi="['att:attDetailsUpdate:exam']">批量审批</el-button>
</el-form-item>
</el-form>
@ -90,8 +90,29 @@
</el-table-column>
<el-table-column label="打卡地址" align="center" prop="toWorkAttAddress" :show-overflow-tooltip="true"/>
<el-table-column label="修改后时间" align="center" prop="toWorkErrorRemakes" :show-overflow-tooltip="true"/>
<el-table-column label="修改后状态" align="center" prop="toWorkErrorRemakes" :show-overflow-tooltip="true"/>
<el-table-column label="修改后时间" align="center" prop="toWorkUpdateAttCurrentTime" :show-overflow-tooltip="true"/>
<el-table-column label="修改后状态" align="center" prop="toWorkUpdateAttStatus" :show-overflow-tooltip="true">
<template slot-scope="scope">
<div v-if="scope.row.toWorkUpdateAttStatus==0" @click="reasonDialog(scope.row.toErrorRemake)">未打卡</div>
<div v-if="scope.row.toWorkUpdateAttStatus==1" @click="reasonDialog(scope.row.toErrorRemake)">正常</div>
<div style="color: #F1A4AD" v-if="scope.row.toWorkUpdateAttStatus==2" @click="reasonDialog(scope.row.toErrorRemake)">迟到</div>
<div style="color: #29C9C9" v-if="scope.row.toWorkUpdateAttStatus==3" @click="reasonDialog(scope.row.toErrorRemake)">旷工</div>
<div v-if="scope.row.toWorkUpdateAttStatus==4" @click="reasonDialog(scope.row.toErrorRemake)">早退</div>
<div v-if="scope.row.toWorkUpdateAttStatus==5" @click="reasonDialog(scope.row.toErrorRemake)">轮休</div>
<div style="color: #14ACF0" v-if="scope.row.toWorkUpdateAttStatus==6" @click="reasonDialog(scope.row.toErrorRemake)">请假</div>
<div v-if="scope.row.toWorkUpdateAttStatus==7" @click="reasonDialog(scope.row.toErrorRemake)">临时外出</div>
<div style="color: #DD1E36" v-if="scope.row.toWorkUpdateAttStatus==8" @click="reasonDialog(scope.row.toErrorRemake)">出入异常</div>
<div v-if="scope.row.toWorkUpdateAttStatus==9" @click="reasonDialog(scope.row.toErrorRemake)">打卡地异常</div>
<div v-if="scope.row.toWorkUpdateAttStatus==10" @click="reasonDialog(scope.row.toErrorRemake)">出差</div>
<div v-if="scope.row.toWorkUpdateAttStatus==11" @click="reasonDialog(scope.row.toErrorRemake)">法定节假日</div>
</template>
</el-table-column>
<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">
@ -110,8 +131,23 @@
</template>
</el-table-column>
<el-table-column label="打卡地址" align="center" prop="offWorkAttAddress" :show-overflow-tooltip="true"/>
<el-table-column label="修改后时间" align="center" prop="offWorkErrorRemakes" :show-overflow-tooltip="true"/>
<el-table-column label="修改后状态" align="center" prop="offWorkErrorRemakes" :show-overflow-tooltip="true"/>
<el-table-column label="修改后时间" align="center" prop="offWorkUpdateAttCurrentTime" :show-overflow-tooltip="true"/>
<el-table-column label="修改后状态" align="center" prop="offWorkUpdateAttStatus" :show-overflow-tooltip="true">
<template slot-scope="scope">
<div v-if="scope.row.offWorkUpdateAttStatus==0" @click="reasonDialog(scope.row.offErrorRemake)">未打卡</div>
<div v-if="scope.row.offWorkUpdateAttStatus==1" @click="reasonDialog(scope.row.offErrorRemake)">正常</div>
<div style="color: #F1A4AD" v-if="scope.row.offWorkUpdateAttStatus==2" @click="reasonDialog(scope.row.offErrorRemake)">迟到</div>
<div style="color: #29C9C9" v-if="scope.row.offWorkUpdateAttStatus==3" @click="reasonDialog(scope.row.offErrorRemake)">旷工</div>
<div v-if="scope.row.offWorkUpdateAttStatus==4" @click="reasonDialog(scope.row.offErrorRemake)">早退</div>
<div v-if="scope.row.offWorkUpdateAttStatus==5" @click="reasonDialog(scope.row.offErrorRemake)">轮休</div>
<div style="color: #14ACF0" v-if="scope.row.offWorkUpdateAttStatus==6" @click="reasonDialog(scope.row.offErrorRemake)">请假</div>
<div v-if="scope.row.offWorkUpdateAttStatus==7" @click="reasonDialog(scope.row.offErrorRemake)">临时外出</div>
<div style="color: #DD1E36" v-if="scope.row.offWorkUpdateAttStatus==8" @click="reasonDialog(scope.row.offErrorRemake)">出入异常</div>
<div v-if="scope.row.offWorkUpdateAttStatus==9" @click="reasonDialog(scope.row.offErrorRemake)">打卡地异常</div>
<div v-if="scope.row.offWorkUpdateAttStatus==10" @click="reasonDialog(scope.row.offErrorRemake)">出差</div>
<div v-if="scope.row.offWorkUpdateAttStatus==11" @click="reasonDialog(scope.row.offErrorRemake)">法定节假日</div>
</template>
</el-table-column>
</el-table>
<pagination
@ -147,8 +183,23 @@
</el-table-column>
<el-table-column label="打卡地址" align="center" prop="toWorkAttAddress" :show-overflow-tooltip="true" width="150"/>
<el-table-column label="修改后时间" align="center" prop="toWorkErrorRemakes" :show-overflow-tooltip="true" width="150"/>
<el-table-column label="修改后状态" align="center" prop="toWorkErrorRemakes" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="修改后时间" align="center" prop="toWorkUpdateAttCurrentTime" :show-overflow-tooltip="true" width="150"/>
<el-table-column label="修改后状态" align="center" prop="toWorkUpdateAttStatus" :show-overflow-tooltip="true" width="120">
<template slot-scope="scope">
<div v-if="scope.row.toWorkUpdateAttStatus==0" @click="reasonDialog(scope.row.toErrorRemake)">未打卡</div>
<div v-if="scope.row.toWorkUpdateAttStatus==1" @click="reasonDialog(scope.row.toErrorRemake)">正常</div>
<div style="color: #F1A4AD" v-if="scope.row.toWorkUpdateAttStatus==2" @click="reasonDialog(scope.row.toErrorRemake)">迟到</div>
<div style="color: #29C9C9" v-if="scope.row.toWorkUpdateAttStatus==3" @click="reasonDialog(scope.row.toErrorRemake)">旷工</div>
<div v-if="scope.row.toWorkUpdateAttStatus==4" @click="reasonDialog(scope.row.toErrorRemake)">早退</div>
<div v-if="scope.row.toWorkUpdateAttStatus==5" @click="reasonDialog(scope.row.toErrorRemake)">轮休</div>
<div style="color: #14ACF0" v-if="scope.row.toWorkUpdateAttStatus==6" @click="reasonDialog(scope.row.toErrorRemake)">请假</div>
<div v-if="scope.row.toWorkUpdateAttStatus==7" @click="reasonDialog(scope.row.toErrorRemake)">临时外出</div>
<div style="color: #DD1E36" v-if="scope.row.toWorkUpdateAttStatus==8" @click="reasonDialog(scope.row.toErrorRemake)">出入异常</div>
<div v-if="scope.row.toWorkUpdateAttStatus==9" @click="reasonDialog(scope.row.toErrorRemake)">打卡地异常</div>
<div v-if="scope.row.toWorkUpdateAttStatus==10" @click="reasonDialog(scope.row.toErrorRemake)">出差</div>
<div v-if="scope.row.toWorkUpdateAttStatus==11" @click="reasonDialog(scope.row.toErrorRemake)">法定节假日</div>
</template>
</el-table-column>
<el-table-column label="下班打卡时间" align="center" prop="offWorkAttCurrentTime" width="150"></el-table-column>
<el-table-column label="下班状态" align="center" prop="offWorkAttStatus" width="120">
<template slot-scope="scope">
@ -167,8 +218,23 @@
</template>
</el-table-column>
<el-table-column label="打卡地址" align="center" prop="offWorkAttAddress" :show-overflow-tooltip="true" width="150"/>
<el-table-column label="修改后时间" align="center" prop="offWorkErrorRemakes" :show-overflow-tooltip="true" width="150"/>
<el-table-column label="修改后状态" align="center" prop="offWorkErrorRemakes" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="修改后时间" align="center" prop="offWorkUpdateAttCurrentTime" :show-overflow-tooltip="true" width="150"/>
<el-table-column label="修改后状态" align="center" prop="offWorkUpdateAttStatus" :show-overflow-tooltip="true" width="120">
<template slot-scope="scope">
<div v-if="scope.row.offWorkUpdateAttStatus==0" @click="reasonDialog(scope.row.offErrorRemake)">未打卡</div>
<div v-if="scope.row.offWorkUpdateAttStatus==1" @click="reasonDialog(scope.row.offErrorRemake)">正常</div>
<div style="color: #F1A4AD" v-if="scope.row.offWorkUpdateAttStatus==2" @click="reasonDialog(scope.row.offErrorRemake)">迟到</div>
<div style="color: #29C9C9" v-if="scope.row.offWorkUpdateAttStatus==3" @click="reasonDialog(scope.row.offErrorRemake)">旷工</div>
<div v-if="scope.row.offWorkUpdateAttStatus==4" @click="reasonDialog(scope.row.offErrorRemake)">早退</div>
<div v-if="scope.row.offWorkUpdateAttStatus==5" @click="reasonDialog(scope.row.offErrorRemake)">轮休</div>
<div style="color: #14ACF0" v-if="scope.row.offWorkUpdateAttStatus==6" @click="reasonDialog(scope.row.offErrorRemake)">请假</div>
<div v-if="scope.row.offWorkUpdateAttStatus==7" @click="reasonDialog(scope.row.offErrorRemake)">临时外出</div>
<div style="color: #DD1E36" v-if="scope.row.offWorkUpdateAttStatus==8" @click="reasonDialog(scope.row.offErrorRemake)">出入异常</div>
<div v-if="scope.row.offWorkUpdateAttStatus==9" @click="reasonDialog(scope.row.offErrorRemake)">打卡地异常</div>
<div v-if="scope.row.offWorkUpdateAttStatus==10" @click="reasonDialog(scope.row.offErrorRemake)">出差</div>
<div v-if="scope.row.offWorkUpdateAttStatus==11" @click="reasonDialog(scope.row.offErrorRemake)">法定节假日</div>
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitEdit"> </el-button>
@ -176,6 +242,18 @@
</div>
</el-dialog>
<!-- 添加或修改参数配置对话框 -->
<el-dialog :title="title" :visible.sync="openReason" width="500px" append-to-body>
<el-form ref="form" :model="reasonStr" label-width="500px">
<el-col :span="24">
<el-input type="textarea" :autosize="{minRows:3,maxRows:4}" :value="reasonStr" :disabled="true" />
</el-col>
</el-form>
<div style="margin-top: 65px" slot="footer" class="dialog-footer" align="center">
<el-button @click="cancelRecord">取消</el-button>
</div>
</el-dialog>
</div>
</template>
@ -210,9 +288,11 @@ export default {
title: "",
//
open: false,
openReason: false,
dialogList:[],
//
dateRange: this.getDefaultDateRange(),
reasonStr:undefined,
deptOptions: [],
//
queryParams: {
@ -280,7 +360,6 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},
@ -350,6 +429,14 @@ export default {
}
});
},
reasonDialog(reason){
this.reasonStr=reason
this.openReason = true;
this.title="原因说明";
},
cancelRecord(){
this.openReason = false;
},
/** 导出按钮操作 */
handleExport() {
this.download('system/dict/type/export', {