|
@ -17,12 +17,12 @@ |
|
|
> |
|
|
> |
|
|
</el-option> |
|
|
</el-option> |
|
|
</el-select> --> |
|
|
</el-select> --> |
|
|
<el-cascader ref="cascaderUnit" v-model.trim="dataForm.agencyId" :options="optionsA" :props="{ checkStrictly: true, expandTrigger: 'hover', emitPath: false,children:'subAgencyList',label:'agencyName',value:'agencyId'}" popper-class="cascader-block"> |
|
|
<el-cascader ref="cascaderUnit" v-model.trim="dataForm.objectId" :options="optionsA" :props="{ checkStrictly: true, expandTrigger: 'hover', emitPath: false,children:'children',label:'objectName',value:'objectId'}" popper-class="cascader-block"> |
|
|
<template slot-scope="{ node, data }"> |
|
|
<template slot-scope="{ node, data }"> |
|
|
<div @click="cascaderClick(data)"> |
|
|
<div @click="cascaderClick(data)"> |
|
|
<!-- <span class="block"></span> --> |
|
|
<!-- <span class="block"></span> --> |
|
|
<span>{{ data.agencyName }}</span> |
|
|
<span>{{ data.objectName }}</span> |
|
|
<span v-if="!node.isLeaf"> ({{ data.subAgencyList.length }}) </span> |
|
|
<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
</el-cascader> |
|
|
</el-cascader> |
|
@ -114,9 +114,9 @@ export default { |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
cascaderClick (nodeData) { |
|
|
cascaderClick (nodeData) { |
|
|
this.dataForm.agencyId = nodeData.agencyId; |
|
|
this.dataForm.objectId = nodeData.objectId; |
|
|
this.dataForm.level = nodeData.level |
|
|
this.dataForm.objectType = nodeData.objectType |
|
|
this.$refs.cascaderUnit.checkedValue = nodeData.agencyId; |
|
|
this.$refs.cascaderUnit.checkedValue = nodeData.objectId; |
|
|
this.$refs.cascaderUnit.computePresentText(); |
|
|
this.$refs.cascaderUnit.computePresentText(); |
|
|
this.$refs.cascaderUnit.toggleDropDownVisible(false); |
|
|
this.$refs.cascaderUnit.toggleDropDownVisible(false); |
|
|
|
|
|
|
|
@ -124,16 +124,17 @@ export default { |
|
|
getGridList() { |
|
|
getGridList() { |
|
|
const { user } = this.$store.state |
|
|
const { user } = this.$store.state |
|
|
this.$http |
|
|
this.$http |
|
|
.post('/gov/org/customeragency/agencygridtree') |
|
|
.post('/gov/org/icServiceProject/service/serviceScopeTree') |
|
|
.then(({ data: res }) => { |
|
|
.then(({ data: res }) => { |
|
|
if (res.code !== 0) { |
|
|
if (res.code !== 0) { |
|
|
return this.$message.error(res.msg) |
|
|
return this.$message.error(res.msg) |
|
|
} else { |
|
|
} else { |
|
|
console.log('获取查询详情成功', res.data) |
|
|
console.log('获取查询详情成功', res.data) |
|
|
// this.optionsA = res.data |
|
|
// this.optionsA = res.data |
|
|
|
|
|
// console.log(this.optionsA); |
|
|
this.optionsA.push(res.data) |
|
|
this.optionsA.push(res.data) |
|
|
this.dataForm.agencyId = res.data.agencyId |
|
|
this.dataForm.objectId = res.data.objectId |
|
|
this.dataForm.level = res.data.level |
|
|
this.dataForm.objectType = res.data.objectType |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
.catch(() => { |
|
|
.catch(() => { |
|
|