|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<div class="app-container">
|
|
<div class="app-container">
|
|
- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
|
|
|
|
|
|
+ <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" @submit.native.prevent>
|
|
<el-form-item label="姓名" prop="name">
|
|
<el-form-item label="姓名" prop="name">
|
|
<el-input
|
|
<el-input
|
|
v-model="queryParams.name"
|
|
v-model="queryParams.name"
|
|
@@ -10,6 +10,15 @@
|
|
@keyup.enter.native="handleQuery"
|
|
@keyup.enter.native="handleQuery"
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item prop="deptId">
|
|
|
|
+ <template slot="label">
|
|
|
|
+ <span @click="changeQueryType" v-if="queryParams.deptName == 0">本级及下级</span>
|
|
|
|
+ <span @click="changeQueryType" v-if="queryParams.deptName == 1">只查询本级</span>
|
|
|
|
+ </template>
|
|
|
|
+ <treeselect v-model="queryParams.deptId" :options="deptOptions" multiple:false :show-count="true"
|
|
|
|
+ placeholder="请选择部门" @select="hx" :noResultsText="'空'" :noOptionsText="'空'" style="width: 240px"/>
|
|
|
|
+ <el-input v-model="queryParams.deptName" v-if="false"/>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
@@ -246,7 +255,7 @@ export default {
|
|
introduction: null,
|
|
introduction: null,
|
|
riverwayLengthCounty: null,
|
|
riverwayLengthCounty: null,
|
|
deptId: null,
|
|
deptId: null,
|
|
- deptName: null,
|
|
|
|
|
|
+ deptName: 0,
|
|
createName: null,
|
|
createName: null,
|
|
updateName: null,
|
|
updateName: null,
|
|
dataStatus: null,
|
|
dataStatus: null,
|
|
@@ -363,9 +372,14 @@ export default {
|
|
},
|
|
},
|
|
/** 重置按钮操作 */
|
|
/** 重置按钮操作 */
|
|
resetQuery() {
|
|
resetQuery() {
|
|
|
|
+ this.queryParams.deptName = 0;
|
|
this.resetForm("queryForm");
|
|
this.resetForm("queryForm");
|
|
this.handleQuery();
|
|
this.handleQuery();
|
|
},
|
|
},
|
|
|
|
+ // 点击按钮修改是否只查询本级部门用户
|
|
|
|
+ changeQueryType() {
|
|
|
|
+ this.queryParams.deptName = this.queryParams.deptName == 0 ? 1 : 0;
|
|
|
|
+ },
|
|
// 多选框选中数据
|
|
// 多选框选中数据
|
|
handleSelectionChange(selection) {
|
|
handleSelectionChange(selection) {
|
|
this.ids = selection.map(item => item.id)
|
|
this.ids = selection.map(item => item.id)
|