diff --git a/project/sass/apps/AppSpecialAdjustment/components/Add.vue b/project/sass/apps/AppSpecialAdjustment/components/Add.vue
index d01f33c8..f0333e6d 100644
--- a/project/sass/apps/AppSpecialAdjustment/components/Add.vue
+++ b/project/sass/apps/AppSpecialAdjustment/components/Add.vue
@@ -98,9 +98,11 @@
:props="treeObj.defaultProps"
node-key="id"
ref="tree"
- :check-strictly="true" show-checkbox
+ :check-strictly="true"
+ show-checkbox
:default-checked-keys="treeObj.checkedKeys"
- default-expand-all highlight-current>
+ default-expand-all
+ @check="onCheckChange">
@@ -278,10 +280,19 @@ export default {
this.showGrid = false
},
+ onCheckChange (e) {
+ this.$nextTick(() => {
+ this.$refs.tree.getCheckedKeys().forEach(v => {
+ this.$refs.tree.setChecked(v, false)
+ })
+ this.$refs.tree.setChecked(e.id, true)
+ })
+ },
+
getGridList() {
this.instance.post(`/app/appgirdinfo/listAll`).then((res) => {
if (res.code == 0) {
- this.treeObj.treeList = res.data
+ this.treeObj.treeList = this.format(res.data)
if (this.formData.girdId) {
this.$set(this.treeObj, 'checkedKeys', [this.formData.girdId])
}
@@ -289,6 +300,20 @@ export default {
})
},
+ format (list) {
+ return list.map(item => {
+ if (item.girdLevel !== '2') {
+ item.disabled = true
+ }
+
+ if (item.girdList && item.girdList.length) {
+ item.girdList = this.format(item.girdList)
+ }
+
+ return item
+ })
+ },
+
getDetail() {
this.instance.post(`/app/appspecialadjustment/queryDetailById?id=${this.params.id}`).then((res) => {
if (res.data) {
diff --git a/project/sass/apps/AppSpecialDisabled/components/Add.vue b/project/sass/apps/AppSpecialDisabled/components/Add.vue
index 55b8d806..b298a6e1 100644
--- a/project/sass/apps/AppSpecialDisabled/components/Add.vue
+++ b/project/sass/apps/AppSpecialDisabled/components/Add.vue
@@ -71,14 +71,6 @@
-
-
-
-
-
-
@@ -98,9 +90,11 @@
:props="treeObj.defaultProps"
node-key="id"
ref="tree"
- :check-strictly="true" show-checkbox
+ :check-strictly="true"
+ show-checkbox
:default-checked-keys="treeObj.checkedKeys"
- default-expand-all highlight-current>
+ default-expand-all
+ @check="onCheckChange">
@@ -274,10 +268,19 @@ export default {
this.showGrid = false
},
+ onCheckChange (e) {
+ this.$nextTick(() => {
+ this.$refs.tree.getCheckedKeys().forEach(v => {
+ this.$refs.tree.setChecked(v, false)
+ })
+ this.$refs.tree.setChecked(e.id, true)
+ })
+ },
+
getGridList() {
this.instance.post(`/app/appgirdinfo/listAll`).then((res) => {
if (res.code == 0) {
- this.treeObj.treeList = res.data
+ this.treeObj.treeList = this.format(res.data)
if (this.formData.girdId) {
this.$set(this.treeObj, 'checkedKeys', [this.formData.girdId])
}
@@ -285,6 +288,20 @@ export default {
})
},
+ format (list) {
+ return list.map(item => {
+ if (item.girdLevel !== '2') {
+ item.disabled = true
+ }
+
+ if (item.girdList && item.girdList.length) {
+ item.girdList = this.format(item.girdList)
+ }
+
+ return item
+ })
+ },
+
getDetail() {
this.instance.post(`/app/appspecialdisabled/queryDetailById?id=${this.params.id}`).then((res) => {
if (res.data) {
diff --git a/project/sass/apps/AppSpecialDrug/components/Add.vue b/project/sass/apps/AppSpecialDrug/components/Add.vue
index 175c72c0..541750bd 100644
--- a/project/sass/apps/AppSpecialDrug/components/Add.vue
+++ b/project/sass/apps/AppSpecialDrug/components/Add.vue
@@ -98,9 +98,11 @@
:props="treeObj.defaultProps"
node-key="id"
ref="tree"
- :check-strictly="true" show-checkbox
+ :check-strictly="true"
+ show-checkbox
:default-checked-keys="treeObj.checkedKeys"
- default-expand-all highlight-current>
+ default-expand-all
+ @check="onCheckChange">
@@ -286,10 +288,19 @@ export default {
this.showGrid = false
},
+ onCheckChange (e) {
+ this.$nextTick(() => {
+ this.$refs.tree.getCheckedKeys().forEach(v => {
+ this.$refs.tree.setChecked(v, false)
+ })
+ this.$refs.tree.setChecked(e.id, true)
+ })
+ },
+
getGridList() {
this.instance.post(`/app/appgirdinfo/listAll`).then((res) => {
if (res.code == 0) {
- this.treeObj.treeList = res.data
+ this.treeObj.treeList = this.format(res.data)
if (this.formData.girdId) {
this.$set(this.treeObj, 'checkedKeys', [this.formData.girdId])
}
@@ -297,6 +308,20 @@ export default {
})
},
+ format (list) {
+ return list.map(item => {
+ if (item.girdLevel !== '2') {
+ item.disabled = true
+ }
+
+ if (item.girdList && item.girdList.length) {
+ item.girdList = this.format(item.girdList)
+ }
+
+ return item
+ })
+ },
+
getDetail() {
this.instance.post(`/app/appspecialdrug/queryDetailById?id=${this.params.id}`).then((res) => {
if (res.data) {
diff --git a/project/sass/apps/AppSpecialMental/components/Add.vue b/project/sass/apps/AppSpecialMental/components/Add.vue
index d1030d2e..1d06d20b 100644
--- a/project/sass/apps/AppSpecialMental/components/Add.vue
+++ b/project/sass/apps/AppSpecialMental/components/Add.vue
@@ -98,9 +98,11 @@
:props="treeObj.defaultProps"
node-key="id"
ref="tree"
- :check-strictly="true" show-checkbox
+ :check-strictly="true"
+ show-checkbox
:default-checked-keys="treeObj.checkedKeys"
- default-expand-all highlight-current>
+ default-expand-all
+ @check="onCheckChange">
@@ -278,10 +280,19 @@ export default {
this.showGrid = false
},
+ onCheckChange (e) {
+ this.$nextTick(() => {
+ this.$refs.tree.getCheckedKeys().forEach(v => {
+ this.$refs.tree.setChecked(v, false)
+ })
+ this.$refs.tree.setChecked(e.id, true)
+ })
+ },
+
getGridList() {
this.instance.post(`/app/appgirdinfo/listAll`).then((res) => {
if (res.code == 0) {
- this.treeObj.treeList = res.data
+ this.treeObj.treeList = this.format(res.data)
if (this.formData.girdId) {
this.$set(this.treeObj, 'checkedKeys', [this.formData.girdId])
}
@@ -289,6 +300,20 @@ export default {
})
},
+ format (list) {
+ return list.map(item => {
+ if (item.girdLevel !== '2') {
+ item.disabled = true
+ }
+
+ if (item.girdList && item.girdList.length) {
+ item.girdList = this.format(item.girdList)
+ }
+
+ return item
+ })
+ },
+
getDetail() {
this.instance.post(`/app/appspecialmental/queryDetailById?id=${this.params.id}`).then((res) => {
if (res.data) {
diff --git a/project/sass/apps/AppSpecialPrison/components/Add.vue b/project/sass/apps/AppSpecialPrison/components/Add.vue
index 10fea332..83a58c34 100644
--- a/project/sass/apps/AppSpecialPrison/components/Add.vue
+++ b/project/sass/apps/AppSpecialPrison/components/Add.vue
@@ -98,9 +98,11 @@
:props="treeObj.defaultProps"
node-key="id"
ref="tree"
- :check-strictly="true" show-checkbox
+ :check-strictly="true"
+ show-checkbox
:default-checked-keys="treeObj.checkedKeys"
- default-expand-all highlight-current>
+ default-expand-all
+ @check="onCheckChange">
@@ -298,10 +300,19 @@ export default {
this.showGrid = false
},
+ onCheckChange (e) {
+ this.$nextTick(() => {
+ this.$refs.tree.getCheckedKeys().forEach(v => {
+ this.$refs.tree.setChecked(v, false)
+ })
+ this.$refs.tree.setChecked(e.id, true)
+ })
+ },
+
getGridList() {
this.instance.post(`/app/appgirdinfo/listAll`).then((res) => {
if (res.code == 0) {
- this.treeObj.treeList = res.data
+ this.treeObj.treeList = this.format(res.data)
if (this.formData.girdId) {
this.$set(this.treeObj, 'checkedKeys', [this.formData.girdId])
}
@@ -309,6 +320,20 @@ export default {
})
},
+ format (list) {
+ return list.map(item => {
+ if (item.girdLevel !== '2') {
+ item.disabled = true
+ }
+
+ if (item.girdList && item.girdList.length) {
+ item.girdList = this.format(item.girdList)
+ }
+
+ return item
+ })
+ },
+
getDetail() {
this.instance.post(`/app/appspecialprison/queryDetailById?id=${this.params.id}`).then((res) => {
if (res.data) {