fix: BUG修改

This commit is contained in:
kun 2024-04-12 19:48:09 +08:00
parent 45aaf7d055
commit 6a317bc7cf
8 changed files with 1930 additions and 1295 deletions

View File

@ -41,6 +41,7 @@ export const getCarPassRecordListApi = data => post('xmgl/carPassRecord/getCarPa
export const getCarPassRecordListByPageApi = data => post('xmgl/carPassRecord/list', data);//分页列表查询车辆通行记录信息
export const pullCarDataApi = data => post('xmgl/hikvision/getCrossRecords', data);//同步车辆通行数据

View File

@ -21,6 +21,8 @@ export const updateWorkerExit = data => post('xmgl/workerInfo/updateWorkerExit',
export const updateWorkerTeam = data => post('xmgl/workerInfo/updateWorkerTeam', data); //人员批量移动
export const deleteWorkerInfo = data => post('xmgl/workerInfo/delete', data); //删除 人员 信息
export const sendBatchWokerApi = data => post('xmgl/ufaceDev/sendBatchWokerDev', data); // 下发通行人员
export const pullMemberDataApi = data => post('xmgl/hikvision/getDoorEvents', data); // 拉取人员通行数据
//详情
export const getWorkerInfoData = data => post('xmgl/workerInfo/viewWorkerInfoDetail', data); //获取 人员 详细所有信息
export const addContractApi = data => post('xmgl/workerContract/add', data); //新增合同信息

View File

@ -42,6 +42,12 @@
<el-form-item>
<el-button type="primary" plain @click="onSubmit">{{$t('message.deviceManage.query')}}</el-button>
<el-button
size="medium"
@click="updatePassData()"
type="primary"
>同步车辆通行数据</el-button
>
</el-form-item>
</el-form>
</div>
@ -97,16 +103,74 @@
></el-pagination>
</div>
<!-- </vue-scroll> -->
<!-- 拉取车辆通行数据弹框 -->
<el-dialog
:modal-append-to-body="false"
:close-on-click-modal="false"
:visible.sync="dataImportDialog"
width="800px"
>
<div class="title-set" slot="title">
<div class="line"></div>
<span>同步车辆通行数据</span>
<div class="question-icon" @mouseover="tipShow = true" @mouseout="tipShow = false">?</div>
<div class="tip-text" v-if="tipShow">此处可同步海康ISC平台的通行数据</div>
</div>
<div class="dialog-content">
<div class="form-content">
<el-form
label-width="230px"
size="medium"
style="width: 80%;margin: 0 auto;"
>
<el-form-item
prop="afternoonStartTime"
label="选择需要手动拉取数据的时间段:"
>
<el-date-picker
v-model="timeRange"
type="datetimerange"
:range-separator="$t('message.laborMange.to')"
:start-placeholder="$t('message.laborMange.startDate')"
:end-placeholder="$t('message.laborMange.dateClosed')"
value-format="yyyy-MM-dd hh:mm:ss"
>
</el-date-picker>
</el-form-item>
</el-form>
</div>
<div class="dialog-footer">
<el-button
class="cancleBtn"
@click="dataImportDialog = false"
icon="el-icon-circle-close"
size="medium"
>{{ $t("message.laborMange.cancel") }}</el-button
>
<el-button
type="primary"
icon="el-icon-circle-check"
@click="confirmPullData"
size="medium"
>确认拉取</el-button
>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import {
getCarPassRecordListByPageApi,
pullCarDataApi
} from "@/assets/js/api/carManage";
export default {
name: "historyData",
data() {
return {
dataImportDialog: false,
tipShow: false,
timeRange: [],
isBlack: '',
carTypeList:[{
value: '1',
@ -140,6 +204,32 @@ export default {
this.onSubmit();
},
methods: {
//
confirmPullData(){
if(!this.timeRange || this.timeRange.length == 0){
this.$message.error("请先选择时间段");
return;
}
let reqeustData = {
projectSn: this.projectSn,
startTime: this.timeRange[0],
endTime: this.timeRange[1]
}
pullCarDataApi(reqeustData).then((res) => {
if (res.code == 200) {
this.$message({
message: res.message,
type: "success",
});
this.dataImportDialog = false;
}
});
},
//
updatePassData(){
this.timeRange = [];
this.dataImportDialog = true;
},
// YYYY-MM-DD HH:mm:ss
selectNowDate(){
var date = new Date(),
@ -204,5 +294,32 @@ export default {
};
</script>
<style lang="less" scoped>
//
.title-set {
display: flex;
align-items: center;
.line {
width: 0px;
height: 15px;
border-radius: 3px;
border: 2px solid #5c81ee;
margin-right: 10px;
}
>span{
margin-right: 5px;
}
.question-icon{
border: 1px solid #676C7C;
border-radius: 50%;
width: 10px;
height: 10px;
text-align: center;
line-height: 10px;
font-size: 12px;
}
.tip-text{
font-size: 14px;
margin-left: 5px;
}
}
</style>

View File

@ -8,7 +8,8 @@
size="medium"
>
<el-form-item :label="$t('message.laborMange.personnelType')">
<el-select style="width:120px"
<el-select
style="width:120px"
v-model="formInline.personType"
:placeholder="$t('message.laborMange.pleasePersonnelType')"
>
@ -28,53 +29,70 @@
</el-select>
</el-form-item>
<el-form-item :label="$t('message.laborMange.companies')">
<el-select filterable :clearable="true"
<el-select
filterable
:clearable="true"
v-model="formInline.enterpriseId"
:placeholder="$t('message.laborMange.pleaseChoose')" @change="changeCompany"
:placeholder="$t('message.laborMange.pleaseChoose')"
@change="changeCompany"
>
<el-option
:label="item.enterpriseName"
:value="item.id" v-for="item in enterpriseListData" :key="item.id"
:value="item.id"
v-for="item in enterpriseListData"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('message.laborMange.belongsToTeam')">
<el-select filterable :clearable="true"
<el-select
filterable
:clearable="true"
v-model="formInline.teamId"
:placeholder="$t('message.laborMange.pleaseChoose')"
>
<el-option
:label="item.teamName"
:value="item.id" v-for="item in teamListData" :key="item.id"
:value="item.id"
v-for="item in teamListData"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('message.laborMange.department')">
<el-select filterable :clearable="true"
<el-select
filterable
:clearable="true"
v-model="formInline.departmentId"
:placeholder="$t('message.laborMange.pleaseChoose')"
>
<el-option
:label="item.departmentName"
:value="item.id" v-for="item in departmentListData" :key="item.id"
:value="item.id"
v-for="item in departmentListData"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('message.laborMange.workingState')">
<el-select filterable
<el-select
filterable
v-model="formInline.inserviceType"
:placeholder="$t('message.laborMange.pleaseChoose')"
>
<el-option
:label="item.name"
:value="item.id" v-for="item in inserviceTypeOptions" :key="item.id"
:value="item.id"
v-for="item in inserviceTypeOptions"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('message.laborMange.month') + ':'">
<el-date-picker style="width:120px"
<el-date-picker
style="width:120px"
value-format="yyyy-MM"
v-model="formInline.monthTime"
type="month"
@ -91,20 +109,46 @@
<el-form-item>
<el-button
type="primary"
@click="page=1; getListData()"
@click="
page = 1;
getListData();
"
plain
>{{ $t("message.laborMange.inquire") }}</el-button
>
<el-button type="warning" @click="refresh" plain>{{
$t("message.laborMange.refresh")
}}</el-button>
<el-button
type="warning"
@click="refresh"
plain
>{{ $t("message.laborMange.refresh")}}</el-button
type="primary"
@click="
selectDateType = 1;
exportDialog = true;
"
>{{
$t("message.laborMange.export") +
$t("message.laborMange.detailData")
}}</el-button
>
<el-button type="primary" @click="exportMonthlyData">{{
$t("message.laborMange.export") + $t("message.laborMange.monthData")
}}</el-button>
<el-button
type="primary"
@click="
selectDateType = 2;
exportDialog = true;
"
>{{ $t("message.laborMange.recountData") }}</el-button
>
<el-button type="primary" @click="attendancePrint"
><a :href="printPdf" class="printPdf">{{
$t("message.laborMange.attendPrint")
}}</a></el-button
>
<el-button type="primary" @click="openPullDialog"
>拉取通行数据</el-button
>
<el-button type="primary" @click="selectDateType=1;exportDialog=true" >{{$t("message.laborMange.export")+$t("message.laborMange.detailData")}}</el-button>
<el-button type="primary" @click="exportMonthlyData" >{{$t("message.laborMange.export")+$t("message.laborMange.monthData")}}</el-button>
<el-button type="primary" @click="selectDateType=2;exportDialog=true" >{{$t("message.laborMange.recountData")}}</el-button>
<el-button type="primary" @click="attendancePrint"><a :href="printPdf" class="printPdf">{{$t("message.laborMange.attendPrint")}}</a></el-button>
<!-- <el-button type="primary" @click="importAttendanceData" >导入考勤数据</el-button> -->
</el-form-item>
<!-- <div class="doloadExcel">考勤模板下载</div> -->
@ -262,64 +306,61 @@
></el-table-column>
<el-table-column
prop="temperature"
:label="$t('message.laborMange.temperature')+'(℃)'"
:label="$t('message.laborMange.temperature') + '(℃)'"
align="center"
>
<template slot-scope="scope">
{{scope.row.temperature?scope.row.temperature:'--'}}
</template>
<template slot-scope="scope">
{{ scope.row.temperature ? scope.row.temperature : "--" }}
</template>
</el-table-column>
<el-table-column
:label="$t('message.laborMange.healthCodeStatus')"
align="center"
>
<template slot-scope="scope">
{{healthCodelist[scope.row.healthCode]}}
</template>
<template slot-scope="scope">
{{ healthCodelist[scope.row.healthCode] }}
</template>
</el-table-column>
<el-table-column
prop="nucleicAcidTime"
:label="$t('message.laborMange.nucleicAcidTime')"
align="center"
></el-table-column>
<el-table-column
<el-table-column
:label="$t('message.laborMange.nucleicAcidResults')"
align="center"
>
<template slot-scope="scope">
{{nucleicAcidResultsList[scope.row.nucleicAcidResult]}}
</template>
<template slot-scope="scope">
{{ nucleicAcidResultsList[scope.row.nucleicAcidResult] }}
</template>
</el-table-column>
<el-table-column
prop="vaccinateTime"
:label="$t('message.laborMange.vaccinationTime')"
align="center"
></el-table-column>
<el-table-column
<el-table-column
:label="$t('message.laborMange.vaccinationFrequency')"
align="center"
>
<template slot-scope="scope">
{{vaccinationFrequencyltsList[scope.row.vaccinateState]||'无'}}
</template>
<template slot-scope="scope">
{{
vaccinationFrequencyltsList[scope.row.vaccinateState] || "无"
}}
</template>
</el-table-column>
<el-table-column
prop="passType"
:label="
$t('message.laborMange.enterInto') +
'/' +
$t('message.laborMange.leave')
'/' +
$t('message.laborMange.leave')
"
align="center"
>
@ -388,6 +429,60 @@
</div>
</div>
</vue-scroll>
<!-- 拉取通行数据弹框 -->
<el-dialog
:modal-append-to-body="false"
:close-on-click-modal="false"
:visible.sync="imgImportDialog"
width="800px"
>
<div class="title-set" slot="title">
<div class="line"></div>
<span>同步人员通行数据</span>
<div class="question-icon" @mouseover="tipShow = true" @mouseout="tipShow = false">?</div>
<div class="tip-text" v-if="tipShow">此处可同步海康ISC平台的通行数据</div>
</div>
<div class="dialog-content">
<div class="form-content">
<el-form
label-width="230px"
size="medium"
style="width: 80%;margin: 0 auto;"
>
<el-form-item
prop="afternoonStartTime"
label="选择需要手动拉取数据的时间段:"
>
<el-date-picker
v-model="timeRange"
type="datetimerange"
:range-separator="$t('message.laborMange.to')"
:start-placeholder="$t('message.laborMange.startDate')"
:end-placeholder="$t('message.laborMange.dateClosed')"
value-format="yyyy-MM-dd hh:mm:ss"
>
</el-date-picker>
</el-form-item>
</el-form>
</div>
<div class="dialog-footer">
<el-button
class="cancleBtn"
@click="imgImportDialog = false"
icon="el-icon-circle-close"
size="medium"
>{{ $t("message.laborMange.cancel") }}</el-button
>
<el-button
type="primary"
icon="el-icon-circle-check"
@click="confirmPullData"
size="medium"
>确认拉取</el-button
>
</div>
</div>
</el-dialog>
<!-- 查看大图 -->
<div
v-if="bigImageDialog"
@ -400,43 +495,49 @@
</div>
<!-- 导出 -->
<el-dialog
:modal-append-to-body="false"
:title="selectDateType==1?$t('message.laborMange.hint1'):$t('message.laborMange.hint2')"
:visible.sync="exportDialog"
width="667px">
<div class="dialog_content">
<el-form label-width="90px" size="medium"
class="dialogFormBox">
<el-form-item prop="afternoonStartTime" :label="$t('message.laborMange.timeFrame')">
<el-date-picker
v-model="exportDateArr"
type="daterange"
:range-separator="$t('message.laborMange.to')"
:start-placeholder="$t('message.laborMange.startDate')"
:end-placeholder="$t('message.laborMange.dateClosed')" value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<div class="dialog-footer">
<el-button
class="cancleBtn"
@click="exportDialog = false"
icon="el-icon-circle-close"
size="medium"
>{{$t('message.personnelPosition.cancel')}}
</el-button>
<el-button
type="primary"
icon="el-icon-circle-check"
@click="exportFn"
size="medium"
>{{$t('message.personnelPosition.determine')}}
</el-button>
</div>
</el-form>
</div>
:modal-append-to-body="false"
:title="
selectDateType == 1
? $t('message.laborMange.hint1')
: $t('message.laborMange.hint2')
"
:visible.sync="exportDialog"
width="667px"
>
<div class="dialog_content">
<el-form label-width="90px" size="medium" class="dialogFormBox">
<el-form-item
prop="afternoonStartTime"
:label="$t('message.laborMange.timeFrame')"
>
<el-date-picker
v-model="exportDateArr"
type="daterange"
:range-separator="$t('message.laborMange.to')"
:start-placeholder="$t('message.laborMange.startDate')"
:end-placeholder="$t('message.laborMange.dateClosed')"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</el-form-item>
<div class="dialog-footer">
<el-button
class="cancleBtn"
@click="exportDialog = false"
icon="el-icon-circle-close"
size="medium"
>{{ $t("message.personnelPosition.cancel") }}
</el-button>
<el-button
type="primary"
icon="el-icon-circle-check"
@click="exportFn"
size="medium"
>{{ $t("message.personnelPosition.determine") }}
</el-button>
</div>
</el-form>
</div>
</el-dialog>
</div>
</template>
@ -444,12 +545,15 @@
import scroll from "vue-seamless-scroll";
import {
getPageListData,
getSelectDateilApi,getAfreshMonthAttendanceStatisticsApi,attendFsdApi
getSelectDateilApi,
getAfreshMonthAttendanceStatisticsApi,
attendFsdApi,
} from "@/assets/js/api/attendanceManage";
import {
getDepartmentInfoList,
getTeamInfoList,
getEnterpriseInfoList
getEnterpriseInfoList,
pullMemberDataApi
} from "@/assets/js/api/laborPerson";
export default {
name: "attendanceManage",
@ -458,33 +562,38 @@ export default {
},
data() {
return {
printPdf:"",
nucleicAcidResultsList:{
0:"未知",
1:"阴性",
2:"阳性"
tipShow: false,
timeRange: [],
printPdf: "",
nucleicAcidResultsList: {
0: "未知",
1: "阴性",
2: "阳性",
},
healthCodelist:{
0:"无",
1:"红码",
2:"黄码",
3:"绿码"
healthCodelist: {
0: "无",
1: "红码",
2: "黄码",
3: "绿码",
},
vaccinationFrequencyltsList:{
0:"未接种",
1:"接种一针",
2:"接种两针",
3:"接种三针"
vaccinationFrequencyltsList: {
0: "未接种",
1: "接种一针",
2: "接种两针",
3: "接种三针",
},
exportDialog:false,
exportDateArr:[],
inserviceTypeOptions:[{
name: this.$t('message.laborMange.onJob'),
id: 1
},{
name: this.$t('message.laborMange.dimission'),
id: 2
}],
exportDialog: false,
exportDateArr: [],
inserviceTypeOptions: [
{
name: this.$t("message.laborMange.onJob"),
id: 1,
},
{
name: this.$t("message.laborMange.dimission"),
id: 2,
},
],
fileUrl: "",
page: 1,
pageSize: 10,
@ -493,10 +602,10 @@ export default {
workerName: "",
personType: "",
monthTime: "",
enterpriseId:"",
teamId:"",
departmentId:"",
inserviceType: 1
enterpriseId: "",
teamId: "",
departmentId: "",
inserviceType: 1,
},
projectSn: "",
tableData: [],
@ -507,10 +616,11 @@ export default {
dateilList: [],
showTime: 31,
bigImageDialog: false,
enterpriseListData:[],
teamListData:[],
departmentListData:[],
selectDateType:1,//1 2
enterpriseListData: [],
teamListData: [],
departmentListData: [],
selectDateType: 1, //1 2
imgImportDialog: false,
};
},
created() {
@ -523,39 +633,71 @@ export default {
this.projectSn = this.$store.state.projectSn;
this.getListData();
this.fileUrl = this.$store.state.FILEURL;
this.getCompanyList()
this.getTeamList()
this.getCompanyList();
this.getTeamList();
},
methods: {
//
confirmPullData(){
if(!this.timeRange || this.timeRange.length == 0){
this.$message.error("请先选择时间段");
return;
}
let reqeustData = {
projectSn: this.projectSn,
startTime: this.timeRange[0],
endTime: this.timeRange[1]
}
pullMemberDataApi(reqeustData).then((res) => {
if (res.code == 200) {
this.$message({
message: res.message,
type: "success",
});
this.imgImportDialog = false;
}
});
},
///
openPullDialog() {
this.timeRange = [];
this.imgImportDialog = true;
},
//
attendancePrint(){
console.log('参数',this.formInline)
this.printPdf = this.$http.defaults.baseURL + 'xmgl/workerWagesPayment/attendancePdf?monthTime=' +
this.formInline.monthTime +'&personType=' + this.formInline.personType + '&projectSn=' + this.$store.state.projectSn
+'&enterpriseId='+this.formInline.enterpriseId
+'&teamId='+this.formInline.teamId
attendancePrint() {
console.log("参数", this.formInline);
this.printPdf =
this.$http.defaults.baseURL +
"xmgl/workerWagesPayment/attendancePdf?monthTime=" +
this.formInline.monthTime +
"&personType=" +
this.formInline.personType +
"&projectSn=" +
this.$store.state.projectSn +
"&enterpriseId=" +
this.formInline.enterpriseId +
"&teamId=" +
this.formInline.teamId;
// console.log('', this.printPdf )
},
//
importAttendanceData(){
},
importAttendanceData() {},
//
getCompanyList() {
let data = {
projectSn: this.projectSn,
enterpriseName: '',
userEnterpriseId: this.$store.state.userInfo.userEnterpriseId
enterpriseName: "",
userEnterpriseId: this.$store.state.userInfo.userEnterpriseId,
};
getEnterpriseInfoList(data).then((res) => {
this.enterpriseListData = res.result;
});
},
//
//
getDepartmentList() {
let data = {
enterpriseId:this.formInline.enterpriseId,
enterpriseId: this.formInline.enterpriseId,
projectSn: this.projectSn,
};
getDepartmentInfoList(data).then((res) => {
@ -572,46 +714,82 @@ export default {
this.teamListData = res.result.list;
});
},
changeCompany(){
this.formInline.departmentId=''
this.formInline.teamId=''
this.getDepartmentList()
this.getTeamList()
changeCompany() {
this.formInline.departmentId = "";
this.formInline.teamId = "";
this.getDepartmentList();
this.getTeamList();
},
//
exportFn(){
console.log(this.exportDateArr)
if(!this.exportDateArr||this.exportDateArr.length==0){
this.$message.error(this.$t('message.laborMange.pleaseChoose')+this.$t('message.laborMange.timeFrame'))
return false
exportFn() {
console.log(this.exportDateArr);
if (!this.exportDateArr || this.exportDateArr.length == 0) {
this.$message.error(
this.$t("message.laborMange.pleaseChoose") +
this.$t("message.laborMange.timeFrame")
);
return false;
}
if(this.selectDateType==1){
window.location.href = this.$http.defaults.baseURL + 'xmgl/download/exportExcelWorkerAttendance?projectSn=' + this.projectSn +
'&endTime=' + this.exportDateArr[1] + '&startTime=' + this.exportDateArr[0] + '&personType=' + this.formInline.personType + '&workerName=' + this.formInline.workerName+'&userEnterpriseId='+this.$store.state.userInfo.userEnterpriseId+
'&enterpriseId='+this.formInline.enterpriseId+'&teamId='+this.formInline.teamId+'&departmentId='+this.formInline.departmentId+'&inserviceType='+this.formInline.inserviceType
}else{
if (this.selectDateType == 1) {
window.location.href =
this.$http.defaults.baseURL +
"xmgl/download/exportExcelWorkerAttendance?projectSn=" +
this.projectSn +
"&endTime=" +
this.exportDateArr[1] +
"&startTime=" +
this.exportDateArr[0] +
"&personType=" +
this.formInline.personType +
"&workerName=" +
this.formInline.workerName +
"&userEnterpriseId=" +
this.$store.state.userInfo.userEnterpriseId +
"&enterpriseId=" +
this.formInline.enterpriseId +
"&teamId=" +
this.formInline.teamId +
"&departmentId=" +
this.formInline.departmentId +
"&inserviceType=" +
this.formInline.inserviceType;
} else {
let data = {
userId: this.$store.state.userInfo.userId,
projectSn: this.projectSn,
startTime:this.exportDateArr[0],
endTime:this.exportDateArr[1]
startTime: this.exportDateArr[0],
endTime: this.exportDateArr[1],
};
getAfreshMonthAttendanceStatisticsApi(data).then((res) => {
this.$message.success(this.$t('message.laborMange.hint3'))
this.$message.success(this.$t("message.laborMange.hint3"));
});
}
this.exportDialog=false
this.exportDialog = false;
},
//
exportMonthlyData(){
window.location.href = this.$http.defaults.baseURL + 'xmgl/download/exportExcelMonthWorkerAttendanceStatistics?projectSn=' + this.projectSn +
'&monthTime='+ this.formInline.monthTime + '&personType=' + this.formInline.personType + '&workerName=' + this.formInline.workerName+'&userEnterpriseId='+this.$store.state.userInfo.userEnterpriseId+
'&enterpriseId='+this.formInline.enterpriseId+'&teamId='+this.formInline.teamId+'&departmentId='+this.formInline.departmentId+'&inserviceType='+this.formInline.inserviceType;
exportMonthlyData() {
window.location.href =
this.$http.defaults.baseURL +
"xmgl/download/exportExcelMonthWorkerAttendanceStatistics?projectSn=" +
this.projectSn +
"&monthTime=" +
this.formInline.monthTime +
"&personType=" +
this.formInline.personType +
"&workerName=" +
this.formInline.workerName +
"&userEnterpriseId=" +
this.$store.state.userInfo.userEnterpriseId +
"&enterpriseId=" +
this.formInline.enterpriseId +
"&teamId=" +
this.formInline.teamId +
"&departmentId=" +
this.formInline.departmentId +
"&inserviceType=" +
this.formInline.inserviceType;
},
//
getListData() {
let data = this.formInline;
@ -630,8 +808,8 @@ export default {
}
}
this.showTime = date > 0 ? date : this.showTime;
this.number=0
this.dateilList=[]
this.number = 0;
this.dateilList = [];
}
});
},
@ -660,9 +838,9 @@ export default {
refresh() {
this.formInline.workerName = "";
this.formInline.personType = "";
this.formInline.enterpriseId=''
this.formInline.teamId=''
this.formInline.departmentId=''
this.formInline.enterpriseId = "";
this.formInline.teamId = "";
this.formInline.departmentId = "";
let date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
@ -687,7 +865,7 @@ export default {
};
</script>
<style lang="less" scoped>
.printPdf{
.printPdf {
text-decoration: none;
color: white;
}
@ -735,7 +913,7 @@ export default {
// line-height: 20px;
// border-left: 3px solid #4a8bff;
// }
.pageTitle{
.pageTitle {
margin-left: 20px;
font-size: 15px;
}
@ -806,13 +984,41 @@ export default {
}
}
}
.doloadExcel{
.doloadExcel {
// display: inline-block;
margin-right: 20px;
color: #5181F6;
color: #5181f6;
cursor: pointer;
float: right;
text-decoration: underline;
line-height: 34px;
}
</style>
//
.title-set {
display: flex;
align-items: center;
.line {
width: 0px;
height: 15px;
border-radius: 3px;
border: 2px solid #5c81ee;
margin-right: 10px;
}
>span{
margin-right: 5px;
}
.question-icon{
border: 1px solid #676C7C;
border-radius: 50%;
width: 10px;
height: 10px;
text-align: center;
line-height: 10px;
font-size: 12px;
}
.tip-text{
font-size: 14px;
margin-left: 5px;
}
}
</style>

View File

@ -2,8 +2,15 @@
<div class="fullHeight">
<div class="searchBox whiteBlock">
<el-button size="medium" type="primary" @click="addBefore">{{
$t('message.workType.add')
$t("message.workType.add")
}}</el-button>
<div class="search-box">
<span>是否清零</span>
<el-radio-group v-model="radioVal" @change="changeSelect">
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
</div>
</div>
<div class="table_wrap whiteBlock">
<vue-scroll>
@ -29,7 +36,7 @@
width="15px"
height="15px"
/>
<span>{{ $t('message.workType.edit') }}</span>
<span>{{ $t("message.workType.edit") }}</span>
</div>
<div @click="deleteWorker(scope.row)" class="operationText">
<img
@ -37,7 +44,7 @@
width="15px"
height="15px"
/>
<span>{{ $t('message.workType.delete') }}</span>
<span>{{ $t("message.workType.delete") }}</span>
</div>
</div>
</div>
@ -154,14 +161,14 @@
@click="closeBtn"
icon="el-icon-circle-close"
size="medium"
>{{ $t('message.personnelPosition.cancel') }}
>{{ $t("message.personnelPosition.cancel") }}
</el-button>
<el-button
type="primary"
icon="el-icon-circle-check"
@click="Submit"
size="medium"
>{{ $t('message.personnelPosition.determine') }}
>{{ $t("message.personnelPosition.determine") }}
</el-button>
</div>
</el-form>
@ -176,11 +183,12 @@ import {
workerAttendanceRuleEdit,
workerAttendanceRuleDelete,
} from "@/assets/js/api/laborPerson";
import { getProjectDetail, editProjectInfo } from "@/assets/js/api/baseInfo";
export default {
data() {
return {
title: '',
radioVal: 0,
title: "",
dialogVisible: false,
workerList: [],
workerInfo: {
@ -221,8 +229,32 @@ export default {
},
mounted() {
this.getWorker();
this.getProjectDetailFn();
},
methods: {
//
changeSelect() {
let reqeustData = {
projectSn: this.$store.state.projectSn,
enableWorkerAttendanceZero: this.radioVal,
};
editProjectInfo(reqeustData).then((res) => {
if (res.success) {
this.$message.success("操作成功");
}
});
},
//
getProjectDetailFn() {
let reqeustData = {
projectSn: this.$store.state.projectSn,
};
getProjectDetail(reqeustData).then((res) => {
if (res && res.result) {
this.radioVal = res.result.enableWorkerAttendanceZero;
}
});
},
getWorker() {
workerAttendanceRuleList({ projectSn: this.$store.state.projectSn }).then(
(result) => {
@ -234,7 +266,7 @@ export default {
);
},
addBefore() {
this.title = "新增考勤规则"
this.title = "新增考勤规则";
this.dialogVisible = true;
(this.workerInfo = {
ruleName: "",
@ -252,21 +284,21 @@ export default {
});
},
editBefore(worker) {
this.title = "编辑考勤规则"
this.title = "编辑考勤规则";
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs.form.clearValidate();
});
// console.log('', worker)
this.workerInfo = JSON.parse(JSON.stringify(worker))
this.workerInfo = JSON.parse(JSON.stringify(worker));
},
deleteBefore(worker) { },
deleteBefore(worker) {},
deleteWorker(worker) {
this.$confirm(
this.$t("message.personnelPosition.beaconManage.table.confirmText") +
"【" +
worker.ruleName +
"】?",
"【" +
worker.ruleName +
"】?",
this.$t("message.personnelPosition.beaconManage.table.Tips"),
{
confirmButtonText: this.$t(
@ -289,7 +321,7 @@ export default {
});
this.getWorker();
})
.catch(() => { });
.catch(() => {});
},
closeBtn() {
this.dialogVisible = false;
@ -310,7 +342,7 @@ export default {
workerAttendanceRuleEdit(this.workerInfo).then((result) => {
if (result.success) {
this.getWorker();
this.workerInfo = {}
this.workerInfo = {};
this.dialogVisible = false;
this.$message.success(result.message);
}
@ -329,4 +361,19 @@ export default {
::v-deep .el-input__inner {
line-height: 1px !important;
}
</style>
.flex() {
display: flex;
align-items: center;
}
.search-box {
.flex();
margin-left: 30px;
span {
margin-right: 8px;
font-size: 14px;
}
/deep/.el-radio-group {
margin-top: 2px;
}
}
</style>

View File

@ -2050,23 +2050,53 @@
</div>
</div>
</div>
<!-- 图片裁剪-编辑 -->
<el-dialog
:title="cropperEditTitle"
:modal-append-to-body="false"
:visible.sync="dialogVisible"
width="667px"
width="767px"
>
<div class="dialog_content" style="height: 400px">
<!-- <vue-scroll> -->
<vueCropper
ref="cropperEdit"
:img="cropperEditOption.img"
:outputType="cropperEditOption.outputType"
:autoCropWidth="cropperEditOption.autoCropWidth"
:autoCropHeight="cropperEditOption.autoCropHeight"
:autoCrop="true"
:fixedBox="true"
></vueCropper>
<!-- </vue-scroll> -->
</div>
<div class="dialog-footer">
<el-button
class="cancleBtn"
@click="dialogVisible = false"
icon="el-icon-circle-close"
size="medium"
>{{ $t('message.personnelPosition.cancel') }}
</el-button>
<el-button
type="primary"
icon="el-icon-circle-check"
@click="saveMapUrlEditFn"
size="medium"
>{{ $t('message.personnelPosition.determine') }}
</el-button>
</div>
<!-- title="查看大图" -->
<div style="text-align: center">
<!-- <div style="text-align: center">
<img
style="margin: 0 auto; max-width: 100%"
:src="dialogImageUrl"
alt=""
width="auto"
/>
</div>
</div> -->
</el-dialog>
<!-- 图片裁剪弹框 -->
<!-- 图片裁剪-上传 -->
<el-dialog
:modal-append-to-body="false"
:title="
@ -2189,6 +2219,7 @@ export default {
},
data() {
return {
cropperEditTitle: "",
dateOfIssue: "",
radio: "",
showImgList: false,
@ -2228,6 +2259,12 @@ export default {
dutuiesType: [], //
dutuies: [], //
attendRulesList: [],
cropperEditOption: {
outputType: "png",
img: "",
autoCropWidth: 300, //
autoCropHeight: 360, //
},
cropperOption: {
outputType: "png",
img: "",
@ -2726,6 +2763,45 @@ export default {
}
});
},
//
saveMapUrlEditFn() {
this.$refs.cropperEdit.startCrop();
var _this = this;
this.$refs.cropperEdit.getCropBlob((data) => {
const isLt2M = data.size / 1024 < 500;
if (!isLt2M) {
this.$message.error(this.$t("message.laborMange.hint9"));
return;
}
var param = new FormData();
param.append("files", data, "image.png");
_this.$http
.post("/upload/image", param, {
headers: {
"Content-Type": "multipart/form-data",
},
})
.then((res) => {
console.log("aaaaa", res);
// if (res.data.status == "SUCCESS") {
// // this.checkFace(res.data.data[0].imageUrl)
// if (this.isSzProject == 1) {
// this.checkImgLibrary(res.data.data[0].imageUrl);
// } else {
// this.checkFace(res.data.data[0].imageUrl);
// }
// }
if (res.data.status == "SUCCESS") {
if(this.cropperEditTitle = "现场采集照裁剪"){
this.workerInfo.fieldAcquisitionUrl = res.data.data[0].imageUrl;
} else if(this.cropperEditTitle = "身份证头像裁剪"){
this.workerInfo.idCardBigPhotoUrl = res.data.data[0].imageUrl;
}
this.dialogVisible = false;
}
});
});
},
//
saveMapUrlFn() {
this.$refs.cropper.startCrop();
@ -2822,7 +2898,13 @@ export default {
fileType == "webp" ||
fileType == "jpeg"
) {
this.dialogImageUrl = this.fileUrl + file.url;
// this.dialogImageUrl = this.fileUrl + file.url;
this.cropperEditOption.img = this.fileUrl + file.url;
if(type == 1){
this.cropperEditTitle = "现场采集照裁剪"
} else if(type == 8){
this.cropperEditTitle = "身份证头像裁剪"
}
this.dialogVisible = true;
} else if (name != {}) {
let url = this.$http.defaults.baseURL + 'xmgl/upload/getRenameFile?fileUrl=' + this.fileUrl + itemUrl + '&fileName=' + itemName

View File

@ -99,8 +99,11 @@
position: relative;
padding-bottom: 60px;
.search_wrap{
padding: 25px 13px 13px 23px;
padding: 25px 13px 13px 13px;
border-bottom: 2px solid #E5ECFE;
.el-button + .el-button{
margin-left: 5px;
}
}
.values{
opacity: 0.9;