From 154ef0e4c3dbb483d55e9b2b242021f627bee451 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期二, 26 十二月 2023 09:45:16 +0800
Subject: [PATCH] modified: src/views/technology/document/index.vue modified: src/views/technology/routing/index.vue
---
src/views/technology/document/index.vue | 43 ++++++++++++++++++++++++++-----------------
src/views/technology/routing/index.vue | 12 ++++++++++++
2 files changed, 38 insertions(+), 17 deletions(-)
diff --git a/src/views/technology/document/index.vue b/src/views/technology/document/index.vue
index d37951f..0f9485e 100644
--- a/src/views/technology/document/index.vue
+++ b/src/views/technology/document/index.vue
@@ -79,7 +79,6 @@
data() {
return {
ids: [],
- uniqueStateArr: [],
ajaxFun: fetchList,
multipleSelection: [],
isShowQuery: false,
@@ -390,7 +389,7 @@
this.table.toolbar.push({
text: '鏂板',
type: 'primary',
- disabled: true,
+ disabled: false,
fun: ()=>{this.addOrUpdateHandle()},
permitArr: [],
})
@@ -441,6 +440,17 @@
}]
}
this.getBomTypeDbOptions()
+ },
+ watch:{
+ multipleSelection(newVal){
+ if(newVal.length==0){
+ this.table.toolbar.forEach(ele=>{
+ if(ele.text=='鎷掔粷' || ele.text=='鎵瑰噯' || ele.text=='鎾ら攢'){
+ ele.disabled = true
+ }
+ })
+ }
+ }
},
methods: {
getBomTypeDbOptions() {
@@ -548,22 +558,21 @@
uniqueStateArr.push(stateArr[i])
}
}
- this.uniqueStateArr = uniqueStateArr
// 寰幆琛ㄥご鎸夐挳锛屽垽鏂瘡涓寜閽殑permitArr鏄惁瀹屽叏鍖呭惈閫変腑鐘舵�侊紝鑻ュ畬鍏ㄥ寘鍚紝鍒欐寜閽寒锛屽惁鍒欐寜閽伆
- // var toolbar = this.table.toolbar
- // for (var j = 0; j < toolbar.length; j++) {
- // if (
- // uniqueStateArr.every((val) =>
- // toolbar[j].permitArr.length <= 0
- // ? true
- // : toolbar[j].permitArr.includes(val)
- // )
- // ) {
- // toolbar[j].disabled = false
- // } else {
- // toolbar[j].disabled = true
- // }
- // }
+ var toolbar = this.table.toolbar
+ for (var j = 0; j < toolbar.length; j++) {
+ if (
+ uniqueStateArr.every((val) =>
+ toolbar[j].permitArr.length <= 0
+ ? true
+ : toolbar[j].permitArr.includes(val)
+ )
+ ) {
+ toolbar[j].disabled = false
+ } else {
+ toolbar[j].disabled = true
+ }
+ }
// 灏嗛�変腑璁板綍璧嬪�肩粰multipleSelection
this.multipleSelection = val
},
diff --git a/src/views/technology/routing/index.vue b/src/views/technology/routing/index.vue
index b89b89b..ba7ee5c 100644
--- a/src/views/technology/routing/index.vue
+++ b/src/views/technology/routing/index.vue
@@ -464,6 +464,7 @@
text: '鎵归噺鍒犻櫎',
type:'primary',
disabled: false,
+ permitArr: [],
fun: ()=>{this.copyRouting()},
})
}
@@ -483,6 +484,17 @@
}
this.getBomTypeDbOptions()
},
+ watch:{
+ multipleSelection(newVal){
+ if(newVal.length==0){
+ this.table.toolbar.forEach(ele=>{
+ if(ele.text=='鎷掔粷' || ele.text=='鎵瑰噯' || ele.text=='鎾ゅ洖'){
+ ele.disabled = true
+ }
+ })
+ }
+ }
+ },
methods: {
getData() {
if (this.$refs.routingTable !== undefined) {
--
Gitblit v1.9.3