Merge remote-tracking branch 'origin/master'
| | |
| | | :model="formData" |
| | | :rules="rules" |
| | | :disabled="readonly" |
| | | label-width="110px" |
| | | label-width="120px" |
| | | > |
| | | <el-form-item label="场景名称" prop="sceneName"> |
| | | <el-input |
| | |
| | | <el-table |
| | | class="command-table" |
| | | :data="list" |
| | | :key="tableKey" |
| | | row-key="id" |
| | | lazy |
| | | :load="loadChildren" |
| | |
| | | type: 1, |
| | | }) |
| | | ElMessage.success('删除成功') |
| | | refreshTable() |
| | | selectedIds.value = [] |
| | | selectedRows.value = [] |
| | | const parentIds = Array.from(new Set(rows.map(item => item.parentId).filter(parentId => !isRootParentId(parentId)))) |
| | |
| | | }) |
| | | } |
| | | |
| | | function refreshChildNodes(parentId) { |
| | | const tableKey = ref(0) |
| | | |
| | | function refreshTable() { |
| | | tableKey.value++ // 强制重新渲染整个表格 |
| | | } |
| | | |
| | | async function refreshChildNodes(parentId) { |
| | | const cache = treeResolveMap.get(parentId) |
| | | if (!cache?.resolve) return |
| | | |
| | | // 先清空 |
| | | cache.resolve([]) |
| | | await nextTick() |
| | | getChildLazyTree({ parentId }) |
| | | .then(res => { |
| | | .then(async res => { |
| | | const children = res?.data?.data ?? [] |
| | | if (cache.row) { |
| | | cache.row.hasChildren = children.length > 0 |
| | | } |
| | | // cache.resolve(children) |
| | | // 重新填充 |
| | | await nextTick() |
| | | cache.resolve(children) |
| | | }) |
| | | .catch(() => { |
| | |
| | | lastActionParentRow.value.hasChildren = true |
| | | } |
| | | lastActionParentRow.value = null |
| | | return |
| | | // return |
| | | } |
| | | lastActionParentRow.value = null |
| | | getList() |
| | |
| | | import request from '@/axios'; |
| | | |
| | | export const getList = (current, size,sysType, params, deptId) => { |
| | | export const getList = (current, size, params, deptId) => { |
| | | return request({ |
| | | url: '/blade-system/user/page', |
| | | method: 'get', |
| | |
| | | ...params, |
| | | current, |
| | | size, |
| | | sysType, |
| | | deptId, |
| | | }, |
| | | }); |
| | |
| | | { |
| | | account: searchParams.value.account, |
| | | realName: searchParams.value.realName, |
| | | sysType: searchParams.value.sysType, |
| | | }, |
| | | searchParams.value.deptId |
| | | ) |