Merge branch 'bjxz-lk' into bjxz-dev

This commit is contained in:
xiaokangsix 2024-04-27 18:58:02 +08:00
commit e0098b0573
6 changed files with 315 additions and 142 deletions

View File

@ -86,7 +86,7 @@ export const workerAttendanceRuleDelete = data => post('xmgl/workerAttendanceRul
// 安全扣分详情
export const safeReduceDetailList = data => get('xmgl/xzDeductScoreRecord/list', data);//列表查询考勤规则信息
export const resetScoreApi = data => post('xmgl/xzDeductScoreRecord/edit', data);//重置分数
export const resetScoreApi = data => post('xmgl/workerInfo/updateById', data);//重置分数
export const selectJobListApi = data => get('xmgl/dictionariesRecord/selectJobList', data);//查询管理人员的职务类型和职务列表

View File

@ -0,0 +1,9 @@
/**
* api接口统一管理 访客预约记录
*/
import {post, get} from '../http'
export const xmglXzVisitorManageRecordPageApi = data => post('/xmgl/xzVisitorManageRecord/page', data); // 获取访客记录列表
export const xmglXzVisitorManageRecordDeleteApi = data => post('/xmgl/xzVisitorManageRecord/delete', data); // 获取访客记录列表

View File

@ -58,7 +58,7 @@
</div>
</div>
<!-- 来源 -->
<div class="title">{{ $t('message.sixComplete.carDense.from') + ':' }}{{ item.location }}</div>
<div class="title">{{ $t('message.sixComplete.carDense.from') + ':' }}{{ item.alarmDesc }}</div>
<!-- 去处置 -->
<div class="toDisposeOf" @click="openDialog(item)" v-if="!item.handleResult">
<el-button type="primary" size="small">去处置</el-button>

View File

@ -405,9 +405,26 @@
</div>
</template>
</el-table-column>
<el-table-column prop="address" width="300px">
<!-- 测试 -->
<el-table-column prop="sendSuccessStatus">
<template v-slot="{row}">
<div>
下发状态
<span :class="['valuesColor', row.sendSuccessStatus===1? 'green': row.sendSuccessStatus===2?'red':row.sendSuccessStatus===3?'yellow':'']">
{{ row.sendSuccessStatus===1? '成功': row.sendSuccessStatus===2?'失败':row.sendSuccessStatus===3?'部分成功':'' }}</span>
</div>
</template>
</el-table-column>
<el-table-column prop="address" width="400px">
<template slot-scope="scope">
<div class="tableBtns">
<el-button
size="medium"
type="text"
class="operationText"
@click="workerExitBtn(scope.row, 1)"
>查看下发详情</el-button
>
<!-- 退场 -->
<el-button
size="medium"
@ -4635,4 +4652,19 @@ export default {
justify-content: space-around;
}
}
.valuesColor{
color:#fff;
padding:3px;
}
.yellow{
background-color:#fbe000
}
.green{
background-color:#72cb40
}
.red{
background-color:#ec373e
}
</style>

View File

