海康门禁人脸照片限制200k
This commit is contained in:
parent
7f43d82d49
commit
474e796242
|
|
@ -3,29 +3,29 @@
|
|||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="关键字" prop="searchValue">
|
||||
<el-input v-model="queryParams.searchValue" placeholder="请输入员工姓名,编号,手机号" maxlength="20" clearable style="width: 240px"/>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="sex">
|
||||
<el-select v-model="queryParams.sex" style="width: 240px" clearable>
|
||||
<el-select v-model="queryParams.sex" style="width: 240px" clearable>
|
||||
<el-option label="男" value="0"></el-option>
|
||||
<el-option label="女" value="1"></el-option>
|
||||
</el-select>
|
||||
<el-option label="女" value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<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="faceState">
|
||||
<el-select v-model="queryParams.faceState" style="width: 240px" clearable>
|
||||
<el-select v-model="queryParams.faceState" style="width: 240px" clearable>
|
||||
<el-option label="开启" value="1"></el-option>
|
||||
<el-option label="停用" value="2"></el-option>
|
||||
</el-select>
|
||||
<el-option label="停用" value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="健康证" prop="healthCertStatus">
|
||||
<el-select v-model="queryParams.healthCertStatus" placeholder="健康证状态" style="width: 240px" clearable>
|
||||
<el-select v-model="queryParams.healthCertStatus" placeholder="健康证状态" style="width: 240px" clearable>
|
||||
<el-option label="正常" value="1"></el-option>
|
||||
<el-option label="过期" value="2"></el-option>
|
||||
<el-option label="缺失" value="3"></el-option>
|
||||
<el-option label="临期" value="4"></el-option>
|
||||
</el-select>
|
||||
<el-option label="过期" value="2"></el-option>
|
||||
<el-option label="缺失" value="3"></el-option>
|
||||
<el-option label="临期" value="4"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
|
|
@ -54,13 +54,13 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="员工编号" align="center" prop="staffNo" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="所属食堂" align="center" prop="canteenName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="所属食堂" align="center" prop="canteenName" :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">
|
||||
<template scope="scope">
|
||||
<span>{{ hidePhone(scope.row.mobile) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<span>{{ hidePhone(scope.row.mobile) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="性别" align="center" prop="sex" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.sex==0">男</span>
|
||||
|
|
@ -93,34 +93,34 @@
|
|||
</el-table-column>
|
||||
<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>
|
||||
<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>
|
||||
<div>有效期至{{ scope.row.healthCertExpire }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdateAuth(scope.row)"
|
||||
@click="handleUpdateAuth(scope.row)"
|
||||
>权限</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -135,7 +135,7 @@
|
|||
/>
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body :close-on-click-modal="false">
|
||||
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body :close-on-click-modal="false">
|
||||
<div style="width: 100%;height: 600px;overflow-y: auto;">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
|
||||
<el-row>
|
||||
|
|
@ -162,10 +162,10 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="员工性别:" prop="sex">
|
||||
<el-select v-model="form.sex" clearable style="width: 100%;">
|
||||
<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-option label="女" :value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
|
@ -177,7 +177,7 @@
|
|||
<el-form-item label="所属区域:" prop="areaId">
|
||||
<el-cascader v-model="form.areaId"
|
||||
:options="treeOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
|
||||
:props="{
|
||||
:props="{
|
||||
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||
value:'id',label:'label'
|
||||
|
|
@ -192,7 +192,7 @@
|
|||
v-for="item in canteenOptions"
|
||||
:key="item.canteenId"
|
||||
:label="item.canteenName"
|
||||
:value="item.canteenId"
|
||||
:value="item.canteenId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
|
@ -201,13 +201,13 @@
|
|||
<el-form-item label="岗位名称:" prop="postName">
|
||||
<el-input v-model="form.postName" placeholder="请输入岗位名称" maxlength="30" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="员工密码:" prop="password">
|
||||
<el-input v-model="form.password" placeholder="请输入员工密码"
|
||||
type="password" maxlength="20" show-password/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</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;">
|
||||
人脸信息
|
||||
|
|
@ -224,7 +224,7 @@
|
|||
:file-list="fileList0"
|
||||
:show-file-list="true"
|
||||
list-type="picture-card"
|
||||
accept=".png, .jpg, .jpeg"
|
||||
accept=".png, .jpg, .jpeg"
|
||||
:class="{ disabled: uploadDisabled0 }"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
|
|
@ -241,11 +241,11 @@
|
|||
健康证信息
|
||||
</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%;">
|
||||
</el-date-picker>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
|
@ -259,9 +259,9 @@
|
|||
:file-list="fileList1"
|
||||
:show-file-list="true"
|
||||
list-type="picture-card"
|
||||
accept=".png, .jpg, .jpeg"
|
||||
accept=".png, .jpg, .jpeg"
|
||||
:class="{ disabled: uploadDisabled1 }"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:before-upload="handleBeforeUpload5"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="handleRemove1"
|
||||
>
|
||||
|
|
@ -282,9 +282,9 @@
|
|||
:file-list="fileList2"
|
||||
:show-file-list="true"
|
||||
list-type="picture-card"
|
||||
accept=".png, .jpg, .jpeg"
|
||||
accept=".png, .jpg, .jpeg"
|
||||
:class="{ disabled: uploadDisabled2 }"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:before-upload="handleBeforeUpload5"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="handleRemove2"
|
||||
>
|
||||
|
|
@ -309,7 +309,7 @@
|
|||
:disabled="items.disabled"
|
||||
:key="items.deviceId"
|
||||
:label="items.deviceName"
|
||||
:value="items.deviceId"
|
||||
:value="items.deviceId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
|
@ -321,23 +321,23 @@
|
|||
maxlength="30" disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>
|
||||
<el-col :span="8" style="display: flex;align-items: center;height: 40px;padding-left: 20px;">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
plain
|
||||
size="mini" v-if="index==accessAuthorityList.length-1"
|
||||
@click="addDevice"
|
||||
>新增</el-button>
|
||||
<el-button
|
||||
type="info"
|
||||
plain
|
||||
plain
|
||||
size="mini" v-if="accessAuthorityList.length>1"
|
||||
@click="delDevice(index)"
|
||||
>删除</el-button>
|
||||
<el-button
|
||||
type="info"
|
||||
plain
|
||||
plain
|
||||
size="mini" v-if="accessAuthorityList.length==1"
|
||||
@click="clearDevice(index)"
|
||||
>清空</el-button>
|
||||
|
|
@ -356,7 +356,7 @@
|
|||
:active-value="1" :inactive-value="2">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="留样称权限:" prop="simpleCabinetStatus2">
|
||||
<el-switch v-model="simpleCabinetStatus2"
|
||||
|
|
@ -364,7 +364,7 @@
|
|||
:active-value="1" :inactive-value="2">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="智能出入库秤权限:" prop="simpleCabinetStatus3">
|
||||
<el-switch v-model="simpleCabinetStatus3"
|
||||
|
|
@ -372,20 +372,20 @@
|
|||
:active-value="1" :inactive-value="2">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm" :disabled="loadingBtn">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
<!-- 查看权限 -->
|
||||
<el-dialog :title="title" :visible.sync="open2" width="900px" append-to-body :close-on-click-modal="false">
|
||||
<el-dialog :title="title" :visible.sync="open2" width="900px" append-to-body :close-on-click-modal="false">
|
||||
<div style="width: 100%;height: 300px;overflow-y: auto;">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
|
||||
<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;">
|
||||
出入权限
|
||||
|
|
@ -401,7 +401,7 @@
|
|||
:disabled="items.disabled"
|
||||
:key="items.deviceId"
|
||||
:label="items.deviceName"
|
||||
:value="items.deviceId"
|
||||
:value="items.deviceId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
|
@ -436,7 +436,7 @@
|
|||
:active-value="1" :inactive-value="2">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="智能出入库秤权限:" prop="simpleCabinetStatus3">
|
||||
<el-switch v-model="simpleCabinetStatus3" disabled
|
||||
|
|
@ -444,20 +444,20 @@
|
|||
:active-value="1" :inactive-value="2">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</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 :title="title" :visible.sync="open3" width="900px" append-to-body :close-on-click-modal="false">
|
||||
<el-dialog :title="title" :visible.sync="open3" width="900px" append-to-body :close-on-click-modal="false">
|
||||
<div style="width: 100%;height: 300px;overflow-y: auto;">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
|
||||
<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;">
|
||||
出入权限
|
||||
|
|
@ -473,7 +473,7 @@
|
|||
:disabled="items.disabled"
|
||||
:key="items.deviceId"
|
||||
:label="items.deviceName"
|
||||
:value="items.deviceId"
|
||||
:value="items.deviceId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
|
@ -489,19 +489,19 @@
|
|||
<el-col :span="8" style="display: flex;align-items: center;height: 40px;padding-left: 20px;">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
plain
|
||||
size="mini" v-if="index==accessAuthorityList.length-1"
|
||||
@click="addDevice"
|
||||
>新增</el-button>
|
||||
<el-button
|
||||
type="info"
|
||||
plain
|
||||
plain
|
||||
size="mini" v-if="accessAuthorityList.length>1"
|
||||
@click="delDevice(index)"
|
||||
>删除</el-button>
|
||||
<el-button
|
||||
type="info"
|
||||
plain
|
||||
plain
|
||||
size="mini" v-if="accessAuthorityList.length==1"
|
||||
@click="clearDevice(index)"
|
||||
>清空</el-button>
|
||||
|
|
@ -515,7 +515,7 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="留样柜权限:" prop="simpleCabinetStatus">
|
||||
<el-switch v-model="simpleCabinetStatus"
|
||||
<el-switch v-model="simpleCabinetStatus"
|
||||
active-text="开启" inactive-text="关闭"
|
||||
:active-value="1" :inactive-value="2">
|
||||
</el-switch>
|
||||
|
|
@ -523,23 +523,23 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="留样称权限:" prop="simpleCabinetStatus2">
|
||||
<el-switch v-model="simpleCabinetStatus2"
|
||||
<el-switch v-model="simpleCabinetStatus2"
|
||||
active-text="开启" inactive-text="关闭"
|
||||
:active-value="1" :inactive-value="2">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="智能出入库秤权限:" prop="simpleCabinetStatus3">
|
||||
<el-switch v-model="simpleCabinetStatus3"
|
||||
<el-switch v-model="simpleCabinetStatus3"
|
||||
active-text="开启" inactive-text="关闭"
|
||||
:active-value="1" :inactive-value="2">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitFormAuth" :disabled="loadingBtn">确 定</el-button>
|
||||
<el-button @click="open3=false">取 消</el-button>
|
||||
|
|
@ -552,9 +552,9 @@
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { systemAreaTreeApi,getCanteenByAreaApi } from "@/api/base/stall";
|
||||
import { getKitchenDeviceSelectApi } from "@/api/kitchen/devices";
|
||||
<script>
|
||||
import { systemAreaTreeApi,getCanteenByAreaApi } from "@/api/base/stall";
|
||||
import { getKitchenDeviceSelectApi } from "@/api/kitchen/devices";
|
||||
import { getStaffListApi,getStaffInfoApi,addKitchenStaffApi,editKitchenStaffApi,delStaffApi,editStaffFaceStateApi} from '@/api/kitchen/staff';
|
||||
import { imgUpLoadTwo } from '@/api/system/upload';
|
||||
import { validateNewPassword } from '@/utils/validate';
|
||||
|
|
@ -583,23 +583,23 @@ export default {
|
|||
// 食堂选项
|
||||
canteenOptions:[],
|
||||
// 设备选项
|
||||
devicesOptions:[],
|
||||
devicesOptions:[],
|
||||
loading2: false,
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
open2: false,
|
||||
open3: false,
|
||||
open: false,
|
||||
open2: false,
|
||||
open3: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 10,
|
||||
searchValue: undefined,
|
||||
sex: undefined,
|
||||
postName: undefined,
|
||||
faceState: undefined,
|
||||
healthCertStatus: undefined,
|
||||
sex: undefined,
|
||||
postName: undefined,
|
||||
faceState: undefined,
|
||||
healthCertStatus: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
|
@ -668,13 +668,13 @@ export default {
|
|||
fileList1: [],//图片
|
||||
checkUrlList1: [],//图片
|
||||
fileList2: [],//图片
|
||||
checkUrlList2: [],//图片
|
||||
checkUrlList2: [],//图片
|
||||
dialogVisible:false,//图片弹窗
|
||||
dialogImageUrl:"",//图片弹窗
|
||||
dialogImageUrl:"",//图片弹窗
|
||||
loadingBtn:false
|
||||
};
|
||||
},
|
||||
created() {
|
||||
created() {
|
||||
this.getList();
|
||||
this.getTreeData()
|
||||
},
|
||||
|
|
@ -697,7 +697,7 @@ export default {
|
|||
this.treeOptions = response.data;
|
||||
});
|
||||
},
|
||||
handleTreeChange(e){
|
||||
handleTreeChange(e){
|
||||
let param= {
|
||||
"areaId":e,
|
||||
"canteenType":1
|
||||
|
|
@ -710,7 +710,7 @@ export default {
|
|||
// 门禁设备选项
|
||||
getKitchenDeviceSelect(){
|
||||
getKitchenDeviceSelectApi({deviceType:3}).then((response) => {
|
||||
this.devicesOptions = response.data
|
||||
this.devicesOptions = response.data
|
||||
})
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
|
|
@ -719,15 +719,15 @@ export default {
|
|||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 10,
|
||||
searchValue: undefined,
|
||||
sex: undefined,
|
||||
postName: undefined,
|
||||
faceState: undefined,
|
||||
healthCertStatus: undefined,
|
||||
sex: undefined,
|
||||
postName: undefined,
|
||||
faceState: undefined,
|
||||
healthCertStatus: undefined,
|
||||
}
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
|
|
@ -741,20 +741,20 @@ export default {
|
|||
"faceState":this.queryParams.faceState,
|
||||
"postName":this.queryParams.postName,
|
||||
"healthCertStatus":this.queryParams.healthCertStatus,
|
||||
"pageNum": this.queryParams.pageNum,
|
||||
"pageNum": this.queryParams.pageNum,
|
||||
"pageSize": this.queryParams.pageSize
|
||||
}
|
||||
}
|
||||
getStaffListApi(param).then(response => {
|
||||
this.tableListData = response.rows;
|
||||
this.tableListData.forEach(item=>{
|
||||
if(item.mobile&&item.mobile!=""){
|
||||
this.$set(item,"mobile",decryptWithSM4(item.mobile))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.total = Number(response.total);
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
|
|
@ -763,14 +763,14 @@ export default {
|
|||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
this.reset();
|
||||
getStaffInfoApi(row.staffId).then(response => {
|
||||
this.form = response.data;
|
||||
getCanteenByAreaApi({"areaId":this.form.areaId}).then((response) => {
|
||||
this.canteenOptions = response.rows;
|
||||
setTimeout(()=>{
|
||||
this.$set(this.form,"canteenId",row.canteenId)
|
||||
},500)
|
||||
},500)
|
||||
})
|
||||
if(response.data.healthCertFrontImg){
|
||||
this.fileList0=[{url:response.data.faceUrl}]
|
||||
|
|
@ -793,14 +793,14 @@ export default {
|
|||
this.fileList2=[]
|
||||
this.checkUrlList2=[]
|
||||
}
|
||||
console.log(this.form)
|
||||
console.log(this.form)
|
||||
this.$set(this.form,"password",decryptWithSM4(this.form.password))
|
||||
this.$set(this.form,"mobile",decryptWithSM4(this.form.mobile))
|
||||
if(this.form.accessAuthorityList&&this.form.accessAuthorityList.length>0){
|
||||
console.log(this.form.accessAuthorityList)
|
||||
console.log(this.form.accessAuthorityList)
|
||||
let index = this.form.accessAuthorityList.findIndex(v=>v.deviceType==3)
|
||||
if(index==-1){
|
||||
this.form.accessAuthorityList.forEach(item=>{
|
||||
this.form.accessAuthorityList.forEach(item=>{
|
||||
if(item.deviceType==7){
|
||||
this.simpleCabinetStatus = Number(item.privilegeValue)
|
||||
}
|
||||
|
|
@ -836,14 +836,14 @@ export default {
|
|||
});
|
||||
},
|
||||
handleUpdateAuth(row){
|
||||
this.reset();
|
||||
this.reset();
|
||||
getStaffInfoApi(row.staffId).then(response => {
|
||||
this.form = response.data;
|
||||
this.form = response.data;
|
||||
if(this.form.accessAuthorityList&&this.form.accessAuthorityList.length>0){
|
||||
console.log(this.form.accessAuthorityList)
|
||||
console.log(this.form.accessAuthorityList)
|
||||
let index = this.form.accessAuthorityList.findIndex(v=>v.deviceType==3)
|
||||
if(index==-1){
|
||||
this.form.accessAuthorityList.forEach(item=>{
|
||||
this.form.accessAuthorityList.forEach(item=>{
|
||||
if(item.deviceType==7){
|
||||
this.simpleCabinetStatus = Number(item.privilegeValue)
|
||||
}
|
||||
|
|
@ -891,7 +891,7 @@ export default {
|
|||
this.fileList1 = []//图片
|
||||
this.checkUrlList1 = []//图片
|
||||
this.fileList2 = []//图片
|
||||
this.checkUrlList2 = []//图片
|
||||
this.checkUrlList2 = []//图片
|
||||
this.accessAuthorityList = [{
|
||||
deviceId:"",
|
||||
location:""
|
||||
|
|
@ -909,7 +909,7 @@ export default {
|
|||
faceState:row.faceState
|
||||
}
|
||||
editStaffFaceStateApi(param).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.getList();
|
||||
});
|
||||
|
||||
|
|
@ -935,7 +935,7 @@ export default {
|
|||
}
|
||||
})
|
||||
}
|
||||
console.log(this.accessAuthorityList)
|
||||
console.log(this.accessAuthorityList)
|
||||
this.open2=true
|
||||
this.title = "出入权限";
|
||||
},
|
||||
|
|
@ -978,7 +978,7 @@ export default {
|
|||
this.loading2=false
|
||||
},
|
||||
//组成成分,已选过的原料不能再选择
|
||||
setDisabled(){
|
||||
setDisabled(){
|
||||
this.devicesOptions.forEach(item=>{
|
||||
let index = this.accessAuthorityList.findIndex(v=>v.deviceId==item.deviceId)
|
||||
if(index!=-1){
|
||||
|
|
@ -986,12 +986,12 @@ export default {
|
|||
}else{
|
||||
item.disabled = false
|
||||
}
|
||||
})
|
||||
},
|
||||
})
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (valid) {
|
||||
let arr = [
|
||||
{
|
||||
deviceId:"",
|
||||
|
|
@ -1015,20 +1015,20 @@ export default {
|
|||
location:""
|
||||
}
|
||||
]
|
||||
let arr2 = this.accessAuthorityList.concat(arr)
|
||||
let arr2 = this.accessAuthorityList.concat(arr)
|
||||
this.form.accessAuthorityList=[]
|
||||
arr2.forEach(item=>{
|
||||
if(item.deviceType&&item.deviceType!=""){
|
||||
this.form.accessAuthorityList.push(item)
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(this.accessAuthorityList)
|
||||
console.log(this.form)
|
||||
let param = {
|
||||
...this.form
|
||||
}
|
||||
param.password = encryptWithSM4(this.form.password)
|
||||
param.mobile = encryptWithSM4(this.form.mobile)
|
||||
param.password = encryptWithSM4(this.form.password)
|
||||
param.mobile = encryptWithSM4(this.form.mobile)
|
||||
if (this.form.staffId != undefined) {
|
||||
editKitchenStaffApi(param).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
|
|
@ -1069,12 +1069,12 @@ export default {
|
|||
location:""
|
||||
}
|
||||
]
|
||||
let arr2 = this.accessAuthorityList.concat(arr)
|
||||
let arr2 = this.accessAuthorityList.concat(arr)
|
||||
this.form.accessAuthorityList=[]
|
||||
arr2.forEach(item=>{
|
||||
if(item.deviceType&&item.deviceType!=""){
|
||||
this.form.accessAuthorityList.push(item)
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(this.accessAuthorityList)
|
||||
console.log(this.form)
|
||||
|
|
@ -1089,7 +1089,7 @@ export default {
|
|||
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
handleDelete(row) {
|
||||
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||
return delStaffApi(row.staffId);
|
||||
}).then(() => {
|
||||
|
|
@ -1103,14 +1103,14 @@ export default {
|
|||
this.loadingBtn=true
|
||||
imgUpLoadTwo(param).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.checkUrlList0.push(res.data.url)
|
||||
this.$set(this.form,"faceUrl",res.data.url)
|
||||
} else {
|
||||
this.checkUrlList0.push(res.data.url)
|
||||
this.$set(this.form,"faceUrl",res.data.url)
|
||||
} else {
|
||||
this.$modal.msgError(res.msg)
|
||||
}
|
||||
this.loadingBtn=false
|
||||
})
|
||||
.catch((error) => {
|
||||
.catch((error) => {
|
||||
this.$modal.msgError(error)
|
||||
this.loadingBtn=false
|
||||
})
|
||||
|
|
@ -1120,14 +1120,14 @@ export default {
|
|||
this.loadingBtn=true
|
||||
imgUpLoadTwo(param).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.checkUrlList1.push(res.data.url)
|
||||
this.$set(this.form,"healthCertFrontImg",res.data.url)
|
||||
} else {
|
||||
this.checkUrlList1.push(res.data.url)
|
||||
this.$set(this.form,"healthCertFrontImg",res.data.url)
|
||||
} else {
|
||||
this.$modal.msgError(res.msg)
|
||||
}
|
||||
this.loadingBtn=false
|
||||
})
|
||||
.catch((error) => {
|
||||
.catch((error) => {
|
||||
this.$modal.msgError(error)
|
||||
this.loadingBtn=false
|
||||
})
|
||||
|
|
@ -1137,20 +1137,29 @@ export default {
|
|||
this.loadingBtn=true
|
||||
imgUpLoadTwo(param).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.checkUrlList2.push(res.data.url)
|
||||
this.$set(this.form,"healthCertBackImg",res.data.url)
|
||||
} else {
|
||||
this.checkUrlList2.push(res.data.url)
|
||||
this.$set(this.form,"healthCertBackImg",res.data.url)
|
||||
} else {
|
||||
this.$modal.msgError(res.msg)
|
||||
}
|
||||
this.loadingBtn=false
|
||||
})
|
||||
.catch((error) => {
|
||||
.catch((error) => {
|
||||
this.$modal.msgError(error)
|
||||
this.loadingBtn=false
|
||||
})
|
||||
},
|
||||
handleBeforeUpload(file) {
|
||||
const isLt = file.size / 1024 < 200
|
||||
console.log("file.size",file.size);
|
||||
console.log("file.size/1024",file.size/ 1024 / 1024 /1024);
|
||||
if (!isLt) {
|
||||
this.$modal.msgError(`图片大小不能超过 200 kb`)
|
||||
return false
|
||||
}
|
||||
},
|
||||
// 上传之前
|
||||
handleBeforeUpload(file) {
|
||||
handleBeforeUpload5(file) {
|
||||
const isLt = file.size / 1024 / 1024 < 5
|
||||
if (!isLt) {
|
||||
this.$modal.msgError(`图片大小不能超过 5 MB`)
|
||||
|
|
@ -1168,7 +1177,7 @@ export default {
|
|||
}
|
||||
})
|
||||
this.checkUrlList0.splice(sum, 1)
|
||||
this.$set(this.form,"faceUrl","")
|
||||
this.$set(this.form,"faceUrl","")
|
||||
},
|
||||
handleRemove1(file, fileList) {
|
||||
let sum = 0
|
||||
|
|
@ -1178,7 +1187,7 @@ export default {
|
|||
}
|
||||
})
|
||||
this.checkUrlList1.splice(sum, 1)
|
||||
this.$set(this.form,"healthCertFrontImg","")
|
||||
this.$set(this.form,"healthCertFrontImg","")
|
||||
},
|
||||
handleRemove2(file, fileList) {
|
||||
let sum = 0
|
||||
|
|
@ -1188,7 +1197,7 @@ export default {
|
|||
}
|
||||
})
|
||||
this.checkUrlList2.splice(sum,1)
|
||||
this.$set(this.form,"healthCertBackImg","")
|
||||
this.$set(this.form,"healthCertBackImg","")
|
||||
},
|
||||
//图片点击查看
|
||||
handlePictureCardPreview(file) {
|
||||
|
|
@ -1214,4 +1223,4 @@ export default {
|
|||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue