增加隐藏部门
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';
|
import { defineConfig } from 'umi';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
|
@ -19,8 +27,8 @@ export default defineConfig({
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
// 标识需要进行转换的请求的url
|
// 标识需要进行转换的请求的url
|
||||||
//target: 'http://127.0.0.1:8686/api', // 服务端域名 / http://localhost:8686
|
target: 'http://127.0.0.1:8686/api', // 服务端域名 / http://localhost:8686
|
||||||
target: 'http://221.226.25.34:11080/api',
|
//target: 'http://221.226.25.34:11080/api',
|
||||||
changeOrigin: true, // 允许域名进行转换
|
changeOrigin: true, // 允许域名进行转换
|
||||||
pathRewrite: { '^/api': '' }, // 将请求url里的ci去掉
|
pathRewrite: { '^/api': '' }, // 将请求url里的ci去掉
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ export class TopBar extends React.Component {
|
||||||
root: undefined,
|
root: undefined,
|
||||||
level: '2',
|
level: '2',
|
||||||
fisvitual: '0',
|
fisvitual: '0',
|
||||||
|
hidedept: '0',
|
||||||
},
|
},
|
||||||
open: false,
|
open: false,
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
|
|
@ -234,22 +235,22 @@ export class TopBar extends React.Component {
|
||||||
<Col span={6}>
|
<Col span={6}>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
style={{ marginTop: '5px', marginLeft: 100 }}
|
style={{ marginTop: '5px', marginLeft: 100 }}
|
||||||
checked={this.state.requestData.fisvitual == '1'}
|
checked={this.state.requestData.hidedept == '1'}
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
this.handleFormChange({
|
this.handleFormChange({
|
||||||
fisvitual: e.target.checked ? '1' : '0',
|
hidedept: e.target.checked ? '1' : '0',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
显示虚拟组织
|
隐藏部门
|
||||||
</Checkbox>
|
</Checkbox>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title="提示:若启用虚拟组织,需要在分部自定义表增加字段(名称 fblx) 字段类型 下拉框(0实体 1虚拟) 部门自定义表同上(字段名称 bmlx)。"
|
title="提示:开启后将只显示分部组织架构!!!"
|
||||||
color="#FF7F00"
|
color="#0082fb"
|
||||||
placement="rightTop"
|
placement="rightTop"
|
||||||
>
|
>
|
||||||
<QuestionCircleOutlined
|
<QuestionCircleOutlined
|
||||||
style={{ color: '#FF7F00', cursor: 'pointer', fontSize: 16 }}
|
style={{ color: '#0082fb', cursor: 'pointer', fontSize: 16 }}
|
||||||
/>
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
@ -269,6 +270,28 @@ export class TopBar extends React.Component {
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
<Row style={{ marginTop: '15px' }}>
|
<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}>
|
<Col span={8}>
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ export default function companyPage() {
|
||||||
// 获取数据
|
// 获取数据
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
d3.json(
|
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) => {
|
).then((data) => {
|
||||||
setData(data.data);
|
setData(data.data);
|
||||||
setHasRight(data?.hasRight);
|
setHasRight(data?.hasRight);
|
||||||
|
|
@ -326,7 +326,12 @@ export default function companyPage() {
|
||||||
const timeLineSearch = (timeline) => {
|
const timeLineSearch = (timeline) => {
|
||||||
setTimelineId(timeline.id);
|
setTimelineId(timeline.id);
|
||||||
const fclass = topbar.state.requestData.fclass;
|
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.handleFormChange({ ...resetParams });
|
||||||
topbar.getNodeTreeNode(
|
topbar.getNodeTreeNode(
|
||||||
`/api/bs/hrmorganization/orgchart/getSubCompanyTree?fclass=${fclass}&id=${timeline.id}`,
|
`/api/bs/hrmorganization/orgchart/getSubCompanyTree?fclass=${fclass}&id=${timeline.id}`,
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ export default function userPage() {
|
||||||
// 获取数据
|
// 获取数据
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
document.cookie =
|
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(
|
d3.json(
|
||||||
// "/user/data"
|
// "/user/data"
|
||||||
'/api/bs/hrmorganization/orgchart/userData?fclass=0&fisvitual=0&root=0&level=3&id=0',
|
'/api/bs/hrmorganization/orgchart/userData?fclass=0&fisvitual=0&root=0&level=3&id=0',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue