增加隐藏部门
This commit is contained in:
parent
08217b0a69
commit
17e0626e70
12
.umirc.ts
12
.umirc.ts
|
|
@ -1,3 +1,11 @@
|
|||
/*
|
||||
* @Author: Chengliang 1546584672@qq.com
|
||||
* @Date: 2023-08-16 11:22:18
|
||||
* @LastEditors: Chengliang 1546584672@qq.com
|
||||
* @LastEditTime: 2023-08-17 13:59:41
|
||||
* @FilePath: /org-chart-frant/.umirc.ts
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
import { defineConfig } from 'umi';
|
||||
|
||||
export default defineConfig({
|
||||
|
|
@ -19,8 +27,8 @@ export default defineConfig({
|
|||
proxy: {
|
||||
'/api': {
|
||||
// 标识需要进行转换的请求的url
|
||||
//target: 'http://127.0.0.1:8686/api', // 服务端域名 / http://localhost:8686
|
||||
target: 'http://221.226.25.34:11080/api',
|
||||
target: 'http://127.0.0.1:8686/api', // 服务端域名 / http://localhost:8686
|
||||
//target: 'http://221.226.25.34:11080/api',
|
||||
changeOrigin: true, // 允许域名进行转换
|
||||
pathRewrite: { '^/api': '' }, // 将请求url里的ci去掉
|
||||
},
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ export class TopBar extends React.Component {
|
|||
root: undefined,
|
||||
level: '2',
|
||||
fisvitual: '0',
|
||||
hidedept: '0',
|
||||
},
|
||||
open: false,
|
||||
confirmLoading: false,
|
||||
|
|
@ -234,22 +235,22 @@ export class TopBar extends React.Component {
|
|||
<Col span={6}>
|
||||
<Checkbox
|
||||
style={{ marginTop: '5px', marginLeft: 100 }}
|
||||
checked={this.state.requestData.fisvitual == '1'}
|
||||
checked={this.state.requestData.hidedept == '1'}
|
||||
onChange={(e) =>
|
||||
this.handleFormChange({
|
||||
fisvitual: e.target.checked ? '1' : '0',
|
||||
hidedept: e.target.checked ? '1' : '0',
|
||||
})
|
||||
}
|
||||
>
|
||||
显示虚拟组织
|
||||
隐藏部门
|
||||
</Checkbox>
|
||||
<Tooltip
|
||||
title="提示:若启用虚拟组织,需要在分部自定义表增加字段(名称 fblx) 字段类型 下拉框(0实体 1虚拟) 部门自定义表同上(字段名称 bmlx)。"
|
||||
color="#FF7F00"
|
||||
title="提示:开启后将只显示分部组织架构!!!"
|
||||
color="#0082fb"
|
||||
placement="rightTop"
|
||||
>
|
||||
<QuestionCircleOutlined
|
||||
style={{ color: '#FF7F00', cursor: 'pointer', fontSize: 16 }}
|
||||
style={{ color: '#0082fb', cursor: 'pointer', fontSize: 16 }}
|
||||
/>
|
||||
</Tooltip>
|
||||
</Col>
|
||||
|
|
@ -269,6 +270,28 @@ export class TopBar extends React.Component {
|
|||
</Col>
|
||||
</Row>
|
||||
<Row style={{ marginTop: '15px' }}>
|
||||
<Col span={6}>
|
||||
<Checkbox
|
||||
style={{ marginTop: '5px' }}
|
||||
checked={this.state.requestData.fisvitual == '1'}
|
||||
onChange={(e) =>
|
||||
this.handleFormChange({
|
||||
fisvitual: e.target.checked ? '1' : '0',
|
||||
})
|
||||
}
|
||||
>
|
||||
显示虚拟组织
|
||||
</Checkbox>
|
||||
<Tooltip
|
||||
title="提示:若启用虚拟组织,需要在分部自定义表增加字段(名称 fblx) 字段类型 下拉框(0实体 1虚拟) 部门自定义表同上(字段名称 bmlx)。"
|
||||
color="#0082fb"
|
||||
placement="rightTop"
|
||||
>
|
||||
<QuestionCircleOutlined
|
||||
style={{ color: '#0082fb', cursor: 'pointer', fontSize: 16 }}
|
||||
/>
|
||||
</Tooltip>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Button
|
||||
type="primary"
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ export default function companyPage() {
|
|||
// 获取数据
|
||||
useEffect(() => {
|
||||
d3.json(
|
||||
'/api/bs/hrmorganization/orgchart/companyData?fclass=0&fisvitual=0&root=0&level=2&id=0',
|
||||
'/api/bs/hrmorganization/orgchart/companyData?fclass=0&fisvitual=0&hidedept=0&root=0&level=2&id=0',
|
||||
).then((data) => {
|
||||
setData(data.data);
|
||||
setHasRight(data?.hasRight);
|
||||
|
|
@ -326,7 +326,12 @@ export default function companyPage() {
|
|||
const timeLineSearch = (timeline) => {
|
||||
setTimelineId(timeline.id);
|
||||
const fclass = topbar.state.requestData.fclass;
|
||||
const resetParams = { root: undefined, level: '2', fisvitual: '0' };
|
||||
const resetParams = {
|
||||
root: undefined,
|
||||
level: '2',
|
||||
fisvitual: '0',
|
||||
hidedept: '0',
|
||||
};
|
||||
topbar.handleFormChange({ ...resetParams });
|
||||
topbar.getNodeTreeNode(
|
||||
`/api/bs/hrmorganization/orgchart/getSubCompanyTree?fclass=${fclass}&id=${timeline.id}`,
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ export default function userPage() {
|
|||
// 获取数据
|
||||
useEffect(() => {
|
||||
document.cookie =
|
||||
'ecology_JSessionid=aaaUMPsdM5DKIgXzYrwMy; JSESSIONID=aaaUMPsdM5DKIgXzYrwMy; __randcode__=f5b6cc86-28ff-416b-bc87-569246714d54; loginidweaver=1; languageidweaver=7; loginuuids=1';
|
||||
'ecology_JSessionid=aaaO70i_jp5alhVYlecOy; JSESSIONID=aaaO70i_jp5alhVYlecOy; __randcode__=0c210b8f-0f12-4d02-bd51-6aece5794350; Systemlanguid=7; languageidweaver=7; loginidweaver=sysadmin; loginuuids=1';
|
||||
d3.json(
|
||||
// "/user/data"
|
||||
'/api/bs/hrmorganization/orgchart/userData?fclass=0&fisvitual=0&root=0&level=3&id=0',
|
||||
|
|
|
|||
Loading…
Reference in New Issue