Commit f9b4416e authored by 李鹏 's avatar 李鹏

修改角色分配筛选条件

parent 7cc61324
......@@ -107,7 +107,7 @@
<div class="right">
<el-cascader
v-model="userFilter.organization_id"
:options="orgList"
:options="userOrgList"
placeholder="请选择组织"
:props="{
expandTrigger: 'hover',
......@@ -168,7 +168,7 @@
<script setup>
import { Search } from "@element-plus/icons-vue";
import { reactive, toRefs, ref, onBeforeMount, nextTick } from "vue";
import { reactive, toRefs, ref, computed, onBeforeMount, nextTick } from "vue";
import axios from "@/request/http.js";
import { ElMessage } from "element-plus";
import { useRouter } from "vue-router";
......@@ -257,6 +257,23 @@ const userState = reactive({
userSelection: [],
distributeDialog: false, // 分配用户弹窗
});
const userOrgList = computed(() => {
let temp = [];
switch (state.actionRow.role_type) {
case 0:
temp = userState.orgList;
break;
case 1:
temp = userState.orgList.slice(1, userState.orgList.length);
break;
case 2:
temp = userState.orgList.slice(0, 1);
break;
default:
break;
}
return temp;
});
// 获取角色列表
const getRoleRows = () => {
let params = { ...state.filter };
......@@ -351,7 +368,6 @@ const getUserList = () => {
};
axios.get(`/v1/api/role/allotment/list`, { params }).then((res) => {
if (res.data.code == 200) {
console.log(res.data.data);
userState.userRows = res.data.data || [];
userState.total = res.data.total;
nextTick(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment