Commit 201850fa authored by 沈翠玲's avatar 沈翠玲

分配

parent 1164b2c9
......@@ -200,6 +200,7 @@
import { RefreshRight } from '@element-plus/icons-vue';
import { ElInputNumber, ElMessage } from 'element-plus';
import Decimal from 'decimal.js';
import { useUserStore } from '@/stores/modules/user';
import {
getLoanDistribute,
distributeLoan,
......@@ -214,7 +215,7 @@
import { useAuthStore } from '@/stores/modules/auth';
const emits = defineEmits(['success']);
const { authButtonListGet } = useAuthStore(); // 获取用户权限列表
const userStore = useUserStore();
const data = ref([]);
const mytransfer = ref();
const tabledata = ref([]);
......@@ -247,10 +248,19 @@
});
};
const getTree = () => {
let name = ''
if (userStore.userInfo?.tenants && userStore.userInfo?.tenants.length > 0) {
if (userStore.userInfo?.tenants.length < 2) {
name = userStore.userInfo?.tenants[0].name
} else {
name = userStore.tenant.name
}
}
getTenantPage({
current: 1,
size: 999999999,
status: 'enable',
name: name || null
}).then((res) => {
if (res.success) {
data.value = res.result.content;
......@@ -295,11 +305,12 @@
currentTenant.value = null;
};
const openModal = (param, select) => {
console.log('select', select);
lonsArr.value = select;
showModal.value = true;
pageParams.value = param;
currentAllBtn.value = null;
console.log('sadasda')
getTree();
step.value = 0;
if (!authButtonListGet.includes('allcation_for_tenant')) {
......@@ -318,6 +329,15 @@
SaveBol.value = false;
currentTenant.value = null;
editRowIndex.value = -1;
if (userStore.userInfo?.tenants && userStore.userInfo?.tenants.length > 0) {
if (userStore.userInfo?.tenants.length < 2) {
handleNodeClick(userStore.userInfo?.tenants[0])
currentTenant.value = userStore.userInfo?.tenants[0].id;
} else {
handleNodeClick(userStore.tenant)
currentTenant.value = userStore.tenant.id;
}
}
tabledata.value = [];
alltabledata.value = [];
checked1.value = false;
......@@ -421,7 +441,6 @@
param = { ...pageParams.value };
}
getStatisis(param, currentTenant.value);
getTenantUsers({tenantId: data1.id, roleCode: 'CPE'}).then(res => {
if (res.success && res.result) {
alltabledata.value = res.result
......
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