|
|
@@ -1,16 +1,30 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
|
|
|
- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
|
|
|
+ <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
|
|
|
|
|
- <el-form-item label="统计机构" prop="orgId">
|
|
|
+ <!-- <el-form-item label="统计机构" prop="orgId">
|
|
|
|
|
|
<el-select style="width: 100%;" v-model="queryParams.orgId" placeholder="请选择统计机构">
|
|
|
<el-option v-for="item in orgOptions" :key="item.id" :label="item.name"
|
|
|
:value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
-</el-form-item>
|
|
|
+</el-form-item> -->
|
|
|
|
|
|
+<el-form-item label="组织机构" prop="orgId" class="formTreeItem">
|
|
|
+ <tree-select
|
|
|
+ v-model="queryParams.orgId"
|
|
|
+ :options="deptOptions"
|
|
|
+ :show-count="true"
|
|
|
+ :normalizer="tenantIdnormalizer"
|
|
|
+ :props="{ checkStrictly: true, label: 'name' }"
|
|
|
+ placeholder="请选择归属机构"
|
|
|
+ clearValueText="清除"
|
|
|
+ :noChildrenText="''"
|
|
|
+ noOptionsText="没有数据"
|
|
|
+ noResultsText="没有搜索结果"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
|
|
|
<el-form-item label="年份" prop="year">
|
|
|
<el-date-picker
|
|
|
@@ -112,8 +126,6 @@
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
- checkName: null,
|
|
|
- areaId: null,
|
|
|
orgId: null,
|
|
|
year:null
|
|
|
},
|
|
|
@@ -146,7 +158,7 @@
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- this. getAllOrg();
|
|
|
+ this.getDeptTree();
|
|
|
this. getList();
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -157,7 +169,23 @@
|
|
|
},
|
|
|
methods: {
|
|
|
|
|
|
-
|
|
|
+ /** 查询机构树数据 */
|
|
|
+ getDeptTree() {
|
|
|
+ deptTreeSelect().then((response) => {
|
|
|
+ this.deptOptions = response.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** treeSelect组件自定义数据*/
|
|
|
+ tenantIdnormalizer(node, instanceId) {
|
|
|
+ if (node.children && !node.children.length) {
|
|
|
+ delete node.children;
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ id: node.id,
|
|
|
+ label: node.shortName,
|
|
|
+ children: node.children,
|
|
|
+ };
|
|
|
+ },
|
|
|
getPageIndex($index) {
|
|
|
//表格序号
|
|
|
return (
|
|
|
@@ -229,4 +257,10 @@
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
-
|
|
|
+ <style lang="scss" scoped>
|
|
|
+ ::v-deep.formTreeItem {
|
|
|
+ .el-form-item__content {
|
|
|
+ width: 264px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ </style>
|