|
|
@ -30,14 +30,32 @@ |
|
|
<!-- </van-checkbox-group>--> |
|
|
<!-- </van-checkbox-group>--> |
|
|
<van-checkbox-group v-model="checked"> |
|
|
<van-checkbox-group v-model="checked"> |
|
|
<van-cell-group inset> |
|
|
<van-cell-group inset> |
|
|
<van-cell v-for="(item, index) in dataList" :key="item" clickable> |
|
|
<van-cell v-for="(item, index) in dataList" :key="item" @click="toDrill(item.deptId, item.parentId)"> |
|
|
|
|
|
<div style="display: flex; justify-content: space-between;"> |
|
|
|
|
|
<!-- <div style="width: 70%;" @click="toggle(item.deptId)">--> |
|
|
|
|
|
<!-- <van-checkbox :name="item.deptId+';-;'+item.deptName" :ref="el => checkboxRefs[item.deptId] = el" @click.stop>--> |
|
|
|
|
|
<!-- {{item.deptName}}--> |
|
|
|
|
|
<!-- </van-checkbox>--> |
|
|
|
|
|
<!-- </div>--> |
|
|
|
|
|
<!-- <div style="width: 30%;" @click="toDrill(item.deptId, item.parentId)"><van-icon name="arrow" size="0.5rem" /></div>--> |
|
|
|
|
|
|
|
|
|
|
|
<div style="width: 70%; text-align: left;"> |
|
|
|
|
|
{{item.deptName}} |
|
|
|
|
|
</div> |
|
|
|
|
|
<div style="width: 30%;"><van-icon name="arrow" size="0.5rem" /></div> |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
</van-cell> |
|
|
|
|
|
</van-cell-group> |
|
|
|
|
|
|
|
|
|
|
|
<van-cell-group inset> |
|
|
|
|
|
<van-cell v-for="(item, index) in userList" :key="item" clickable> |
|
|
<div style="display: flex; justify-content: space-between;"> |
|
|
<div style="display: flex; justify-content: space-between;"> |
|
|
<div style="width: 70%;" @click="toggle(item.deptId)"> |
|
|
<div style="width: 70%;" @click="toggle(item.deptId)"> |
|
|
<van-checkbox :name="item.deptId+';-;'+item.deptName" :ref="el => checkboxRefs[item.deptId] = el" @click.stop> |
|
|
<van-checkbox :name="item.userId+';-;'+item.userName" :ref="el => checkboxRefs[item.deptId] = el" @click.stop> |
|
|
{{item.deptName}} |
|
|
{{item.userName}} |
|
|
</van-checkbox> |
|
|
</van-checkbox> |
|
|
</div> |
|
|
</div> |
|
|
<div style="width: 30%;" @click="toDrill(item.deptId, item.parentId)"><van-icon name="arrow" size="0.5rem" /></div> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</van-cell> |
|
|
</van-cell> |
|
|
</van-cell-group> |
|
|
</van-cell-group> |
|
|
@ -50,7 +68,7 @@ |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import {ref} from 'vue' |
|
|
import {ref} from 'vue' |
|
|
import {queryDepts, nextDeptByparentId} from '../../api/user' |
|
|
import {queryDepts, nextDeptByparentId, queryUsersNoPermission} from '../../api/user' |
|
|
import {Icon} from 'vant'; |
|
|
import {Icon} from 'vant'; |
|
|
|
|
|
|
|
|
const {useCommon} = $globalStore |
|
|
const {useCommon} = $globalStore |
|
|
@ -78,6 +96,7 @@ |
|
|
checked: ref([]), |
|
|
checked: ref([]), |
|
|
checkboxRefs: ref([]), |
|
|
checkboxRefs: ref([]), |
|
|
nextParentId: '0', |
|
|
nextParentId: '0', |
|
|
|
|
|
userList: [], |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
@ -107,7 +126,17 @@ |
|
|
}, |
|
|
}, |
|
|
queryList() { |
|
|
queryList() { |
|
|
queryDepts(this.searchParam, success => { |
|
|
queryDepts(this.searchParam, success => { |
|
|
this.dataList = success.data |
|
|
if (null != success.data && success.data.length > 0) { |
|
|
|
|
|
this.userList = []; |
|
|
|
|
|
this.dataList = success.data |
|
|
|
|
|
} else { |
|
|
|
|
|
// 没有底层数据说明到叶子节点了 . 根据部门id去查询相关用户信息 |
|
|
|
|
|
queryUsersNoPermission({"deptId": this.searchParam.parentId}, success => { |
|
|
|
|
|
this.dataList = []; |
|
|
|
|
|
this.userList = success.data; |
|
|
|
|
|
}, error => { |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
}, error => { |
|
|
}, error => { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|