@ -7,27 +7,83 @@
:model="searchForm"
ref="searchForm"
>
<el-form-item
:label="$t('message.personnelPosition.beaconManage.workerName')"
prop="workerName"
>
<el-input
v-model="searchForm.workerName"
:placeholder="$t('message.personnelPosition.please_enter')"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" plain @click="loadCardData">
{{ $t("message.personnelPosition.beaconManage.query") }}
</el-button>
<el-button type="warning" plain @click="resetForm">
{{ $t("message.personnelPosition.beaconManage.refresh") }}
</el-button>
<el-button type="primary" @click="addPoint">
<div style="display: flex; justify-content: space-between">
<div>
<el-form-item label="访客姓名" prop="visitName">
<el-input
v-model="searchForm.visitName"
:placeholder="$t('message.personnelPosition.please_enter')"
clearable
></el-input>
</el-form-item>
<el-form-item label="预约人姓名" prop="appointmentName">
<el-input
v-model="searchForm.appointmentName"
:placeholder="$t('message.personnelPosition.please_enter')"
clearable
></el-input>
</el-form-item>
<el-form-item label="预约审批结果" prop="isSuccess">
<el-select v-model="searchForm.isSuccess" placeholder="请选择">
<el-option
v-for="item in isSuccessState"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<!-- 状态 -->
<el-form-item label="当前状态" prop="isEnable">
<el-select v-model="searchForm.isEnable" placeholder="请选择">
<el-option
v-for="item in isEnableState"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<!-- 时间 -->
<el-form-item label="预约有效结束时间" prop="workerName">
<el-date-picker
v-model="searchForm.endTime"
type="daterange"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="—"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item label="预约有效开始时间" prop="workerName">
<el-date-picker
v-model="searchForm.beginTime"
type="daterange"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="—"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
</div>
<div style="width: 400px">
<el-form-item>
<el-button type="primary" plain @click="loadCardData">
{{ $t('message.personnelPosition.beaconManage.query') }}
</el-button>
<el-button type="warning" plain @click="resetForm">
{{ $t('message.personnelPosition.beaconManage.refresh') }}
</el-button>
<!-- <el-button type="primary" @click="addPoint">
{{ $t("message.laborDev.add2") }}
</el-button>
</el-form-item>
</el-button> -->
</el-form-item>
</div>
</div>
</el-form>
</div>
<div class="table_wrap whiteBlock">
@ -39,45 +95,69 @@
:label="$t('message.personnelPosition.beaconManage.table.index')"
></el-table-column>
<el-table-column
prop="workerName"
:label="$t('message.laborDev.blackListNames')"
prop="visitName"
label="访客姓名"
align="center"
></el-table-column>
<el-table-column
prop="addTime"
:label="$t('message.laborDev.addDate')"
prop="idCard"
label="访客身份证号"
align="center"
></el-table-column>
<el-table-column
prop="addReason"
:label="$t('message.laborDev.blackReason')"
prop="appointmentName"
label="预约人姓名"
align="center"
></el-table-column>
<el-table-column
prop="isSuccess"
label="预约结果"
align="center"
>
<template v-slot="{row}">{{row.isSuccess=== 1 ? "预约成功" : row.isSuccess=== 0 ?'预约失败' : ''}}</template>
</el-table-column>
<el-table-column
prop="beginTime"
label="预约有效开始时间"
align="center"
></el-table-column>
<el-table-column
prop="endTime"
label="预约有效结束时间"
align="center"
></el-table-column>
<el-table-column
prop="isEnable"
label="当前状态"
align="center"
>
<template v-slot="{row}">{{row.isEnable === 1 ? "预约有效" : row.isEnable === 0 ? '预约已失效' : ''}}</template>
</el-table-column>
<el-table-column
:label="$t('message.personnelPosition.beaconManage.table.operation')"
align="center"
width="250"
width="150"
>
<template slot-scope="scope">
<div class="tableBtns">
<div @click="editPoint(scope.row)" class="operationText">
<template v-slot="{row}">
<div>
<!-- <div @click="editPoint(scope.row)" class="operationText">
<img
src="@/assets/images/icon-edit.png"
width="15px"
height="15px"
/>
<span>{{
$t("message.personnelPosition.beaconManage.table.edit")
$t('message.personnelPosition.beaconManage.table.edit')
}}</span>
</div>
<div @click="removePoint(scope.row)" class="operationText">
</div> -->
<div @click="removePoint(row)" class="operationText">
<img
src="@/assets/images/icon-delete.png"
width="15px"
height="15px"
/>
<span>{{
$t("message.personnelPosition.beaconManage.table.delete")
$t('message.personnelPosition.beaconManage.table.delete')
}}</span>
</div>
</div>
@ -160,14 +240,14 @@
@click="cardDialog = false"
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="saveCardFn"
size="medium"
>{{ $t("message.personnelPosition.determine") }}
>{{ $t('message.personnelPosition.determine') }}
</el-button>
</div>
</el-form>
@ -176,174 +256,218 @@
</div>
</template>
<script>
import { getWorkerInfoListApi } from "@/assets/js/api/personnelPosition.js";
import { getWorkerInfoListApi } from '@/assets/js/api/personnelPosition.js'
import {
workerBlacklistListApi,
workerBlacklistAddApi,
workerBlacklistEditApi,
workerBlacklistDeleteApi,
} from "@/assets/js/api/laborPerson.js";
workerBlacklistDeleteApi
} from '@/assets/js/api/laborPerson.js'
import { xmglXzVisitorManageRecordPageApi,xmglXzVisitorManageRecordDeleteApi } from '@/assets/js/api/visitRecordAPI.js'
export default {
data() {
data () {
return {
searchForm: {
workerName: "",
appointmentName:'', //
beginTime:'' , //
endTime:'', //
idCard:'',// 访
isEnable:'',//
isSuccess:'',//
visitName:''
},
pointList: [],
total: 0,
pageNo: 1,
pageSize: 10,
cardDialogTitle: "",
cardDialogTitle: '',
cardDialog: false,
cardForm: {
addReason: "",
addTime: "",
idCard: "",
reason: "",
workerId: "",
workerName: "",
projectSn: this.$store.state.projectSn,
addReason: '',
addTime: '',
idCard: '',
reason: '',
workerId: '',
workerName: '',
projectSn: this.$store.state.projectSn
},
cardFormRules: {
addReason: [
addReason: [
{
required: true,
message: this.$t("message.personnelPosition.required"),
trigger: "blur",
},
message: this.$t('message.personnelPosition.required'),
trigger: 'blur'
}
],
addTime: [
{
required: true,
message: this.$t("message.personnelPosition.mandatory"),
trigger: "change",
},
],workerId: [
message: this.$t('message.personnelPosition.mandatory'),
trigger: 'change'
}
],
workerId: [
{
required: true,
message: this.$t("message.personnelPosition.mandatory"),
trigger: "change",
},
],
message: this.$t('message.personnelPosition.mandatory'),
trigger: 'change'
}
]
},
isAdd: false,
allPersonList: [],
};
isEnableState: [
{
value: 1,
label: '预约有效'
},
{
value: 0,
label: '预约已失效'
}
],
isSuccessState: [
{
value: 1,
label: '预约成功'
},
{
value: 0,
label: '预约失败'
}
],
dialogVisible:false
}
},
mounted() {
this.loadAllPerson();
this.loadCardData();
mounted () {
this.loadAllPerson()
this.loadCardData()
},
methods: {
//
loadAllPerson() {
loadAllPerson () {
getWorkerInfoListApi({
projectSn: this.$store.state.projectSn,
userEnterpriseId: this.$store.state.userInfo.userEnterpriseId
}).then((res) => {
this.allPersonList = res.result;
});
}).then(res => {
this.allPersonList = res.result
})
},
addPoint(event) {
this.isAdd = true;
this.cardDialog = true;
addPoint (event) {
this.isAdd = true
this.cardDialog = true
this.cardForm = {
addReason: "",
addTime: "",
idCard: "",
reason: "",
workerId: "",
workerName: "",
projectSn: this.$store.state.projectSn,
};
this.cardDialogTitle = this.$t("message.laborDev.add2");
addReason: '',
addTime: '',
idCard: '',
reason: '',
workerId: '',
workerName: '',
projectSn: this.$store.state.projectSn
}
this.cardDialogTitle = this.$t('message.laborDev.add2')
},
editPoint(item) {
this.isAdd = false;
this.cardDialogTitle = this.$t("message.laborDev.btn_edit"); //
this.cardForm = JSON.parse(JSON.stringify(item));
this.cardDialog = true;
editPoint (item) {
this.isAdd = false
this.cardDialogTitle = this.$t('message.laborDev.btn_edit') //
this.cardForm = JSON.parse(JSON.stringify(item))
this.cardDialog = true
},
removePoint(item) {
removePoint (item) {
this.$confirm(
this.$t("message.personnelPosition.beaconManage.table.confirmText") +
"【" +
item.workerName +
"】?",
this.$t("message.personnelPosition.beaconManage.table.Tips"),
this.$t('message.personnelPosition.beaconManage.table.confirmText') ,
this.$t('message.personnelPosition.beaconManage.table.Tips'),
{
type: "warning",
type: 'warning'
}
).then(() => {
workerBlacklistDeleteApi({ id: item.id }).then((res) => {
this.loadCardData();
xmglXzVisitorManageRecordDeleteApi({ id: item.id }).then(res => {
this.loadCardData()
this.$message.success(
this.$t("message.personnelPosition.delete_success")
); //!
});
});
this.$t('message.personnelPosition.delete_success')
) //!
})
})
},
//
loadCardData() {
workerBlacklistListApi({
loadCardData () {
xmglXzVisitorManageRecordPageApi({
projectSn: this.$store.state.projectSn,
pageNo: this.pageNo,
pageSize: this.pageSize,
workerName: this.searchForm.workerName,
userEnterpriseId: this.$store.state.userInfo.userEnterpriseId
}).then((res) => {
this.pointList = res.result.records;
this.total = res.result.total;
});
appointmentName:this.searchForm.appointmentName,
beginTime_begin:this.searchForm.beginTime[0],
beginTime_end:this.searchForm.beginTime[1],
endTime_begin:this.searchForm.endTime[0],
endTime_end:this.searchForm.endTime[1],
idCard:this.searchForm.idCard,
isEnable:this.searchForm.isEnable,
isSuccess:this.searchForm.isSuccess,
visitName:this.searchForm.visitName
}).then(res => {
this.pointList = res.result.records
this.total = res.result.total
})
},
//
saveCardFn() {
this.$refs["cardForm"].validate((valid) => {
saveCardFn () {
this.$refs['cardForm'].validate(valid => {
if (valid) {
if (this.isAdd) {
// this.cardForm.floorId = this.currentFloorDetail.floorId
workerBlacklistAddApi(this.cardForm).then((res) => {
this.cardDialog = false;
this.loadCardData();
workerBlacklistAddApi(this.cardForm).then(res => {
this.cardDialog = false
this.loadCardData()
this.$message.success(
this.$t("message.personnelPosition.add_success")
); //
});
this.$t('message.personnelPosition.add_success')
) //
})
} else {
workerBlacklistEditApi(this.cardForm).then((res) => {
this.cardDialog = false;
this.loadCardData();
workerBlacklistEditApi(this.cardForm).then(res => {
this.cardDialog = false
this.loadCardData()
this.$message.success(
this.$t("message.personnelPosition.edit_success")
); //
});
this.$t('message.personnelPosition.edit_success')
) //
})
}
} else {
console.log("error submit!!");
return false;
console.log('error submit!!')
return false
}
});
})
},
resetForm() {
this.$refs["searchForm"].resetFields();
this.loadCardData();
resetForm () {
this.$refs['searchForm'].resetFields()
this.searchForm.beginTime = null
this.searchForm.endTime = null
this.loadCardData()
},
//
handleSizeChange(val) {
this.pageSize = val;
this.loadCardData();
handleSizeChange (val) {
this.pageSize = val
this.loadCardData()
},
//
handleCurrentChange(val) {
this.pageNo = val;
this.loadCardData();
handleCurrentChange (val) {
this.pageNo = val
this.loadCardData()
},
close() {
close () {
this.$nextTick(() => {
this.$refs.cardForm.clearValidate()
})
},
},
};
}
}
}
</script>
<style lang="less" scoped>
::v-deep {
.el-form-item {
margin-bottom: 5px;
}
}
</style>

