|
@@ -107,7 +107,6 @@ export default {
|
|
|
tableAttributes: {},
|
|
|
// 表格事件
|
|
|
tableEvents: {},
|
|
|
- visible: false,
|
|
|
item: null,
|
|
|
treeList: [],
|
|
|
defaultProps: {
|
|
@@ -127,8 +126,7 @@ export default {
|
|
|
parentId: 0,
|
|
|
parentName: '',
|
|
|
status: true
|
|
|
- },
|
|
|
- adminDept: null
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -140,16 +138,16 @@ export default {
|
|
|
return [
|
|
|
[
|
|
|
...(() => {
|
|
|
- if (this.adminDept) {
|
|
|
+ if (this.item) {
|
|
|
return [
|
|
|
[
|
|
|
this.optionsEvensAuth('add', {
|
|
|
click: () => {
|
|
|
- if (this?.adminDept?.id) {
|
|
|
+ if (this?.item?.id) {
|
|
|
this.form2 = {
|
|
|
name: '',
|
|
|
- parentId: this?.adminDept?.id,
|
|
|
- parentName: this?.adminDept?.name,
|
|
|
+ parentId: this?.item?.id,
|
|
|
+ parentName: this?.item?.name,
|
|
|
status: true
|
|
|
}
|
|
|
this.dialogVisible2 = true
|
|
@@ -195,6 +193,9 @@ export default {
|
|
|
watch: {
|
|
|
filterText(val) {
|
|
|
this?.$refs?.listTree?.filter?.(val)
|
|
|
+ },
|
|
|
+ item() {
|
|
|
+ this.$refs.pageRef?.refreshList()
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -215,14 +216,13 @@ export default {
|
|
|
},
|
|
|
// 树形选中
|
|
|
handleNodeClick(e) {
|
|
|
- this.adminDept = { ...e }
|
|
|
- this.$refs.pageRef?.refreshList()
|
|
|
+ this.item = { ...e }
|
|
|
},
|
|
|
// 列表请求函数
|
|
|
getList(pam, cb) {
|
|
|
try {
|
|
|
- if (this?.adminDept?.id) {
|
|
|
- pam.params.push({ param: 'a.parent_id', compare: '=', value: this?.adminDept?.id })
|
|
|
+ if (this?.item?.id) {
|
|
|
+ pam.params.push({ param: 'a.parent_id', compare: '=', value: this?.item?.id })
|
|
|
} else {
|
|
|
pam.params.push({ param: 'a.parent_id', compare: '=', value: 'XXXXXXXXXXXXXXXXXXXX' })
|
|
|
}
|
|
@@ -257,6 +257,7 @@ export default {
|
|
|
delbumen(data) {
|
|
|
appraiseApplyCategoryDel([data.id]).then(res => {
|
|
|
this.getTreeListData()
|
|
|
+ this.$refs.pageRef?.refreshList()
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
message: '删除成功'
|