Merge branch 'master' of http://118.178.224.202:3000/ewide/ewide_core
This commit is contained in:
@@ -59,8 +59,8 @@ namespace Ewide.Core.Service
|
|||||||
var orgs = await _sysOrgRep.DetachedEntities
|
var orgs = await _sysOrgRep.DetachedEntities
|
||||||
.Where((name, u => EF.Functions.Like(u.Name, $"%{input.Name.Trim()}%")), // 根据机构名称模糊查询
|
.Where((name, u => EF.Functions.Like(u.Name, $"%{input.Name.Trim()}%")), // 根据机构名称模糊查询
|
||||||
(id, u => u.Id == input.Id.Trim()), // 根据机构id查询
|
(id, u => u.Id == input.Id.Trim()), // 根据机构id查询
|
||||||
(pId, u => EF.Functions.Like(u.Pids, $"%[{input.Pid.Trim()}]%")
|
(pId, u => input.TreeNodeDataScope.GetValueOrDefault(1) == 2 ? (EF.Functions.Like(u.Pids, $"%[{input.Pid.Trim()}]%")
|
||||||
|| u.Id == input.Pid.Trim())) // 根据父机构id查询
|
|| u.Id == input.Pid.Trim()) : u.Id == input.Pid.Trim() )) // 根据父机构id查询
|
||||||
.Where(dataScopeList.Count > 0, u => dataScopeList.Contains(u.Id)) // 非管理员范围限制
|
.Where(dataScopeList.Count > 0, u => dataScopeList.Contains(u.Id)) // 非管理员范围限制
|
||||||
.Where(u => u.Status != CommonStatus.DELETED).OrderBy(u => u.Sort)
|
.Where(u => u.Status != CommonStatus.DELETED).OrderBy(u => u.Sort)
|
||||||
.ToPageData<SysOrg,OrgOutput>(input);
|
.ToPageData<SysOrg,OrgOutput>(input);
|
||||||
|
|||||||
@@ -79,8 +79,8 @@ namespace Ewide.Core.Service
|
|||||||
.Where(!string.IsNullOrEmpty(searchValue), x => (x.n.u.Account.Contains(input.SearchValue) ||
|
.Where(!string.IsNullOrEmpty(searchValue), x => (x.n.u.Account.Contains(input.SearchValue) ||
|
||||||
x.n.u.Name.Contains(input.SearchValue) ||
|
x.n.u.Name.Contains(input.SearchValue) ||
|
||||||
x.n.u.Phone.Contains(input.SearchValue)))
|
x.n.u.Phone.Contains(input.SearchValue)))
|
||||||
.Where(!string.IsNullOrEmpty(pid), x => (x.n.e.OrgId == pid ||
|
.Where(!string.IsNullOrEmpty(pid), x => input.TreeNodeDataScope.GetValueOrDefault(1) == 2 ? (x.n.e.OrgId == pid ||
|
||||||
x.o.Pids.Contains($"[{pid.Trim()}]")))
|
x.o.Pids.Contains($"[{pid.Trim()}]")) : x.n.e.OrgId == pid )
|
||||||
.Where(input.SearchStatus >= 0, x => x.n.u.Status == input.SearchStatus)
|
.Where(input.SearchStatus >= 0, x => x.n.u.Status == input.SearchStatus)
|
||||||
.Where(!superAdmin, x => x.n.u.AdminType != AdminType.SuperAdmin)
|
.Where(!superAdmin, x => x.n.u.AdminType != AdminType.SuperAdmin)
|
||||||
.Where(!superAdmin && dataScopes.Count > 0, x => dataScopes.Contains(x.n.e.OrgId))
|
.Where(!superAdmin && dataScopes.Count > 0, x => dataScopes.Contains(x.n.e.OrgId))
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { Component } from 'react'
|
import React, { Component } from 'react'
|
||||||
import { Button, Card, Form, Input, message as Message, Popconfirm } from 'antd'
|
import { Button, Card, Form, Input, message as Message, Popconfirm, Select } from 'antd'
|
||||||
import {
|
import {
|
||||||
AntIcon,
|
AntIcon,
|
||||||
Auth,
|
Auth,
|
||||||
@@ -159,7 +159,10 @@ export default class index extends Component {
|
|||||||
...query,
|
...query,
|
||||||
pid: this.selectId,
|
pid: this.selectId,
|
||||||
}
|
}
|
||||||
|
if (params) {
|
||||||
|
params.sortField = 'areaCode'
|
||||||
|
params.sortOrder = 'ascend'
|
||||||
|
}
|
||||||
const { data } = await apiAction.page({
|
const { data } = await apiAction.page({
|
||||||
...params,
|
...params,
|
||||||
...query,
|
...query,
|
||||||
@@ -270,6 +273,17 @@ export default class index extends Component {
|
|||||||
<Form.Item label="机构名称" name="name">
|
<Form.Item label="机构名称" name="name">
|
||||||
<Input autoComplete="off" placeholder="请输入机构名称" />
|
<Input autoComplete="off" placeholder="请输入机构名称" />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item label="区域范围" name="treeNodeDataScope">
|
||||||
|
<Select
|
||||||
|
allowClear
|
||||||
|
placeholder="请选择状态"
|
||||||
|
className="w-200"
|
||||||
|
defaultValue={1}
|
||||||
|
>
|
||||||
|
<Select.Option value={1}>只看本级</Select.Option>
|
||||||
|
<Select.Option value={2}>查看本级及以下</Select.Option>
|
||||||
|
</Select>
|
||||||
|
</Form.Item>
|
||||||
</Auth>
|
</Auth>
|
||||||
}
|
}
|
||||||
operator={
|
operator={
|
||||||
|
|||||||
@@ -322,6 +322,17 @@ export default class index extends Component {
|
|||||||
})}
|
})}
|
||||||
</Select>
|
</Select>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item label="区域范围" name="treeNodeDataScope">
|
||||||
|
<Select
|
||||||
|
allowClear
|
||||||
|
placeholder="请选择状态"
|
||||||
|
className="w-200"
|
||||||
|
defaultValue={1}
|
||||||
|
>
|
||||||
|
<Select.Option value={1}>只看本级</Select.Option>
|
||||||
|
<Select.Option value={2}>查看本级及以下</Select.Option>
|
||||||
|
</Select>
|
||||||
|
</Form.Item>
|
||||||
</Auth>
|
</Auth>
|
||||||
}
|
}
|
||||||
operator={
|
operator={
|
||||||
|
|||||||
Reference in New Issue
Block a user