|
@@ -0,0 +1,519 @@
|
|
|
|
+<template>
|
|
|
|
+ <div class="app-container">
|
|
|
|
+ <el-row :gutter="20">
|
|
|
|
+ <!--部门数据-->
|
|
|
|
+ <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"
|
|
|
|
+ >
|
|
|
|
+ <el-button slot="append" @click="changeQueryType" v-if="!queryThisLevel">本级及下级</el-button>
|
|
|
|
+ <el-button slot="append" @click="changeQueryType" v-if="queryThisLevel">只查询本级</el-button>
|
|
|
|
+ </el-input>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="head-container tree-scrollbar" style="height: 700px;overflow-y:auto;">
|
|
|
|
+ <el-tree
|
|
|
|
+ :data="deptOptions"
|
|
|
|
+ :props="defaultProps"
|
|
|
|
+ :expand-on-click-node="false"
|
|
|
|
+ :filter-node-method="filterNode"
|
|
|
|
+ ref="tree"
|
|
|
|
+ node-key="id"
|
|
|
|
+ :default-expanded-keys="[100]"
|
|
|
|
+ @node-click="handleNodeClick"
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ </el-col>
|
|
|
|
+ <!--林长数据-->
|
|
|
|
+ <el-col :span="20" :xs="24">
|
|
|
|
+ <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"
|
|
|
|
+ @submit.native.prevent>
|
|
|
|
+ <el-form-item label="姓名" prop="nickName" label-width="100px">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="queryParams.nickName"
|
|
|
|
+ placeholder="请输入姓名"
|
|
|
|
+ clearable
|
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <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-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+
|
|
|
|
+ <el-row :gutter="10" class="mb8">
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ plain
|
|
|
|
+ icon="el-icon-plus"
|
|
|
|
+ size="mini"
|
|
|
|
+ @click="handleAdd"
|
|
|
|
+ v-hasPermi="['lawenforcement:user:add']"
|
|
|
|
+ >新增
|
|
|
|
+ </el-button>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+ <el-button
|
|
|
|
+ type="success"
|
|
|
|
+ plain
|
|
|
|
+ icon="el-icon-edit"
|
|
|
|
+ size="mini"
|
|
|
|
+ :disabled="single"
|
|
|
|
+ @click="handleUpdate"
|
|
|
|
+ v-hasPermi="['lawenforcement:user:edit']"
|
|
|
|
+ >修改
|
|
|
|
+ </el-button>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+ <el-button
|
|
|
|
+ type="danger"
|
|
|
|
+ plain
|
|
|
|
+ icon="el-icon-delete"
|
|
|
|
+ size="mini"
|
|
|
|
+ :disabled="multiple"
|
|
|
|
+ @click="handleDelete"
|
|
|
|
+ v-hasPermi="['lawenforcement:user:remove']"
|
|
|
|
+ >删除
|
|
|
|
+ </el-button>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+ <el-button
|
|
|
|
+ type="warning"
|
|
|
|
+ plain
|
|
|
|
+ icon="el-icon-download"
|
|
|
|
+ size="mini"
|
|
|
|
+ @click="handleExport"
|
|
|
|
+ v-hasPermi="['lawenforcement:user:export']"
|
|
|
|
+ >导出
|
|
|
|
+ </el-button>
|
|
|
|
+ </el-col>
|
|
|
|
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
+ </el-row>
|
|
|
|
+
|
|
|
|
+ <el-table v-loading="loading" :data="lawenforcementUserList" @selection-change="handleSelectionChange">
|
|
|
|
+ <el-table-column type="selection" width="55" align="center"/>
|
|
|
|
+ <el-table-column label="姓名" align="center" prop="nickName"/>
|
|
|
|
+ <el-table-column label="联系电话" align="center" prop="phonenumber"/>
|
|
|
|
+ <el-table-column label="性别" align="center" prop="sex">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex"/>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="专业特长" align="center" prop="professional"/>
|
|
|
|
+ <el-table-column label="学历" align="center" prop="educational"/>
|
|
|
|
+ <el-table-column label="职级" align="center" prop="job"/>
|
|
|
|
+ <el-table-column label="级别" align="center" prop="level"/>
|
|
|
|
+ <el-table-column label="办公地点" align="center" prop="officeLocation"/>
|
|
|
|
+ <el-table-column label="居住地点" align="center" prop="homeAddress"/>
|
|
|
|
+ <el-table-column label="执法证号" align="center" prop="certificateNumber"/>
|
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ type="text"
|
|
|
|
+ icon="el-icon-edit"
|
|
|
|
+ @click="handleUpdate(scope.row)"
|
|
|
|
+ v-hasPermi="['lawenforcement:user:edit']"
|
|
|
|
+ >修改
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ type="text"
|
|
|
|
+ icon="el-icon-delete"
|
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
|
+ v-hasPermi="['lawenforcement:user:remove']"
|
|
|
|
+ >删除
|
|
|
|
+ </el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+
|
|
|
|
+ <pagination
|
|
|
|
+ v-show="total>0"
|
|
|
|
+ :total="total"
|
|
|
|
+ :page.sync="queryParams.pageNum"
|
|
|
|
+ :limit.sync="queryParams.pageSize"
|
|
|
|
+ @pagination="pageList"
|
|
|
|
+ />
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <!-- 添加或修改林长管理对话框 -->
|
|
|
|
+ <el-dialog :title="title" :visible.sync="open" width="850px" class="form-style">
|
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
|
|
+ <el-row :gutter="24">
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="关联用户" prop="userId">
|
|
|
|
+ <el-select v-model="form.userId" filterable placeholder="请选择关联用户">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="dict in userList"
|
|
|
|
+ :key="dict.userId"
|
|
|
|
+ :label="dict.nickName"
|
|
|
|
+ :value="String(dict.userId)"
|
|
|
|
+ @click.native="a(dict)"
|
|
|
|
+ ></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="性别" prop="sex">
|
|
|
|
+ <el-select v-model="form.sex" placeholder="请选择性别" disabled>
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="dict in dict.type.sys_user_sex"
|
|
|
|
+ :key="dict.value"
|
|
|
|
+ :label="dict.label"
|
|
|
|
+ :value="dict.value"
|
|
|
|
+ ></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row :gutter="24">
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="手机号" prop="phonenumber">
|
|
|
|
+ <el-input v-model="form.phonenumber" placeholder="请输入手机号" maxlength="13" disabled/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="身份证号" prop="cardNumber">
|
|
|
|
+ <el-input v-model="form.cardNumber" placeholder="请输入身份证号"/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+
|
|
|
|
+ <el-row :gutter="24">
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="专业特长" prop="professional">
|
|
|
|
+ <el-input v-model="form.professional" placeholder="请输入专业特长"/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="学历" prop="educational">
|
|
|
|
+ <el-input v-model="form.educational" placeholder="请输入学历"/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row :gutter="24">
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="职级" prop="job">
|
|
|
|
+ <el-input v-model="form.job" placeholder="请输入职级"/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="级别" prop="level">
|
|
|
|
+ <el-input v-model="form.level" placeholder="请输入级别"/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row :gutter="24">
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="办公地点" prop="officeLocation">
|
|
|
|
+ <el-input v-model="form.officeLocation" placeholder="请输入办公地点"/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="居住地点" prop="homeAddress">
|
|
|
|
+ <el-input v-model="form.homeAddress" placeholder="请输入居住地点"/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row :gutter="24">
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="执法证号" prop="certificateNumber">
|
|
|
|
+ <el-input v-model="form.certificateNumber" placeholder="请输入执法证号"/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="所属部门" prop="deptId">
|
|
|
|
+ <treeselect v-model="form.deptId" :options="deptOptions" multiple:false :show-count="true"
|
|
|
|
+ placeholder="请选择部门" @select="hxToDept" :noResultsText="'空'" :noOptionsText="'空'"/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ </el-form>
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
+ <el-button @click="cancel">取 消</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+import {addUser, delUser, getUser, listUser, selectUserList, updateUser} from "@/api/lawenforcement/user";
|
|
|
|
+import deptselector from '@/views/components/deptselector'
|
|
|
|
+import Treeselect from '@riophae/vue-treeselect'
|
|
|
|
+import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
|
|
|
+import {validPhoneMobile} from "@/api/rules/rules";
|
|
|
|
+import {treeselect} from "@/api/system/dept";
|
|
|
|
+
|
|
|
|
+export default {
|
|
|
|
+ name: "User",
|
|
|
|
+ components: {deptselector, Treeselect},
|
|
|
|
+ dicts: ['sys_user_sex'],
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ //左侧组织机构数查询方式 true查询本级 false查询本级及下级
|
|
|
|
+ queryThisLevel: false,
|
|
|
|
+ // 部门树选项
|
|
|
|
+ deptOptions: [],
|
|
|
|
+ // 林业网格层级信息树选项
|
|
|
|
+ gridLevelOptions: [],
|
|
|
|
+ userList: [],
|
|
|
|
+ // 遮罩层
|
|
|
|
+ loading: true,
|
|
|
|
+ // 选中数组
|
|
|
|
+ ids: [],
|
|
|
|
+ // 非单个禁用
|
|
|
|
+ single: true,
|
|
|
|
+ // 非多个禁用
|
|
|
|
+ multiple: true,
|
|
|
|
+ // 显示搜索条件
|
|
|
|
+ showSearch: true,
|
|
|
|
+ // 总条数
|
|
|
|
+ total: 0,
|
|
|
|
+ // 林长管理表格数据
|
|
|
|
+ lawenforcementUserList: [],
|
|
|
|
+ // 部门名称
|
|
|
|
+ deptName: undefined,
|
|
|
|
+ // 弹出层标题
|
|
|
|
+ title: "",
|
|
|
|
+ // 是否显示弹出层
|
|
|
|
+ open: false,
|
|
|
|
+ // 查询参数
|
|
|
|
+ queryParams: {
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ nickName: null,
|
|
|
|
+ deptId: null,
|
|
|
|
+ },
|
|
|
|
+ // 表单参数
|
|
|
|
+ form: {},
|
|
|
|
+ defaultProps: {
|
|
|
|
+ children: 'children',
|
|
|
|
+ label: 'label'
|
|
|
|
+ },
|
|
|
|
+ // 表单校验
|
|
|
|
+ rules: {
|
|
|
|
+ userId: [
|
|
|
|
+ {required: true, message: "姓名不能为空", trigger: "change"}
|
|
|
|
+ ],
|
|
|
|
+ sex: [
|
|
|
|
+ {required: true, message: "性别不能为空", trigger: "change"}
|
|
|
|
+ ],
|
|
|
|
+ phonenumber: [
|
|
|
|
+ {required: true, message: "联系电话不能为空", trigger: "change"},
|
|
|
|
+ {validator: validPhoneMobile, trigger: 'blur'}
|
|
|
|
+ ],
|
|
|
|
+ deptId: [
|
|
|
|
+ {required: true, message: '所属部门不能为空', trigger: 'change'}
|
|
|
|
+ ]
|
|
|
|
+ },
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ watch: {
|
|
|
|
+ // 根据名称筛选部门树
|
|
|
|
+ deptName(val) {
|
|
|
|
+ this.$refs.tree.filter(val)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ created() {
|
|
|
|
+ this.getList();
|
|
|
|
+ selectUserList().then(response => {
|
|
|
|
+ this.userList = response.data;
|
|
|
|
+ });
|
|
|
|
+ this.getTreeselectToDept();
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ hxToDept(node) {
|
|
|
|
+ console.log(node)
|
|
|
|
+ this.form.deptId = node.id
|
|
|
|
+ this.form.deptName = node.label
|
|
|
|
+ console.log(this.form)
|
|
|
|
+ this.$refs.form.validateField("deptId")
|
|
|
|
+ },
|
|
|
|
+ getTreeselectToDept() {
|
|
|
|
+ treeselect().then(response => {
|
|
|
|
+ this.deptOptions = response.data;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ a(event) {
|
|
|
|
+ this.form.userID = event.userId
|
|
|
|
+ this.form.nickName = event.nickName
|
|
|
|
+ this.form.sex = event.sex
|
|
|
|
+ this.form.phonenumber = event.phonenumber
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ hx(node) {
|
|
|
|
+ if (node.id == '') {
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ this.form.linGridId = node.id
|
|
|
|
+ this.form.linGridName = node.name
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ /** 转换林业网格层级信息数据结构 */
|
|
|
|
+ normalizer(node) {
|
|
|
|
+ if (node.children && !node.children.length) {
|
|
|
|
+ delete node.children
|
|
|
|
+ }
|
|
|
|
+ return {
|
|
|
|
+ id: node.id,
|
|
|
|
+ label: node.name,
|
|
|
|
+ children: node.children
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ setDataDeptId(e) {
|
|
|
|
+ this.form.deptId = e.deptId
|
|
|
|
+ this.form.deptName = e.deptName
|
|
|
|
+ },
|
|
|
|
+ /** 查询林长管理列表 */
|
|
|
|
+ getList() {
|
|
|
|
+ this.loading = true;
|
|
|
|
+ listUser(this.queryParams).then(response => {
|
|
|
|
+ this.lawenforcementUserList = response.rows;
|
|
|
|
+ this.total = response.total;
|
|
|
|
+ this.loading = false;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ // 取消按钮
|
|
|
|
+ cancel() {
|
|
|
|
+ this.open = false;
|
|
|
|
+ this.reset();
|
|
|
|
+ },
|
|
|
|
+ // 表单重置
|
|
|
|
+ reset() {
|
|
|
|
+ this.form = {
|
|
|
|
+ userId: null,
|
|
|
|
+ nickName: null,
|
|
|
|
+ sex: null,
|
|
|
|
+ phonenumber: null,
|
|
|
|
+ cardNumber: null,
|
|
|
|
+ professional: null,
|
|
|
|
+ educational: null,
|
|
|
|
+ job: null,
|
|
|
|
+ level: null,
|
|
|
|
+ officeLocation: null,
|
|
|
|
+ homeAddress: null,
|
|
|
|
+ certificateNumber: null,
|
|
|
|
+ certificate: null,
|
|
|
|
+ deptId:null,
|
|
|
|
+ deptName:null
|
|
|
|
+ };
|
|
|
|
+ this.resetForm("form");
|
|
|
|
+ },
|
|
|
|
+ /** 搜索按钮操作 */
|
|
|
|
+ handleQuery() {
|
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
|
+ if (!this.queryThisLevel) {
|
|
|
|
+ this.queryParams.deptName = 0
|
|
|
|
+ } else {
|
|
|
|
+ this.queryParams.deptName = null
|
|
|
|
+ }
|
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
|
+ this.getList();
|
|
|
|
+ },
|
|
|
|
+ /** 重置按钮操作 */
|
|
|
|
+ resetQuery() {
|
|
|
|
+ this.resetForm("queryForm");
|
|
|
|
+ this.handleQuery();
|
|
|
|
+ },
|
|
|
|
+ // 多选框选中数据
|
|
|
|
+ handleSelectionChange(selection) {
|
|
|
|
+ this.ids = selection.map(item => item.id)
|
|
|
|
+ this.single = selection.length !== 1
|
|
|
|
+ this.multiple = !selection.length
|
|
|
|
+ },
|
|
|
|
+ /** 新增按钮操作 */
|
|
|
|
+ handleAdd() {
|
|
|
|
+ this.reset();
|
|
|
|
+ this.open = true;
|
|
|
|
+ this.title = "添加人员";
|
|
|
|
+ },
|
|
|
|
+ /** 修改按钮操作 */
|
|
|
|
+ handleUpdate(row) {
|
|
|
|
+ this.reset();
|
|
|
|
+ const userId = row.userId || this.ids
|
|
|
|
+ getUser(userId).then(response => {
|
|
|
|
+ this.form = response.data;
|
|
|
|
+ this.open = true;
|
|
|
|
+ this.title = "修改人员";
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ /** 提交按钮 */
|
|
|
|
+ submitForm() {
|
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ if (this.title === "修改人员") {
|
|
|
|
+ updateUser(this.form).then(response => {
|
|
|
|
+ this.$modal.msgSuccess("修改成功");
|
|
|
|
+ this.open = false;
|
|
|
|
+ this.getList();
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ addUser(this.form).then(response => {
|
|
|
|
+ this.$modal.msgSuccess("新增成功");
|
|
|
|
+ this.open = false;
|
|
|
|
+ this.getList();
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ /** 删除按钮操作 */
|
|
|
|
+ handleDelete(row) {
|
|
|
|
+ const userIds = row.userId || this.ids;
|
|
|
|
+ this.$modal.confirm('是否确认删除人员信息管理编号为"' + userIds + '"的数据项?').then(function () {
|
|
|
|
+ return delUser(userIds);
|
|
|
|
+ }).then(() => {
|
|
|
|
+ this.getList();
|
|
|
|
+ this.$modal.msgSuccess("删除成功");
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ /** 导出按钮操作 */
|
|
|
|
+ handleExport() {
|
|
|
|
+ this.download('lawenforcement/user/export', {
|
|
|
|
+ ...this.queryParams
|
|
|
|
+ }, `user_${new Date().getTime()}.xlsx`)
|
|
|
|
+ },
|
|
|
|
+ //点击按钮修改是否只查询本级部门用户
|
|
|
|
+ changeQueryType() {
|
|
|
|
+ this.queryThisLevel = !this.queryThisLevel;
|
|
|
|
+ },
|
|
|
|
+ /**分页列表方法**/
|
|
|
|
+ pageList() {
|
|
|
|
+ if (!this.queryThisLevel) {
|
|
|
|
+ this.queryParams.deptName = 0
|
|
|
|
+ } else {
|
|
|
|
+ this.queryParams.deptName = null
|
|
|
|
+ }
|
|
|
|
+ this.getList();
|
|
|
|
+ },
|
|
|
|
+ // 筛选节点
|
|
|
|
+ filterNode(value, data) {
|
|
|
|
+ if (!value) return true
|
|
|
|
+ return data.label.indexOf(value) !== -1
|
|
|
|
+ },
|
|
|
|
+ // 节点单击事件
|
|
|
|
+ handleNodeClick(data) {
|
|
|
|
+ this.queryParams.deptId = data.id;
|
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
|
+ if (!this.queryThisLevel) {
|
|
|
|
+ this.queryParams.deptName = 0
|
|
|
|
+ } else {
|
|
|
|
+ this.queryParams.deptName = null
|
|
|
|
+ }
|
|
|
|
+ this.getList();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+</script>
|