|
|
|
@ -315,7 +315,7 @@ const attrList = computed(() => { |
|
|
|
// console.log("判断校验规则--->", item); |
|
|
|
if (typeof controlData.value.customRules == "object") { |
|
|
|
if (Array.isArray(controlData.value.customRules)) { |
|
|
|
let otherPick = []; |
|
|
|
let otherPick: any[] = []; |
|
|
|
controlData.value.customRules.forEach((item: any) => { |
|
|
|
// console.log("判断校验规则-1-->", item); |
|
|
|
if (item.type == ValidateText.type) { |
|
|
|
@ -2786,13 +2786,13 @@ function removeTreeNode(tree: any, targetId: any) { |
|
|
|
const clonedTree = JSON.parse(JSON.stringify(tree)); |
|
|
|
|
|
|
|
// 递归处理节点 |
|
|
|
function processNode(node) { |
|
|
|
function processNode(node: { id: any; children: any[]; }) { |
|
|
|
// 命中目标节点时返回null进行过滤 |
|
|
|
if (node.id === targetId) return null; |
|
|
|
|
|
|
|
// 递归处理子节点并过滤空值 |
|
|
|
if (node.children?.length) { |
|
|
|
node.children = node.children.map((child) => processNode(child)).filter(Boolean); |
|
|
|
node.children = node.children.map((child: any) => processNode(child)).filter(Boolean); |
|
|
|
} |
|
|
|
|
|
|
|
return node; |
|
|
|
@ -4061,15 +4061,18 @@ watch( |
|
|
|
); |
|
|
|
|
|
|
|
//选择用户数据范围 |
|
|
|
|
|
|
|
const tabsRef = ref(null); |
|
|
|
const userRangeDialogFlag = ref(false) |
|
|
|
function handleUserRangeDialogFlag(){ |
|
|
|
userRangeDialogFlag.value = true |
|
|
|
if(controlData.value.control.queryBy=='role'){ |
|
|
|
queryAllRole() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
function checkedIdListChangedIndex(val:any){ |
|
|
|
//console.log(val) |
|
|
|
controlData.value.control.range = val |
|
|
|
controlData.value.control.orgRange = val |
|
|
|
} |
|
|
|
|
|
|
|
let componentKey = 0 |
|
|
|
@ -4079,10 +4082,74 @@ function reRenderComponent() { |
|
|
|
} |
|
|
|
|
|
|
|
function handleExpandTabChange(){ |
|
|
|
controlData.value.control.range = [] |
|
|
|
console.log("切换页签") |
|
|
|
if(controlData.value.control.queryBy=='role'){ |
|
|
|
queryAllRole() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function getAllRole() { |
|
|
|
return request({ |
|
|
|
url: "/javasys/lowCode/manCont/getAllRole", |
|
|
|
method: "get", |
|
|
|
}); |
|
|
|
} |
|
|
|
const tabsData = ref([]) |
|
|
|
function queryAllRole(){ |
|
|
|
getAllRole().then(({ data }) => { |
|
|
|
//console.log(data) |
|
|
|
tabsData.value = data |
|
|
|
|
|
|
|
|
|
|
|
}).finally(()=>{ |
|
|
|
//activeName.value = tabsData.value[2]?.name |
|
|
|
setTimeout(()=>{ |
|
|
|
activeTab.value = tabsData.value[0]?.id |
|
|
|
//alert(tabsData.value[0]?.id) |
|
|
|
//activeName.value = tabsData.value[0]?.id |
|
|
|
handleLeftTabChange(activeTab.value) |
|
|
|
},500) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
function getPersonByRoleId(id:string){ |
|
|
|
return request({ |
|
|
|
url: "/javasys/lowCode/manCont/getPersonByRoleId", |
|
|
|
method: "post", |
|
|
|
data: { |
|
|
|
id: id, |
|
|
|
}, |
|
|
|
}); |
|
|
|
} |
|
|
|
//const activeName = ref('1') |
|
|
|
const activeTab = ref('') |
|
|
|
const expandTableData = ref() |
|
|
|
function handleLeftTabChange(tab: any){ |
|
|
|
getPersonByRoleId(tab).then(({ data }) => { |
|
|
|
//console.log(data) |
|
|
|
expandTableData.value = data |
|
|
|
|
|
|
|
//activeName.value = tab |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
import type { TableInstance } from 'element-plus' |
|
|
|
const multipleTableRef = ref<TableInstance>() |
|
|
|
|
|
|
|
const multipleSelection = ref<User[]>([]) |
|
|
|
|
|
|
|
interface User { |
|
|
|
id: number |
|
|
|
name: string |
|
|
|
} |
|
|
|
|
|
|
|
const handleSelectionChange = (val: User[]) => { |
|
|
|
console.log(1111) |
|
|
|
multipleSelection.value = val |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -4522,7 +4589,8 @@ const aiAgentList = ref([ |
|
|
|
|
|
|
|
<el-row v-else-if="item.type === 'expand-user'"> |
|
|
|
|
|
|
|
{{controlData.control.range}} |
|
|
|
{{controlData.control.orgRange}} |
|
|
|
{{controlData.control.roleRange}} |
|
|
|
<el-button @click="handleUserRangeDialogFlag">可选用户设置</el-button> |
|
|
|
|
|
|
|
</el-row> |
|
|
|
@ -5684,29 +5752,95 @@ const aiAgentList = ref([ |
|
|
|
<el-dialog |
|
|
|
v-model="userRangeDialogFlag" |
|
|
|
title="可选用户设置" |
|
|
|
top="20px" |
|
|
|
style="margin-top:70px;margin-left:270px;height:650px;width:750px" |
|
|
|
width="840" |
|
|
|
|
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<el-tabs v-model="controlData.control.queryBy" class="demo-tabs" @tab-change="handleExpandTabChange" > |
|
|
|
<el-tab-pane label="根据组织筛选" name="org"> |
|
|
|
<TransferSelectUserRange v-if="controlData.control.queryBy=='org'" :key="componentKey" :data="transferSelectUserRangeData" :selected-value="controlData.control.range" @checked-id-list-changed="checkedIdListChangedIndex" @re-render-component="reRenderComponent" /> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="根据角色筛选" name="role"> |
|
|
|
<el-tabs v-model="controlData.control.queryBy" style="width:100%;" @tab-change="handleExpandTabChange" > |
|
|
|
<el-tab-pane label="根据角色筛选" name="role"> |
|
|
|
|
|
|
|
<div > |
|
|
|
|
|
|
|
<el-row> |
|
|
|
<el-col :span="17" style="padding: 0;border-right: 0px solid black;"> |
|
|
|
<el-tabs ref="tabsRef" v-model="activeTab" tab-position="left" @tab-change="handleLeftTabChange" > |
|
|
|
<el-tab-pane |
|
|
|
v-for="tab in tabsData" |
|
|
|
:key="tab.id" |
|
|
|
:label="tab.name" |
|
|
|
:name="tab.id" |
|
|
|
> |
|
|
|
<div> |
|
|
|
<el-input placeholder="请输入用户名" v-model="userName" clearable style="width: 50%; margin-bottom: 10px;margin-left: 3px;"/> |
|
|
|
<el-button type="primary" @click="searchClick" style="margin-left: 10px; margin-bottom: 10px;">查询</el-button> |
|
|
|
<el-button @click="resetClick" style="margin-bottom: 10px;">重置</el-button> |
|
|
|
</div> |
|
|
|
<div class="expandTable"> |
|
|
|
<el-table ref="multipleTableRef" :data="expandTableData" style="width: 100%; height: 440px" :row-style="{ height: '35px' }" :cell-style="{ padding: '1.5px 0' }" @selection-change="handleSelectionChange"> |
|
|
|
<!-- <el-table-column prop="userName" label="照片" width="70px" align="center"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-avatar |
|
|
|
v-if="scope.row.icon != ''" |
|
|
|
shape="square" |
|
|
|
:size="30" |
|
|
|
:src="scope.row.icon" |
|
|
|
/> |
|
|
|
<el-avatar v-else shape="square" :size="30" :src="UserRole" /> |
|
|
|
</template> |
|
|
|
</el-table-column> --> |
|
|
|
<el-table-column prop="name" label="姓名" width="160px" align="left"> |
|
|
|
<template #default="scope"> |
|
|
|
{{ scope.row.name }}({{ scope.row.number }}) |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<!-- <el-table-column prop="tel" label="联系方式" width="120px" align="left" /> --> |
|
|
|
<el-table-column prop="nickName" label="部门" width="160px" align="left"> |
|
|
|
<template #default="{ row }"> |
|
|
|
{{row.deparment}} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column type="selection" width="55" /> |
|
|
|
|
|
|
|
</el-table> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div class="expandPage"> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</el-tab-pane> |
|
|
|
|
|
|
|
</el-tabs> |
|
|
|
</el-col> |
|
|
|
<el-col :span="1" style="display: flex; align-items: center;" > |
|
|
|
<el-icon style="font-size: large;cursor: pointer;" @click="gotoRight"><ArrowRightBold /></el-icon> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6" style="padding: 0"> |
|
|
|
{{multipleSelection}} |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
<div style="width: 600px;"> |
|
|
|
根据角色筛选 |
|
|
|
|
|
|
|
</div> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="根据组织筛选" name="org"> |
|
|
|
<TransferSelectUserRange :key="componentKey" :data="transferSelectUserRangeData" :selected-value="controlData.control.orgRange" @checked-id-list-changed="checkedIdListChangedIndex" @re-render-component="reRenderComponent" /> |
|
|
|
</el-tab-pane> |
|
|
|
|
|
|
|
|
|
|
|
</el-tabs> |
|
|
|
|
|
|
|
<div style="position: absolute; top:587px;left:616px"> |
|
|
|
<el-button type="primary" @click="userRangeDialogFlag = false"> |
|
|
|
确定 |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<template #footer> |
|
|
|
<div class="dialog-footer"> |
|
|
|
<el-button type="primary" @click="userRangeDialogFlag = false"> |
|
|
|
确定 |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|