|
|
@@ -3,7 +3,7 @@
|
|
|
|
|
|
<el-row :gutter="20">
|
|
|
<!--部门数据-->
|
|
|
- <el-col :span="4" :xs="24">
|
|
|
+ <!-- <el-col :span="4" :xs="24">
|
|
|
<div class="head-container">
|
|
|
<el-input v-model="deptName" placeholder="请输入机构名称" clearable size="small" prefix-icon="el-icon-search"
|
|
|
style="margin-bottom: 20px"/>
|
|
|
@@ -16,7 +16,13 @@
|
|
|
:filter-node-method="filterNode" ref="tree" node-key="id" :default-expanded-keys="defaultKeys"
|
|
|
:default-checked-keys="defaultKeys" @node-click="handleNodeClick"/>
|
|
|
</div>
|
|
|
- </el-col>
|
|
|
+ </el-col> -->
|
|
|
+ <!--机构数据-->
|
|
|
+ <el-col :span="4" :xs="24">
|
|
|
+
|
|
|
+<org-tree v-model="queryParams.orgId" @defaultKey="getDefaultKey" @checkChange="checkChange"
|
|
|
+ @click="clickTreeNode" businessTree></org-tree>
|
|
|
+</el-col>
|
|
|
|
|
|
<el-col :span="20" :xs="24">
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
|
|
|
@@ -101,7 +107,7 @@
|
|
|
<el-form-item label="所属机构" prop="orgId">
|
|
|
<treeselect style="width: 100%;" v-model="form.orgId"
|
|
|
:options="deptOptions" :show-count="true"
|
|
|
- :normalizer="tenantIdnormalizer"
|
|
|
+ :normalizer="tenantIdnormalizer"
|
|
|
:props="{ checkStrictly: true, label: 'name' }" placeholder="请选择机构" @select="changeSelectArea"/>
|
|
|
</el-form-item>
|
|
|
<!-- <el-form-item label="区域名称" v-if="form.orgId!=null" prop="areaId">
|
|
|
@@ -130,14 +136,14 @@
|
|
|
import {listCheck, getCheck, delCheck, addCheck, updateCheck} from "@/api/system/check";
|
|
|
import treeselect from '@riophae/vue-treeselect'
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
- import {deptTreeSelect} from "@/api/system/public";
|
|
|
+ import {deptTreeSelect,businessTreeSelect} from "@/api/system/public";
|
|
|
import {listArea, getAreaByOrg} from "@/api/system/area";
|
|
|
-
|
|
|
+ import orgTree from "@/components/orgTree";
|
|
|
export default {
|
|
|
name: "Check",
|
|
|
/** 引入基础minxins*/
|
|
|
mixins: [tableList],
|
|
|
- components: {treeselect},
|
|
|
+ components: {treeselect,orgTree},
|
|
|
dicts: ['sys_normal_disable'],
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -222,6 +228,20 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 节点单击事件
|
|
|
+ clickTreeNode(data) {
|
|
|
+ this.queryParams.orgId = data.id;
|
|
|
+ this.handleQuery();
|
|
|
+ },
|
|
|
+ //单选框状态改变
|
|
|
+ checkChange(state) {
|
|
|
+ this.queryParams.checkSub = state;
|
|
|
+ this.handleQuery();
|
|
|
+ },
|
|
|
+ getDefaultKey(key) {
|
|
|
+ this.queryParams.orgId = key;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
getPageIndex($index) {
|
|
|
//表格序号
|
|
|
return (
|
|
|
@@ -260,13 +280,19 @@
|
|
|
},
|
|
|
/** 查询部门下拉树结构 */
|
|
|
getDeptTree() {
|
|
|
- deptTreeSelect().then(response => {
|
|
|
+ // deptTreeSelect().then(response => {
|
|
|
+ // this.deptOptions = response.data;
|
|
|
+ // console.log(this.deptOptions, ' this.deptOptions')
|
|
|
+ // this.defaultKeys.push(response.data[0].id);
|
|
|
+ // this.queryParams.orgId = response.data[0].id;
|
|
|
+ // this.handleQuery();
|
|
|
+ // });
|
|
|
+ businessTreeSelect().then(response=>{
|
|
|
this.deptOptions = response.data;
|
|
|
- console.log(this.deptOptions, ' this.deptOptions')
|
|
|
this.defaultKeys.push(response.data[0].id);
|
|
|
- this.queryParams.orgId = response.data[0].id;
|
|
|
- this.handleQuery();
|
|
|
- });
|
|
|
+ this.queryParams.orgId = response.data[0].id;
|
|
|
+ this.handleQuery();
|
|
|
+ })
|
|
|
},
|
|
|
tenantIdnormalizer(node, instanceId) {
|
|
|
if (node.children && !node.children.length) {
|