This commit is contained in:
yanran200730
2022-02-11 10:11:45 +08:00
parent 9a68f2ec8a
commit 76af1c2d14
5 changed files with 140 additions and 23 deletions

View File

@@ -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">
</el-tree>
</div>
</ai-dialog>
@@ -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) {

View File

@@ -71,14 +71,6 @@
<el-time-picker v-model="formData[item.formDbName]" placeholder="请选择" :disabled="item.disable == 1"
value-format="HH-mm-ss"></el-time-picker>
</template>
<template v-else-if="item.type == 'upload'">
<ai-uploader :instance="instance" isShowTip fileType="file" v-model="formData[item.formDbName]" :disabled="item.disable == 1"
acceptType=".zip,.rar,.doc,.docx,.xls,.ppt,.pptx,.pdf,.txt,.jpg,.png,.xlsx"
:limit="item.fileMaxCount" :maxSize="item.fileChoseSize"></ai-uploader>
</template>
<template v-else-if="item.type == 'rtf'">
<ai-editor v-model="formData[item.formDbName]" :instance="instance"/>
</template>
<template v-else-if="item.type == 'area'">
<ai-area-get :instance="instance" v-model="formData[item.formDbName]" :name.sync="formData.areaName" :disabled="item.disable == 1"/>
</template>
@@ -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">
</el-tree>
</div>
</ai-dialog>
@@ -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) {

View File

@@ -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">
</el-tree>
</div>
</ai-dialog>
@@ -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) {

View File

@@ -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">
</el-tree>
</div>
</ai-dialog>
@@ -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) {

View File

@@ -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">
</el-tree>
</div>
</ai-dialog>
@@ -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) {