| | |
| | | </el-select> --> |
| | | <el-select |
| | | class="select1" |
| | | v-model="value1" |
| | | ref="treeForm" |
| | | v-model="node.title" |
| | | placeholder="请选择" |
| | | @change="fenjuChange" |
| | | > |
| | | <el-option |
| | | v-for="item in options1" |
| | | :key="item.id" |
| | | :label="item.title" |
| | | :value="item.id" |
| | | ></el-option> |
| | | <el-option style="height: auto;" :value="node"> |
| | | <el-tree |
| | | :data="options1" |
| | | default-expand-all |
| | | node-key="id" |
| | | @node-click="handleNodeClick" |
| | | :props="props" |
| | | > |
| | | </el-tree> |
| | | </el-option> |
| | | </el-select> |
| | | <el-select |
| | | class="select2" |
| | |
| | | <script> |
| | | import * as echarts from "echarts"; |
| | | import echartJs from "./securityEchart.js"; |
| | | import { lazyTreeJu } from "../../api/index/index"; |
| | | import { lazyTreeJu, lazyTrees } from "../../api/index/index"; |
| | | import { |
| | | queryCounts, |
| | | getCompanys, |
| | |
| | | qing: 0, |
| | | zhong: 0, |
| | | lao: 0 |
| | | } |
| | | }, |
| | | props: { |
| | | children: "children", |
| | | label: "title", |
| | | value: "id" |
| | | }, |
| | | node: {} //选中的记录 |
| | | }; |
| | | }, |
| | | methods: { |
| | | //点击节点 |
| | | handleNodeClick(data) { |
| | | this.node = data; |
| | | this.value1 = data.id; |
| | | this.$refs.treeForm.blur(); |
| | | this.getCompanys(); |
| | | }, |
| | | setAgeEchart() { |
| | | this.loading4 = true; |
| | | let params = { |
| | |
| | | getFenju() { |
| | | this.options1 = []; |
| | | this.value1 = ""; |
| | | lazyTreeJu().then(res => { |
| | | this.node = {}; |
| | | lazyTrees().then(res => { |
| | | if (res.data.code === 200) { |
| | | this.options1 = res.data.data; |
| | | this.value1 = this.options1[0] ? this.options1[0].id : ""; |
| | | this.node = this.options1[0]; |
| | | this.getCompanys(); |
| | | } else { |
| | | this.$message.error(res.msg); |
| | | } |
| | | }); |
| | | }, |
| | | fenjuChange() { |
| | | this.getCompanys(); |
| | | }, |
| | | |
| | | getCompanys() { |
| | | getCompanys({ jurisdiction: this.value1 }).then(res => { |
| | | if (res.data.code === 200) { |