View File

@ -30,7 +30,7 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="材料名称" prop="materialName">
<el-form-item label="批次" prop="materialName">
<el-input
v-model="queryInfo.materialName"
placeholder="请输入"
@ -67,6 +67,11 @@
width="50"
>
</el-table-column>
<el-table-column
prop="enterpriseName"
align="center"
label="企业"
></el-table-column>
<el-table-column
prop="name"
align="center"
@ -193,6 +198,7 @@ export default {
enterpriseId: "",
materialName: "",
timeRange: [],
id:''
},
pagInfo: {
pageNo: 1, //
@ -223,6 +229,7 @@ export default {
this.$message.warning("无法选中已禁用组织");
} else {
this.selectVal = data.enterpriseName;
this.queryInfo.id = data.id
this.selectTreeData = data;
this.queryInfo.enterpriseId = data.enterpriseId;
this.$refs.selectRef.blur();
@ -263,7 +270,8 @@ export default {
projectSn: this.projectSn,
pageNo: this.pagInfo.pageNo,
pageSize: this.pagInfo.pageSize,
name: this.queryInfo.materialName
name: this.queryInfo.materialName,
enterpriseId: this.queryInfo.id
};
if(this.queryInfo.timeRange && this.queryInfo.timeRange.length > 0){
data.entryTime_begin = this.queryInfo.timeRange[0];