厨房人员管理修改
This commit is contained in:
parent
236490d4db
commit
f4e3ec78a3
|
|
@ -55,6 +55,15 @@ export function delStaffApi(staffId) {
|
|||
method: 'post',
|
||||
})
|
||||
}
|
||||
//更新员工人脸
|
||||
export function editStaffFaceStateApi(data) {
|
||||
return request({
|
||||
url: '/kitchen_staff_info/edit/face-state',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 查询厨房员工晨检记录列表
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<div>
|
||||
<div>
|
||||
<span class="item-label">实名抓拍:</span>
|
||||
<el-switch @change="changeSwitch"
|
||||
<el-switch @change="changeSwitch"
|
||||
v-model="camera_real_name_capture"
|
||||
active-value="1" active-text="开启"
|
||||
inactive-value="2" inactive-text="关闭">
|
||||
|
|
|
|||
|
|
@ -69,12 +69,20 @@
|
|||
<el-table-column label="日期" align="center" prop="sampleSaveTime" :show-overflow-tooltip="true" width="150"/>
|
||||
<el-table-column label="关联食堂" align="center" prop="canteenName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="档口名称" align="center" prop="stallName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="餐次" align="center" prop="mealtimeType" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="餐次" align="center" prop="mealtimeType" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.mealtimeType==1">早餐</span>
|
||||
<span v-if="scope.row.mealtimeType==2">午餐</span>
|
||||
<span v-if="scope.row.mealtimeType==3">下午茶</span>
|
||||
<span v-if="scope.row.mealtimeType==4">晚餐</span>
|
||||
<span v-if="scope.row.mealtimeType==5">夜宵</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="菜品编号" align="center" prop="dishesId" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="菜品名称" align="center" prop="dishesName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="留样重量(g)" align="center" prop="sampleWeight" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="所在留样柜" align="center" prop="deviceName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="留样人" align="center" prop="userName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="留样人" align="center" prop="staffName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="样品图片" align="center" prop="imageUrl" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<img :src="scope.row.imageUrl" v-if="scope.row.imageUrl" alt="" style="width: 80px;height: 40px;" @click="openImg(scope.row)">
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
<el-table-column label="所属食堂" align="center" prop="canteenName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="开柜温度(°C)" align="center" prop="openCabinetTemp" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="关柜温度(°C)" align="center" prop="closeCabinetTemp" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="使用人" align="center" prop="nickName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="使用人" align="center" prop="staffName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="开柜时间" align="center" prop="openCabinetTime" :show-overflow-tooltip="true" width="160"/>
|
||||
<el-table-column label="关柜时间" align="center" prop="closeCabinetTime" :show-overflow-tooltip="true" width="160"/>
|
||||
<el-table-column label="操作事项" align="center" prop="actionTypeName" :show-overflow-tooltip="true"/>
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="员工编号" align="center" prop="staffNo" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="员工名称" align="center" prop="nickName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="手机号" align="center" prop="phonenumber" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="员工名称" align="center" prop="staffName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="手机号" align="center" prop="mobile" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="岗位名称" align="center" prop="postName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="晨检视频" align="center" prop="checkVideoUrl" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
|
|
|
|||
|
|
@ -10,25 +10,17 @@
|
|||
<el-option label="女" value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="岗位" prop="postIds">
|
||||
<el-select v-model="queryParams.postIds" multiple style="width: 100%;" placeholder="请选择岗位">
|
||||
<el-option
|
||||
v-for="item in postOptions"
|
||||
:key="item.postId"
|
||||
:label="item.postName"
|
||||
:value="item.postId"
|
||||
:disabled="item.status == 1"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-form-item label="岗位" prop="postName">
|
||||
<el-input v-model="queryParams.postName" placeholder="请输入员工岗位" maxlength="20" clearable style="width: 240px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="人脸状态" prop="faceStatus">
|
||||
<el-select v-model="queryParams.faceStatus" style="width: 240px" clearable>
|
||||
<el-form-item label="人脸状态" prop="faceState">
|
||||
<el-select v-model="queryParams.faceState" style="width: 240px" clearable>
|
||||
<el-option label="开启" value="0"></el-option>
|
||||
<el-option label="停用" value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="健康证" prop="healthCertificate">
|
||||
<el-select v-model="queryParams.healthCertificate" placeholder="健康证状态" style="width: 240px" clearable>
|
||||
<el-form-item label="健康证" prop="healthCertStatus">
|
||||
<el-select v-model="queryParams.healthCertStatus" placeholder="健康证状态" style="width: 240px" clearable>
|
||||
<el-option label="正常" value="0"></el-option>
|
||||
<el-option label="过期" value="1"></el-option>
|
||||
<el-option label="缺失" value="2"></el-option>
|
||||
|
|
@ -60,43 +52,51 @@
|
|||
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="员工编号" align="center" prop="staffNo" :show-overflow-tooltip="true" width="100" />
|
||||
<el-table-column label="员工名称" align="center" prop="nickName" :show-overflow-tooltip="true" width="150" />
|
||||
<el-table-column label="手机号" align="center" prop="phonenumber" :show-overflow-tooltip="true" width="150" />
|
||||
<el-table-column label="性别" align="center" prop="sex" :show-overflow-tooltip="true" width="100" >
|
||||
<el-table-column label="员工编号" align="center" prop="staffNo" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="员工名称" align="center" prop="staffName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="手机号" align="center" prop="mobile" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="性别" align="center" prop="sex" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.sex==0">男</span>
|
||||
<span v-if="scope.row.sex==1">女</span>
|
||||
<span v-if="scope.row.sex==2">未知</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="岗位名称" align="center" prop="postName" :show-overflow-tooltip="true" width="150" />
|
||||
<el-table-column label="员工照片" align="center" prop="photoUrl" :show-overflow-tooltip="true" width="150">
|
||||
<el-table-column label="岗位名称" align="center" prop="postName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="员工照片" align="center" prop="faceUrl" :show-overflow-tooltip="true" width="120">
|
||||
<template slot-scope="scope">
|
||||
<img :src="scope.row.photoUrl" v-if="scope.row.photoUrl" alt="" style="width: 80px;height: 40px;" @click="openImg2(scope.row)">
|
||||
<img :src="scope.row.faceUrl" v-if="scope.row.faceUrl" alt="" style="width: 80px;height: 40px;" @click="openImg2(scope.row)">
|
||||
<span v-else>无</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="人脸状态" align="center" prop="faceStatus" :show-overflow-tooltip="true" width="150">
|
||||
<el-table-column label="人脸状态" align="center" prop="faceState" :show-overflow-tooltip="true" width="150">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.faceStatus==0">开启</span>
|
||||
<span v-if="scope.row.faceStatus==1">关闭</span>
|
||||
<!-- <span v-if="scope.row.faceState==0">开启</span>
|
||||
<span v-if="scope.row.faceState==1">关闭</span> -->
|
||||
<el-switch @change="changeSwitch(scope.row)"
|
||||
v-model="scope.row.faceState"
|
||||
:active-value="1" active-text="开启"
|
||||
:inactive-value="2" inactive-text="关闭">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="健康证照片" align="center" prop="healthCertFrontImg" :show-overflow-tooltip="true" width="150">
|
||||
<el-table-column label="健康证照片" align="center" prop="healthCertFrontImg" :show-overflow-tooltip="true" width="120">
|
||||
<template slot-scope="scope">
|
||||
<img :src="scope.row.healthCertFrontImg" v-if="scope.row.healthCertFrontImg" alt="" style="width: 80px;height: 40px;" @click="openImg(scope.row)">
|
||||
<span v-else>无</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出入权限" align="center" prop="canteenName" :show-overflow-tooltip="true" width="150" />
|
||||
<el-table-column label="健康证状态" align="center" prop="canteenName" :show-overflow-tooltip="true" width="150">
|
||||
<el-table-column label="出入权限" align="center" prop="" :show-overflow-tooltip="true" width="150">
|
||||
<template slot-scope="scope">
|
||||
<span style="color: #1890ff;" @click="openAccessAuth(scope.row)">查看</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="健康证状态" align="center" prop="healthCertStatusName" :show-overflow-tooltip="true" width="150">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.healthCertStatusName }}</div>
|
||||
<div>有效期至{{ scope.row.healthCertExpire }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
|
||||
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
|
|
@ -133,17 +133,11 @@
|
|||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="员工名称:" prop="userId">
|
||||
<el-cascader v-model="form.userId"
|
||||
:options="userTreeOptions" :filterable="true" style="width: 100%"
|
||||
ref="userCascader"
|
||||
:props="{
|
||||
multiple: false,
|
||||
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||
value:'nodeId',label:'label'
|
||||
}" clearable @change="handleUserChange">
|
||||
</el-cascader>
|
||||
<el-form-item label="员工名称:" prop="staffName">
|
||||
<el-input v-model="form.staffName"
|
||||
placeholder="请输入员工名称"
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
|
@ -156,18 +150,15 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="员工性别:" prop="sex">
|
||||
<el-select v-model="form.sex" disabled clearable style="width: 100%;">
|
||||
<el-option label="男" value="0"></el-option>
|
||||
<el-option label="女" value="1"></el-option>
|
||||
<el-select v-model="form.sex" clearable style="width: 100%;">
|
||||
<el-option label="男" :value="0"></el-option>
|
||||
<el-option label="女" :value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="手机号:" prop="phonenumber">
|
||||
<el-input v-model="form.phonenumber"
|
||||
placeholder="请输入手机号" disabled
|
||||
maxlength="11"
|
||||
/>
|
||||
<el-form-item label="手机号:" prop="mobile">
|
||||
<el-input v-model="form.mobile" placeholder="请输入手机号" maxlength="11"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
|
@ -183,16 +174,36 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="岗位名称:" prop="postIds">
|
||||
<el-select v-model="form.postIds" multiple disabled style="width: 100%;" placeholder="请选择岗位">
|
||||
<el-option
|
||||
v-for="item in postOptions"
|
||||
:key="item.postId"
|
||||
:label="item.postName"
|
||||
:value="item.postId"
|
||||
:disabled="item.status == 1"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-form-item label="岗位名称:" prop="postName">
|
||||
<el-input v-model="form.postName" placeholder="请输入岗位名称" maxlength="20" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div style="font-size: 18px;font-weight: bold;border-left: 4px solid #1890FF;padding-left: 4px;margin-bottom: 20px;">
|
||||
人脸信息
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="人脸照片:" prop="faceUrl">
|
||||
<el-upload
|
||||
:http-request="
|
||||
(obj) => imgUpLoad0(obj, 'fileUrl')
|
||||
"
|
||||
action="#"
|
||||
:limit="1"
|
||||
:file-list="fileList0"
|
||||
:show-file-list="true"
|
||||
list-type="picture-card"
|
||||
accept=".png, .jpg, .jpeg"
|
||||
:class="{ disabled: uploadDisabled0 }"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="handleRemove0"
|
||||
>
|
||||
<i
|
||||
class="el-icon-plus avatar-uploader-icon"
|
||||
></i>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
|
|
@ -200,6 +211,7 @@
|
|||
健康证信息
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="健康证到期:" prop="healthCertExpire">
|
||||
<el-date-picker v-model="form.healthCertExpire" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 45%;">
|
||||
|
|
@ -210,18 +222,18 @@
|
|||
<el-form-item label="健康证正面照片:" prop="healthCertFrontImg">
|
||||
<el-upload
|
||||
:http-request="
|
||||
(obj) => imgUpLoad(obj, 'fileUrl')
|
||||
(obj) => imgUpLoad1(obj, 'fileUrl')
|
||||
"
|
||||
action="#"
|
||||
:limit="1"
|
||||
:file-list="fileList"
|
||||
:file-list="fileList1"
|
||||
:show-file-list="true"
|
||||
list-type="picture-card"
|
||||
accept=".png, .jpg, .jpeg"
|
||||
:class="{ disabled: uploadDisabled }"
|
||||
:class="{ disabled: uploadDisabled1 }"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="handleRemove"
|
||||
:on-remove="handleRemove1"
|
||||
>
|
||||
<i
|
||||
class="el-icon-plus avatar-uploader-icon"
|
||||
|
|
@ -318,6 +330,62 @@
|
|||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="open2" width="900px" append-to-body>
|
||||
<div style="width: 100%;height: 300px;overflow-y: auto;">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<div style="font-size: 18px;font-weight: bold;border-left: 4px solid #1890FF;padding-left: 4px;margin-bottom: 20px;">
|
||||
出入权限
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :span="24" v-for="(item,index) in accessAuthorityList" :key="index">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="关联门禁设备:" prop="deviceId">
|
||||
<el-select v-model="item.deviceId" style="width: 100%;" placeholder="请选择关联门禁设备" disabled @change="chosenDevice">
|
||||
<el-option
|
||||
v-for="items in devicesOptions"
|
||||
:disabled="items.disabled"
|
||||
:key="items.deviceId"
|
||||
:label="items.deviceName"
|
||||
:value="items.deviceId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="设备位置:" prop="location">
|
||||
<el-input v-model="item.location"
|
||||
placeholder="设备位置"
|
||||
maxlength="30" disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<div style="font-size: 18px;font-weight: bold;border-left: 4px solid #1890FF;padding-left: 4px;margin-bottom: 20px;">
|
||||
留样柜权限
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="留样柜权限:" prop="simpleCabinetStatus">
|
||||
<el-switch v-model="simpleCabinetStatus" disabled
|
||||
active-text="开启" inactive-text="关闭"
|
||||
:active-value="1" :inactive-value="2">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="open2=false">确 定</el-button>
|
||||
<el-button @click="open2=false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible" width="700px">
|
||||
<img style="width: 100%;height: 100%;" :src="dialogImageUrl" alt="">
|
||||
</el-dialog>
|
||||
|
|
@ -327,7 +395,7 @@
|
|||
<script>
|
||||
import { getCanteenByAreaApi } from "@/api/base/stall";
|
||||
import { getKitchenDeviceSelectApi } from "@/api/kitchen/devices";
|
||||
import { deptUserTreeApi,getUserInfoApi,getStaffListApi,getStaffInfoApi,addKitchenStaffApi,editKitchenStaffApi,delStaffApi} from '@/api/kitchen/staff';
|
||||
import { getStaffListApi,getStaffInfoApi,addKitchenStaffApi,editKitchenStaffApi,delStaffApi,editStaffFaceStateApi} from '@/api/kitchen/staff';
|
||||
import { imgUpLoadTwo } from '@/api/system/upload';
|
||||
export default {
|
||||
name: "",
|
||||
|
|
@ -348,10 +416,6 @@ export default {
|
|||
total: 0,
|
||||
//表格数据
|
||||
tableListData: [],
|
||||
// 岗位选项
|
||||
postOptions: [],
|
||||
// 人员选项
|
||||
userTreeOptions:[],
|
||||
// 食堂选项
|
||||
canteenOptions:[],
|
||||
// 设备选项
|
||||
|
|
@ -362,6 +426,7 @@ export default {
|
|||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
open2: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
|
|
@ -381,18 +446,38 @@ export default {
|
|||
simpleCabinetStatus:1,
|
||||
// 表单校验
|
||||
rules: {
|
||||
userId: [
|
||||
{ required: true, message: "员工不能为空", trigger: "change" }
|
||||
staffName: [
|
||||
{ required: true, message: "员工名称不能为空", trigger: "blur" }
|
||||
],
|
||||
staffNo: [
|
||||
{ required: true, message: "员工编号不能为空", trigger: "blur" }
|
||||
],
|
||||
sex: [
|
||||
{ required: true, message: "员工性别不能为空", trigger: "change" }
|
||||
],
|
||||
mobile: [
|
||||
{
|
||||
required: true,
|
||||
message: '手机号不能为空',
|
||||
trigger: 'blur',
|
||||
},
|
||||
{
|
||||
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
||||
message: '请输入正确的手机号码',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
canteenId: [
|
||||
{ required: true, message: "关联食堂不能为空", trigger: "change" }
|
||||
],
|
||||
staffNo: [
|
||||
{ required: true, message: "员工编号不能为空", trigger: "blur" }
|
||||
]
|
||||
postName: [
|
||||
{ required: true, message: "员工岗位名称不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
fileList: [],//图片
|
||||
checkUrlList: [],//图片
|
||||
fileList0: [],//图片
|
||||
checkUrlList0: [],//图片
|
||||
fileList1: [],//图片
|
||||
checkUrlList1: [],//图片
|
||||
fileList2: [],//图片
|
||||
checkUrlList2: [],//图片
|
||||
dialogVisible:false,//图片弹窗
|
||||
|
|
@ -400,31 +485,21 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
this.getPostList();
|
||||
this.getList();
|
||||
},
|
||||
computed: {
|
||||
//图片上传1张后,隐藏上传框
|
||||
uploadDisabled() {
|
||||
return this.checkUrlList.length > 0
|
||||
uploadDisabled0() {
|
||||
return this.checkUrlList0.length > 0
|
||||
},
|
||||
uploadDisabled1() {
|
||||
return this.checkUrlList1.length > 0
|
||||
},
|
||||
uploadDisabled2() {
|
||||
return this.checkUrlList2.length > 0
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 岗位选项
|
||||
getPostList(){
|
||||
getUserInfoApi().then((response) => {
|
||||
this.postOptions = response.posts
|
||||
})
|
||||
},
|
||||
// 员工选项
|
||||
deptUserTree(){
|
||||
deptUserTreeApi({}).then((response) => {
|
||||
this.userTreeOptions = response.data
|
||||
})
|
||||
},
|
||||
// 食堂选项
|
||||
getCanteenList(){
|
||||
getCanteenByAreaApi({}).then((response) => {
|
||||
|
|
@ -453,14 +528,12 @@ export default {
|
|||
let param = {
|
||||
"searchValue":this.queryParams.searchValue,
|
||||
"sex":this.queryParams.sex,
|
||||
"faceStatus":this.queryParams.faceStatus,
|
||||
"healthCertificate":this.queryParams.healthCertificate,
|
||||
"faceState":this.queryParams.faceState,
|
||||
"postName":this.queryParams.postName,
|
||||
"healthCertStatus":this.queryParams.healthCertStatus,
|
||||
"pageNum": this.queryParams.pageNum,
|
||||
"pageSize": this.queryParams.pageSize
|
||||
}
|
||||
if(this.queryParams.postIds&&this.queryParams.postIds.length>0){
|
||||
param.postIds = this.queryParams.postIds
|
||||
}
|
||||
getStaffListApi(param).then(response => {
|
||||
this.tableListData = response.rows;
|
||||
this.total = Number(response.total);
|
||||
|
|
@ -478,14 +551,19 @@ export default {
|
|||
this.reset();
|
||||
getStaffInfoApi(row.staffId).then(response => {
|
||||
this.form = response.data;
|
||||
this.$set(this.form,"userId",Number(response.data.userId))
|
||||
this.handleUserChange(response.data.userId)
|
||||
if(response.data.healthCertFrontImg){
|
||||
this.fileList=[{url:response.data.healthCertFrontImg}]
|
||||
this.checkUrlList=[response.data.healthCertFrontImg]
|
||||
this.fileList0=[{url:response.data.faceUrl}]
|
||||
this.checkUrlList0=[response.data.faceUrl]
|
||||
}else{
|
||||
this.fileList=[]
|
||||
this.checkUrlList=[]
|
||||
this.fileList0=[]
|
||||
this.checkUrlList0=[]
|
||||
}
|
||||
if(response.data.healthCertFrontImg){
|
||||
this.fileList1=[{url:response.data.healthCertFrontImg}]
|
||||
this.checkUrlList1=[response.data.healthCertFrontImg]
|
||||
}else{
|
||||
this.fileList1=[]
|
||||
this.checkUrlList1=[]
|
||||
}
|
||||
if(response.data.healthCertBackImg){
|
||||
this.fileList2=[{url:response.data.healthCertBackImg}]
|
||||
|
|
@ -519,7 +597,6 @@ export default {
|
|||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.deptUserTree();
|
||||
this.getCanteenList();
|
||||
this.getKitchenDeviceSelect();
|
||||
this.fileList = []//图片
|
||||
|
|
@ -534,14 +611,36 @@ export default {
|
|||
this.form = {};
|
||||
this.resetForm("form");
|
||||
},
|
||||
//选中员工查询信息
|
||||
handleUserChange(e){
|
||||
getUserInfoApi(e).then((response) => {
|
||||
let userInfo = response.data
|
||||
// this.$set(this.form,"sex",userInfo.sex)
|
||||
this.$set(this.form,"phonenumber",userInfo.phonenumber)
|
||||
this.$set(this.form,"postIds",response.postIds)
|
||||
})
|
||||
changeSwitch(row){
|
||||
console.log(row.faceState)
|
||||
let param = {
|
||||
staffId:row.staffId,
|
||||
faceState:row.faceState
|
||||
}
|
||||
editStaffFaceStateApi(param).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.getList();
|
||||
});
|
||||
|
||||
},
|
||||
openAccessAuth(row){
|
||||
this.getKitchenDeviceSelect();
|
||||
if(row.accessAuthorityList&&row.accessAuthorityList.length>0){
|
||||
console.log(row.accessAuthorityList)
|
||||
this.accessAuthorityList = []
|
||||
row.accessAuthorityList.forEach(item=>{
|
||||
if(item.deviceType==3){
|
||||
this.accessAuthorityList.push(item)
|
||||
this.$forceUpdate()
|
||||
}
|
||||
if(item.deviceType==7){
|
||||
this.simpleCabinetStatus = Number(item.privilegeValue)
|
||||
}
|
||||
})
|
||||
}
|
||||
console.log(this.accessAuthorityList)
|
||||
this.open2=true
|
||||
this.title = "出入权限";
|
||||
},
|
||||
//添加设备
|
||||
addDevice(){
|
||||
|
|
@ -617,11 +716,25 @@ export default {
|
|||
}).catch(() => {});
|
||||
},
|
||||
// 图片上传
|
||||
imgUpLoad(param, name, index) {
|
||||
imgUpLoad0(param, name, index) {
|
||||
param.type = 'canteen'
|
||||
imgUpLoadTwo(param).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.checkUrlList.push(res.data.url)
|
||||
this.checkUrlList0.push(res.data.url)
|
||||
this.$set(this.form,"faceUrl",res.data.url)
|
||||
} else {
|
||||
this.$modal.msgError(res.msg)
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$modal.msgError(error)
|
||||
})
|
||||
},
|
||||
imgUpLoad1(param, name, index) {
|
||||
param.type = 'canteen'
|
||||
imgUpLoadTwo(param).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.checkUrlList1.push(res.data.url)
|
||||
this.$set(this.form,"healthCertFrontImg",res.data.url)
|
||||
} else {
|
||||
this.$modal.msgError(res.msg)
|
||||
|
|
@ -656,14 +769,24 @@ export default {
|
|||
handleExceed(files, fileList) {
|
||||
this.$message.warning('最多只可以上传一张图片')
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
handleRemove0(file, fileList) {
|
||||
let sum = 0
|
||||
this.checkUrlList.forEach((item, index) => {
|
||||
if (item == file.url) {
|
||||
sum = index
|
||||
}
|
||||
})
|
||||
this.checkUrlList.splice(sum, 1)
|
||||
this.checkUrlList0.splice(sum, 1)
|
||||
this.$set(this.form,"faceUrl","")
|
||||
},
|
||||
handleRemove1(file, fileList) {
|
||||
let sum = 0
|
||||
this.checkUrlList.forEach((item, index) => {
|
||||
if (item == file.url) {
|
||||
sum = index
|
||||
}
|
||||
})
|
||||
this.checkUrlList1.splice(sum, 1)
|
||||
this.$set(this.form,"healthCertFrontImg","")
|
||||
},
|
||||
handleRemove2(file, fileList) {
|
||||
|
|
@ -687,7 +810,7 @@ export default {
|
|||
this.dialogVisible = true;
|
||||
},
|
||||
openImg2(row) {
|
||||
this.dialogImageUrl = row.photoUrl;
|
||||
this.dialogImageUrl = row.faceUrl;
|
||||
this.dialogVisible = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="违规人员" align="center" prop="nickName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="违规人员" align="center" prop="staffName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="违规内容" align="center" prop="recordDesc" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="违规图片" align="center" prop="imgUrl" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
|
|
|
|||
Loading…
Reference in New Issue