From 77af2e00a7459408b7e99684c7150e63fe4d9b4e Mon Sep 17 00:00:00 2001
From: zzyuan <781948537@qq.com>
Date: Tue, 1 Jul 2025 13:07:07 +0800
Subject: [PATCH] =?UTF-8?q?=E5=91=98=E5=B7=A5=E7=AE=A1=E7=90=86=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0=E6=9D=83=E9=99=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/kitchen/staffManage/staff/index.vue | 98 ++++++++++++++++---
1 file changed, 84 insertions(+), 14 deletions(-)
diff --git a/src/views/kitchen/staffManage/staff/index.vue b/src/views/kitchen/staffManage/staff/index.vue
index 65f2bde4..d3501078 100644
--- a/src/views/kitchen/staffManage/staff/index.vue
+++ b/src/views/kitchen/staffManage/staff/index.vue
@@ -336,7 +336,7 @@
- 留样柜权限
+ 留样权限
@@ -347,6 +347,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -402,6 +418,22 @@
:active-value="1" :inactive-value="2">
+
+
+
+
+
+
+
+
+
+
+
+
@@ -473,6 +505,8 @@ export default {
}
],
simpleCabinetStatus:1,
+ simpleCabinetStatus2:1,
+ simpleCabinetStatus3:1,
// 表单校验
rules: {
staffName: [
@@ -645,6 +679,17 @@ export default {
console.log(this.form.accessAuthorityList)
let index = this.form.accessAuthorityList.findIndex(v=>v.deviceType==3)
if(index==-1){
+ this.form.accessAuthorityList.forEach(item=>{
+ if(item.deviceType==7){
+ this.simpleCabinetStatus = Number(item.privilegeValue)
+ }
+ if(item.deviceType==21){
+ this.simpleCabinetStatus2 = Number(item.privilegeValue)
+ }
+ if(item.deviceType==51){
+ this.simpleCabinetStatus3 = Number(item.privilegeValue)
+ }
+ })
this.simpleCabinetStatus = Number(this.form.accessAuthorityList[0].privilegeValue)
}else{
this.accessAuthorityList = []
@@ -656,6 +701,12 @@ export default {
if(item.deviceType==7){
this.simpleCabinetStatus = Number(item.privilegeValue)
}
+ if(item.deviceType==21){
+ this.simpleCabinetStatus2 = Number(item.privilegeValue)
+ }
+ if(item.deviceType==51){
+ this.simpleCabinetStatus3 = Number(item.privilegeValue)
+ }
})
}
}
@@ -683,6 +734,8 @@ export default {
location:""
}]
this.simpleCabinetStatus=1
+ this.simpleCabinetStatus2=1
+ this.simpleCabinetStatus3=1
this.form = {};
this.resetForm("form");
},
@@ -711,6 +764,12 @@ export default {
if(item.deviceType==7){
this.simpleCabinetStatus = Number(item.privilegeValue)
}
+ if(item.deviceType==21){
+ this.simpleCabinetStatus2 = Number(item.privilegeValue)
+ }
+ if(item.deviceType==51){
+ this.simpleCabinetStatus3 = Number(item.privilegeValue)
+ }
})
}
console.log(this.accessAuthorityList)
@@ -767,22 +826,33 @@ export default {
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
- let arr = [{
- deviceId:"",
- deviceName:"",
- deviceType:7,
- privilegeValue:this.simpleCabinetStatus,
- location:""
- }]
+ let arr = [
+ {
+ deviceId:"",
+ deviceName:"",
+ deviceType:7,
+ privilegeValue:this.simpleCabinetStatus,
+ location:""
+ },
+ {
+ deviceId:"",
+ deviceName:"",
+ deviceType:21,
+ privilegeValue:this.simpleCabinetStatus2,
+ location:""
+ },
+ {
+ deviceId:"",
+ deviceName:"",
+ deviceType:51,
+ privilegeValue:this.simpleCabinetStatus3,
+ location:""
+ }
+ ]
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)
- }
+ this.form.accessAuthorityList.push(item)
})
console.log(this.accessAuthorityList)
console.log(this.form)