员工概管理修改2
This commit is contained in:
parent
328fd3aefc
commit
be6fb0e208
|
|
@ -305,6 +305,12 @@
|
|||
size="mini" v-if="accessAuthorityList.length>1"
|
||||
@click="delDevice(index)"
|
||||
>删除</el-button>
|
||||
<el-button
|
||||
type="info"
|
||||
plain
|
||||
size="mini" v-if="accessAuthorityList.length==1"
|
||||
@click="clearDevice(index)"
|
||||
>清空</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
|
|
@ -473,6 +479,15 @@ export default {
|
|||
postName: [
|
||||
{ required: true, message: "员工岗位名称不能为空", trigger: "blur" }
|
||||
],
|
||||
faceUrl: [
|
||||
{ required: true, message: "人脸照片不能为空", trigger: "change" }
|
||||
],
|
||||
healthCertExpire: [
|
||||
{ required: true, message: "健康证到期日期不能为空", trigger: "change" }
|
||||
],
|
||||
healthCertFrontImg: [
|
||||
{ required: true, message: "健康证照片不能为空", trigger: "change" }
|
||||
],
|
||||
},
|
||||
fileList0: [],//图片
|
||||
checkUrlList0: [],//图片
|
||||
|
|
@ -576,6 +591,10 @@ export default {
|
|||
console.log(this.form)
|
||||
if(this.form.accessAuthorityList&&this.form.accessAuthorityList.length>0){
|
||||
console.log(this.form.accessAuthorityList)
|
||||
let index = this.form.accessAuthorityList.findIndex(v=>v.deviceType==3)
|
||||
if(index==-1){
|
||||
this.simpleCabinetStatus = Number(this.form.accessAuthorityList[0].privilegeValue)
|
||||
}else{
|
||||
this.accessAuthorityList = []
|
||||
this.form.accessAuthorityList.forEach(item=>{
|
||||
if(item.deviceType==3){
|
||||
|
|
@ -587,6 +606,7 @@ export default {
|
|||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
console.log(this.accessAuthorityList)
|
||||
this.open = true;
|
||||
this.title = "修改";
|
||||
|
|
@ -657,6 +677,17 @@ export default {
|
|||
//删除设备
|
||||
delDevice(index){
|
||||
this.accessAuthorityList.splice(index,1)
|
||||
this.setDisabled()
|
||||
},
|
||||
clearDevice(index){
|
||||
if(index==0){
|
||||
this.accessAuthorityList.splice(index,1)
|
||||
this.accessAuthorityList.push({
|
||||
deviceId:"",
|
||||
location:""
|
||||
})
|
||||
this.setDisabled()
|
||||
}
|
||||
},
|
||||
chosenDevice(e){
|
||||
let index = this.devicesOptions.findIndex(v=>v.deviceId==e)
|
||||
|
|
@ -691,7 +722,17 @@ export default {
|
|||
privilegeValue:this.simpleCabinetStatus,
|
||||
location:""
|
||||
}]
|
||||
this.form.accessAuthorityList = this.accessAuthorityList.concat(arr)
|
||||
let arr2 = this.accessAuthorityList.concat(arr)
|
||||
this.form.accessAuthorityList=[]
|
||||
arr2.forEach(item=>{
|
||||
if(item.deviceType==3){
|
||||
this.form.accessAuthorityList.push(item)
|
||||
}
|
||||
if(item.deviceType==7){
|
||||
this.form.accessAuthorityList.push(item)
|
||||
}
|
||||
})
|
||||
console.log(this.accessAuthorityList)
|
||||
console.log(this.form)
|
||||
if (this.form.staffId != undefined) {
|
||||
editKitchenStaffApi(this.form).then(response => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue