批量更新租户规则
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
<template></template>
|
||||
<script setup lang="ts"></script>
|
||||
<style lang="less" scoped></style>
|
||||
@@ -0,0 +1,3 @@
|
||||
<template></template>
|
||||
<script setup lang="ts"></script>
|
||||
<style lang="less" scoped></style>
|
||||
@@ -79,7 +79,7 @@ const total = ref(0);
|
||||
const editRef = ref<any>(null);
|
||||
|
||||
const authStore = useAuthStore();
|
||||
const tenantId = (authStore.user as any)?.tenant_id;
|
||||
const tenantId = (authStore.user as any)?.tid;
|
||||
|
||||
// console.log(tenantId);
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ const loading = ref(false)
|
||||
const formRef = ref<FormInstance>()
|
||||
const isEdit = ref(false)
|
||||
const authStore = useAuthStore()
|
||||
const tenantId = (authStore.user as any)?.tenant_id
|
||||
const tenantId = (authStore.user as any)?.tid
|
||||
const leaderList = ref([])
|
||||
const formData = reactive({
|
||||
id: 0,
|
||||
@@ -192,7 +192,7 @@ const handleSubmit = async () => {
|
||||
}
|
||||
})
|
||||
if (tenantId) {
|
||||
submitData.tenant_id = tenantId
|
||||
submitData.tid = tenantId
|
||||
}
|
||||
res = await editOrganization(formData.id, submitData)
|
||||
} else {
|
||||
@@ -205,7 +205,7 @@ const handleSubmit = async () => {
|
||||
}
|
||||
})
|
||||
if (tenantId) {
|
||||
submitData.append('tenant_id', String(tenantId))
|
||||
submitData.append('tid', String(tenantId))
|
||||
}
|
||||
res = await createOrganization(submitData)
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ import { getOrganizationList, getOrganizationDetail, deleteOrganization } from '
|
||||
// 树形结构数据(与后台字段对应)
|
||||
interface TreeNode {
|
||||
id: number
|
||||
tenant_id?: number
|
||||
tid?: number
|
||||
org_name: string
|
||||
org_code?: string
|
||||
parent_id?: number
|
||||
@@ -153,7 +153,7 @@ const buildTree = (list: any[]): TreeNode[] => {
|
||||
list.forEach(item => {
|
||||
const node: TreeNode = {
|
||||
id: item.id,
|
||||
tenant_id: item.tenant_id,
|
||||
tid: item.tid,
|
||||
org_name: item.org_name,
|
||||
org_code: item.org_code,
|
||||
parent_id: item.parent_id,
|
||||
@@ -193,7 +193,7 @@ const loadOrganizationDetail = async (id: number) => {
|
||||
if (data) {
|
||||
selectedNode.value = {
|
||||
id: data.id,
|
||||
tenant_id: data.tenant_id,
|
||||
tid: data.tid,
|
||||
org_name: data.org_name,
|
||||
org_code: data.org_code,
|
||||
parent_id: data.parent_id,
|
||||
|
||||
Reference in New Issue
Block a user