|
@@ -9,13 +9,13 @@
|
|
|
<div v-show="activeIndex === 0" class="content">
|
|
|
<div class="left-content">
|
|
|
<div class="search-box">
|
|
|
- <el-input v-model="queryParams.keyword" class="custom-input" placeholder="组织架构搜索" style="width: 487px" @keyup.enter="getTree">
|
|
|
+ <el-input v-model="queryParams.label" class="custom-input" placeholder="组织架构搜索" style="width: 487px" @keyup.enter="getTree">
|
|
|
<template #prefix>
|
|
|
<el-icon class="el-input__icon"><search /></el-icon>
|
|
|
</template>
|
|
|
</el-input>
|
|
|
<el-select
|
|
|
- v-model="queryParams.value1"
|
|
|
+ v-model="queryParams2.value2"
|
|
|
class="custom-select select-box"
|
|
|
placeholder="全部"
|
|
|
popper-class="custom-select-popper"
|
|
@@ -23,7 +23,7 @@
|
|
|
>
|
|
|
<el-option v-for="level in options" :key="level.value" :label="level.name" :value="level.value"></el-option>
|
|
|
</el-select>
|
|
|
- <el-input v-model="queryParams.keyword" class="custom-input" placeholder="组织架构搜索">
|
|
|
+ <el-input v-model="queryParams2.name" class="custom-input" placeholder="人员姓名搜索" @keyup.enter="handleNodeClick(false)">
|
|
|
<template #prefix>
|
|
|
<el-icon class="el-input__icon"><search /></el-icon>
|
|
|
</template>
|
|
@@ -113,10 +113,12 @@ const menu = ref([{ name: '视频会商' }, { name: '无人机' }, { name: '单
|
|
|
const treeData = ref([]);
|
|
|
const userList = ref([]);
|
|
|
const queryParams = reactive({
|
|
|
- label: '',
|
|
|
- value1: ''
|
|
|
+ label: ''
|
|
|
+});
|
|
|
+const queryParams2 = reactive({
|
|
|
+ name: '',
|
|
|
+ value2: ''
|
|
|
});
|
|
|
-
|
|
|
const getTree = () => {
|
|
|
getAvconDeptTree(queryParams).then((res) => {
|
|
|
treeData.value = res.data;
|
|
@@ -140,8 +142,13 @@ const getCheckedClass = () => {
|
|
|
}
|
|
|
return res;
|
|
|
};
|
|
|
+let clickNodeId = ref('');
|
|
|
const handleNodeClick = (item) => {
|
|
|
- getAvconDeptList(item.id, {}).then((res) => {
|
|
|
+ if (!!item) {
|
|
|
+ clickNodeId.value = item.id;
|
|
|
+ }
|
|
|
+ const id = item ? item.id : !!clickNodeId.value ? clickNodeId.value : treeData.value[0].id;
|
|
|
+ getAvconDeptList(id, queryParams2).then((res) => {
|
|
|
res.data.forEach((item) => {
|
|
|
const index = selectList.value.findIndex((item2) => item2.id === item.id);
|
|
|
item.checked = index > -1;
|