bonus-ui/src/views/kitchen/staffManage/staff/index.vue

696 lines
29 KiB
Vue
Raw Normal View History

2025-06-16 15:57:53 +08:00
<template>
<div class="app-container">
<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 label="性别" prop="sex">
<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-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>
<el-form-item label="人脸状态" prop="faceStatus">
<el-select v-model="queryParams.faceStatus" 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-option label="正常" value="0"></el-option>
<el-option label="过期" value="1"></el-option>
<el-option label="缺失" value="2"></el-option>
<el-option label="临期" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="tableListData" height="800">
2025-06-17 17:49:22 +08:00
<el-table-column label="序号" align="center" width="80" type="index">
2025-06-16 15:57:53 +08:00
<template slot-scope="scope">
2025-06-17 17:49:22 +08:00
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
2025-06-16 15:57:53 +08:00
</template>
2025-06-17 17:49:22 +08:00
</el-table-column>
2025-06-19 10:40:59 +08:00
<el-table-column label="员工编号" align="center" prop="staffNo" :show-overflow-tooltip="true" width="100" />
2025-06-19 16:09:31 +08:00
<el-table-column label="员工名称" align="center" prop="nickName" :show-overflow-tooltip="true" width="150" />
2025-06-19 10:40:59 +08:00
<el-table-column label="手机号" align="center" prop="phonenumber" :show-overflow-tooltip="true" width="150" />
2025-06-19 16:09:31 +08:00
<el-table-column label="性别" align="center" prop="sex" :show-overflow-tooltip="true" width="100" >
<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>
2025-06-19 10:40:59 +08:00
<el-table-column label="岗位名称" align="center" prop="postName" :show-overflow-tooltip="true" width="150" />
2025-06-19 16:09:31 +08:00
<el-table-column label="员工照片" align="center" prop="photoUrl" :show-overflow-tooltip="true" width="150">
<template slot-scope="scope">
<img :src="scope.row.photoUrl" v-if="scope.row.photoUrl" 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">
<template slot-scope="scope">
<span v-if="scope.row.faceStatus==0">开启</span>
<span v-if="scope.row.faceStatus==1">关闭</span>
</template>
</el-table-column>
<el-table-column label="健康证照片" align="center" prop="healthCertFrontImg" :show-overflow-tooltip="true" width="150">
<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>
2025-06-17 17:49:22 +08:00
<el-table-column label="出入权限" align="center" prop="canteenName" :show-overflow-tooltip="true" width="150" />
2025-06-19 16:09:31 +08:00
<el-table-column label="健康证状态" align="center" prop="canteenName" :show-overflow-tooltip="true" width="150">
<template slot-scope="scope">
<div>{{ scope.row.healthCertStatusName }}</div>
<div>有效期至{{ scope.row.healthCertExpire }}</div>
</template>
</el-table-column>
2025-06-17 17:49:22 +08:00
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
2025-06-16 15:57:53 +08:00
<template slot-scope="scope">
2025-06-17 17:49:22 +08:00
<el-button
2025-06-16 15:57:53 +08:00
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
2025-06-17 17:49:22 +08:00
>编辑</el-button>
<el-button
2025-06-16 15:57:53 +08:00
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
2025-06-17 17:49:22 +08:00
>删除</el-button>
2025-06-16 15:57:53 +08:00
</template>
2025-06-17 17:49:22 +08:00
</el-table-column>
2025-06-16 15:57:53 +08:00
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改参数配置对话框 -->
2025-06-19 10:40:59 +08:00
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
<div style="width: 100%;height: 600px;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-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,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
2025-06-19 16:09:31 +08:00
value:'nodeId',label:'label'
2025-06-19 10:40:59 +08:00
}" clearable @change="handleUserChange">
</el-cascader>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="员工编号:" prop="staffNo">
<el-input v-model="form.staffNo"
placeholder="请输入员工编号"
maxlength="30"
/>
</el-form-item>
</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>
</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>
</el-col>
<el-col :span="12">
<el-form-item label="关联食堂:" prop="canteenId">
<el-select v-model="form.canteenId" style="width: 100%;" placeholder="请选择关联食堂">
<el-option
v-for="item in canteenOptions"
:key="item.canteenId"
:label="item.canteenName"
:value="item.canteenId"
></el-option>
</el-select>
</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>
</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="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-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="健康证正面照片:" prop="healthCertFrontImg">
<el-upload
:http-request="
(obj) => imgUpLoad(obj, 'fileUrl')
"
action="#"
:limit="1"
:file-list="fileList"
:show-file-list="true"
list-type="picture-card"
accept=".png, .jpg, .jpeg"
:class="{ disabled: uploadDisabled }"
:before-upload="handleBeforeUpload"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove"
>
<i
class="el-icon-plus avatar-uploader-icon"
></i>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="健康证反面照片:" prop="healthCertBackImg">
<el-upload
:http-request="
(obj) => imgUpLoad2(obj, 'fileUrl')
"
action="#"
:limit="1"
:file-list="fileList2"
:show-file-list="true"
list-type="picture-card"
accept=".png, .jpg, .jpeg"
:class="{ disabled: uploadDisabled2 }"
:before-upload="handleBeforeUpload"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove2"
>
<i
class="el-icon-plus avatar-uploader-icon"
></i>
</el-upload>
</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-row>
<el-row :span="24" v-for="(item,index) in accessAuthorityList" :key="index">
<el-col :span="8">
2025-06-19 16:09:31 +08:00
<el-form-item label="关联门禁设备:" prop="deviceId">
<el-select v-model="item.deviceId" style="width: 100%;" placeholder="请选择关联门禁设备" :loading="loading2" @change="chosenDevice">
2025-06-19 10:40:59 +08:00
<el-option
2025-06-19 16:09:31 +08:00
v-for="items in devicesOptions"
:disabled="items.disabled"
:key="items.deviceId"
:label="items.deviceName"
:value="items.deviceId"
2025-06-19 10:40:59 +08:00
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="设备位置:" prop="location">
2025-06-19 16:09:31 +08:00
<el-input v-model="item.location"
2025-06-19 10:40:59 +08:00
placeholder="设备位置"
maxlength="30" disabled
/>
</el-form-item>
</el-col>
<el-col :span="8" style="display: flex;align-items: center;height: 40px;padding-left: 20px;">
<el-button
type="primary"
plain
2025-06-19 16:09:31 +08:00
size="mini" v-if="index==accessAuthorityList.length-1"
2025-06-19 10:40:59 +08:00
@click="addDevice"
>新增</el-button>
<el-button
type="info"
plain
2025-06-19 16:09:31 +08:00
size="mini" v-if="accessAuthorityList.length>1"
2025-06-19 10:40:59 +08:00
@click="delDevice(index)"
2025-06-19 16:09:31 +08:00
>删除</el-button>
2025-06-19 10:40:59 +08:00
</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">
2025-06-19 16:09:31 +08:00
<el-form-item label="留样柜权限:" prop="simpleCabinetStatus">
<el-switch v-model="simpleCabinetStatus"
2025-06-19 10:40:59 +08:00
active-text="开启" inactive-text="关闭"
2025-06-19 16:09:31 +08:00
:active-value="1" :inactive-value="2">
2025-06-19 10:40:59 +08:00
</el-switch>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
2025-06-16 15:57:53 +08:00
</el-dialog>
<el-dialog :visible.sync="dialogVisible" width="700px">
<img style="width: 100%;height: 100%;" :src="dialogImageUrl" alt="">
</el-dialog>
</div>
</template>
<script>
2025-06-19 10:40:59 +08:00
import { getCanteenByAreaApi } from "@/api/base/stall";
2025-06-19 16:09:31 +08:00
import { getKitchenDeviceSelectApi } from "@/api/kitchen/devices";
2025-06-19 10:40:59 +08:00
import { deptUserTreeApi,getUserInfoApi,getStaffListApi,getStaffInfoApi,addKitchenStaffApi,editKitchenStaffApi,delStaffApi} from '@/api/kitchen/staff';
2025-06-16 15:57:53 +08:00
import { imgUpLoadTwo } from '@/api/system/upload';
export default {
2025-06-19 10:40:59 +08:00
name: "",
dicts: [],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
//表格数据
tableListData: [],
// 岗位选项
postOptions: [],
// 人员选项
userTreeOptions:[],
// 食堂选项
canteenOptions:[],
2025-06-19 16:09:31 +08:00
// 设备选项
devicesOptions:[],
loading2: false,
2025-06-19 10:40:59 +08:00
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
canteenName: undefined,
areaNameStr: undefined,
},
// 表单参数
form: {},
2025-06-19 16:09:31 +08:00
//员工设备权限
accessAuthorityList:[
{
deviceId:"",
location:""
}
],
simpleCabinetStatus:1,
2025-06-19 10:40:59 +08:00
// 表单校验
rules: {
userId: [
{ required: true, message: "员工不能为空", trigger: "change" }
],
canteenId: [
{ required: true, message: "关联食堂不能为空", trigger: "change" }
],
staffNo: [
{ required: true, message: "员工编号不能为空", trigger: "blur" }
]
},
fileList: [],//图片
checkUrlList: [],//图片
fileList2: [],//图片
checkUrlList2: [],//图片
dialogVisible:false,//图片弹窗
dialogImageUrl:"",//图片弹窗
};
},
created() {
this.getPostList();
this.getList();
},
computed: {
2025-06-16 15:57:53 +08:00
//图片上传1张后隐藏上传框
uploadDisabled() {
return this.checkUrlList.length > 0
},
uploadDisabled2() {
return this.checkUrlList2.length > 0
},
2025-06-19 10:40:59 +08:00
},
methods: {
// 岗位选项
2025-06-16 15:57:53 +08:00
getPostList(){
2025-06-18 11:01:40 +08:00
getUserInfoApi().then((response) => {
2025-06-16 15:57:53 +08:00
this.postOptions = response.posts
})
},
2025-06-19 10:40:59 +08:00
// 员工选项
2025-06-17 17:49:22 +08:00
deptUserTree(){
deptUserTreeApi({}).then((response) => {
this.userTreeOptions = response.data
})
},
2025-06-19 10:40:59 +08:00
// 食堂选项
getCanteenList(){
getCanteenByAreaApi({}).then((response) => {
this.canteenOptions = response.rows
2025-06-18 11:01:40 +08:00
})
2025-06-17 17:49:22 +08:00
},
2025-06-19 16:09:31 +08:00
// 门禁设备选项
getKitchenDeviceSelect(){
getKitchenDeviceSelectApi({deviceType:3}).then((response) => {
this.devicesOptions = response.data
})
},
2025-06-16 15:57:53 +08:00
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 查询列表 */
getList() {
this.loading = true;
let param = {
2025-06-19 10:40:59 +08:00
"pageNum": this.queryParams.pageNum,
"pageSize": this.queryParams.pageSize,
2025-06-16 15:57:53 +08:00
}
2025-06-19 10:40:59 +08:00
getStaffListApi(param).then(response => {
this.tableListData = response.rows;
2025-06-16 15:57:53 +08:00
this.total = Number(response.total);
this.loading = false;
});
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "新增";
},
/** 修改按钮操作 */
handleUpdate(row) {
2025-06-19 10:40:59 +08:00
this.reset();
getStaffInfoApi(row.staffId).then(response => {
this.form = response.data;
2025-06-19 16:09:31 +08:00
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]
}else{
this.fileList=[]
this.checkUrlList=[]
}
if(response.data.healthCertBackImg){
this.fileList2=[{url:response.data.healthCertBackImg}]
this.checkUrlList2=[response.data.healthCertBackImg]
}else{
this.fileList2=[]
this.checkUrlList2=[]
}
console.log(this.form)
if(this.form.accessAuthorityList&&this.form.accessAuthorityList.length>0){
console.log(this.form.accessAuthorityList)
2025-06-19 16:30:34 +08:00
this.accessAuthorityList = []
2025-06-19 16:09:31 +08:00
this.form.accessAuthorityList.forEach(item=>{
if(item.deviceType==3){
this.accessAuthorityList.push(item)
this.$forceUpdate()
}
if(item.deviceType==7){
2025-06-19 16:30:34 +08:00
this.simpleCabinetStatus = Number(item.privilegeValue)
2025-06-19 16:09:31 +08:00
}
})
}
console.log(this.accessAuthorityList)
2025-06-16 15:57:53 +08:00
this.open = true;
this.title = "修改";
2025-06-19 10:40:59 +08:00
});
2025-06-16 15:57:53 +08:00
},
// 取消按钮
cancel() {
this.open = false;
},
// 表单重置
reset() {
2025-06-19 10:40:59 +08:00
this.deptUserTree();
this.getCanteenList();
2025-06-19 16:09:31 +08:00
this.getKitchenDeviceSelect();
this.fileList = []//图片
this.checkUrlList = []//图片
this.fileList2 = []//图片
this.checkUrlList2 = []//图片
this.accessAuthorityList = [{
deviceId:"",
location:""
}]
this.simpleCabinetStatus=1
2025-06-16 15:57:53 +08:00
this.form = {};
this.resetForm("form");
2025-06-19 10:40:59 +08:00
},
//选中员工查询信息
handleUserChange(e){
2025-06-19 16:09:31 +08:00
getUserInfoApi(e).then((response) => {
2025-06-19 10:40:59 +08:00
let userInfo = response.data
2025-06-19 16:09:31 +08:00
// this.$set(this.form,"sex",userInfo.sex)
2025-06-19 10:40:59 +08:00
this.$set(this.form,"phonenumber",userInfo.phonenumber)
this.$set(this.form,"postIds",response.postIds)
})
},
//添加设备
addDevice(){
2025-06-19 16:09:31 +08:00
if(this.accessAuthorityList.length<this.devicesOptions.length){
this.accessAuthorityList.push({
deviceId:"",
location:""
})
}
2025-06-19 10:40:59 +08:00
},
//删除设备
delDevice(index){
2025-06-19 16:09:31 +08:00
this.accessAuthorityList.splice(index,1)
},
chosenDevice(e){
let index = this.devicesOptions.findIndex(v=>v.deviceId==e)
let index2 = this.accessAuthorityList.findIndex(v=>v.deviceId==e)
this.accessAuthorityList[index2].deviceName = this.devicesOptions[index].deviceName;
this.accessAuthorityList[index2].deviceType = this.devicesOptions[index].deviceType;
this.accessAuthorityList[index2].privilegeValue = 1;
this.accessAuthorityList[index2].location = this.devicesOptions[index].subPlace;
this.loading2=true
this.setDisabled()
this.loading2=false
2025-06-19 10:40:59 +08:00
},
2025-06-19 16:09:31 +08:00
//组成成分,已选过的原料不能再选择
setDisabled(){
this.devicesOptions.forEach(item=>{
let index = this.accessAuthorityList.findIndex(v=>v.deviceId==item.deviceId)
if(index!=-1){
item.disabled = true
}else{
item.disabled = false
}
})
},
2025-06-16 15:57:53 +08:00
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
2025-06-19 16:09:31 +08:00
if (valid) {
let arr = [{
deviceId:"",
deviceName:"",
deviceType:7,
privilegeValue:this.simpleCabinetStatus,
location:""
}]
this.form.accessAuthorityList = this.accessAuthorityList.concat(arr)
console.log(this.form)
2025-06-19 10:40:59 +08:00
if (this.form.staffId != undefined) {
editKitchenStaffApi(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
2025-06-16 15:57:53 +08:00
} else {
2025-06-19 10:40:59 +08:00
addKitchenStaffApi(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
2025-06-16 15:57:53 +08:00
}
}
});
},
/** 删除按钮操作 */
2025-06-19 10:40:59 +08:00
handleDelete(row) {
2025-06-16 15:57:53 +08:00
this.$modal.confirm('是否确认删除数据项?').then(function() {
2025-06-19 10:40:59 +08:00
return delStaffApi(row.staffId);
2025-06-16 15:57:53 +08:00
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
// 图片上传
imgUpLoad(param, name, index) {
param.type = 'canteen'
imgUpLoadTwo(param).then((res) => {
if (res.code == 200) {
this.checkUrlList.push(res.data.url)
2025-06-19 16:09:31 +08:00
this.$set(this.form,"healthCertFrontImg",res.data.url)
} else {
this.$modal.msgError(res.msg)
}
})
.catch((error) => {
this.$modal.msgError(error)
})
},
imgUpLoad2(param, name, index) {
param.type = 'canteen'
imgUpLoadTwo(param).then((res) => {
if (res.code == 200) {
this.checkUrlList2.push(res.data.url)
this.$set(this.form,"healthCertBackImg",res.data.url)
2025-06-16 15:57:53 +08:00
} else {
this.$modal.msgError(res.msg)
}
})
.catch((error) => {
this.$modal.msgError(error)
})
},
// 上传之前
handleBeforeUpload(file) {
const isLt = file.size / 1024 / 1024 < 5
if (!isLt) {
this.$modal.msgError(`图片大小不能超过 5 MB`)
return false
}
},
handleExceed(files, fileList) {
this.$message.warning('最多只可以上传一张图片')
},
handleRemove(file, fileList) {
let sum = 0
this.checkUrlList.forEach((item, index) => {
if (item == file.url) {
sum = index
}
})
this.checkUrlList.splice(sum, 1)
2025-06-19 16:09:31 +08:00
this.$set(this.form,"healthCertFrontImg","")
2025-06-16 15:57:53 +08:00
},
handleRemove2(file, fileList) {
let sum = 0
this.checkUrlList2.forEach((item, index) => {
if (item == file.url) {
sum = index
}
})
2025-06-19 16:09:31 +08:00
this.checkUrlList2.splice(sum,1)
this.$set(this.form,"healthCertBackImg","")
2025-06-16 15:57:53 +08:00
},
//图片点击查看
handlePictureCardPreview(file) {
console.log(file)
this.dialogImageUrl = file.url
this.dialogVisible = true
2025-06-19 16:09:31 +08:00
},
openImg(row) {
this.dialogImageUrl = row.healthCertFrontImg;
this.dialogVisible = true;
},
openImg2(row) {
this.dialogImageUrl = row.photoUrl;
this.dialogVisible = true;
2025-06-16 15:57:53 +08:00
}
}
};
</script>
<style lang="scss" scoped>
//隐藏图片上传框的css
::v-deep.disabled {
.el-upload--picture-card {
display: none;
}
}
</style>