bug
This commit is contained in:
parent
ae4ea5deae
commit
ca3c30e4e5
|
|
@ -2,7 +2,7 @@
|
||||||
* @Author: Chengliang 1546584672@qq.com
|
* @Author: Chengliang 1546584672@qq.com
|
||||||
* @Date: 2022-08-04 10:22:55
|
* @Date: 2022-08-04 10:22:55
|
||||||
* @LastEditors: Chengliang 1546584672@qq.com
|
* @LastEditors: Chengliang 1546584672@qq.com
|
||||||
* @LastEditTime: 2022-09-06 16:46:56
|
* @LastEditTime: 2022-12-16 11:24:29
|
||||||
* @FilePath: /org-chart-frant/.umirc.ts
|
* @FilePath: /org-chart-frant/.umirc.ts
|
||||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
*/
|
*/
|
||||||
|
|
@ -26,7 +26,7 @@ export default defineConfig({
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
// 标识需要进行转换的请求的url
|
// 标识需要进行转换的请求的url
|
||||||
target: 'http://221.226.25.34:8088/api', // 服务端域名 / http://localhost:8686
|
target: 'http://localhost:8686/api', // 服务端域名 / http://localhost:8686
|
||||||
changeOrigin: true, // 允许域名进行转换
|
changeOrigin: true, // 允许域名进行转换
|
||||||
pathRewrite: { '^/api': '' }, // 将请求url里的ci去掉
|
pathRewrite: { '^/api': '' }, // 将请求url里的ci去掉
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ export class TopBar extends React.Component {
|
||||||
return (
|
return (
|
||||||
<div className={style.topbarWrapper}>
|
<div className={style.topbarWrapper}>
|
||||||
<Row>
|
<Row>
|
||||||
<Col span={5}>
|
<Col span={6}>
|
||||||
数据日期:
|
数据日期:
|
||||||
<DatePicker
|
<DatePicker
|
||||||
placeholder="请选择日期"
|
placeholder="请选择日期"
|
||||||
|
|
@ -103,7 +103,7 @@ export class TopBar extends React.Component {
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
||||||
<Col span={4}>
|
<Col span={6}>
|
||||||
维度:
|
维度:
|
||||||
<Select
|
<Select
|
||||||
defaultValue="0"
|
defaultValue="0"
|
||||||
|
|
@ -117,7 +117,7 @@ export class TopBar extends React.Component {
|
||||||
</Select>
|
</Select>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
||||||
<Col span={4}>
|
<Col span={6}>
|
||||||
根节点:
|
根节点:
|
||||||
<Select
|
<Select
|
||||||
showSearch
|
showSearch
|
||||||
|
|
@ -135,7 +135,7 @@ export class TopBar extends React.Component {
|
||||||
</Select>
|
</Select>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
||||||
<Col span={5}>
|
<Col span={6}>
|
||||||
显示层级:
|
显示层级:
|
||||||
<Select
|
<Select
|
||||||
defaultValue="3"
|
defaultValue="3"
|
||||||
|
|
@ -148,8 +148,9 @@ export class TopBar extends React.Component {
|
||||||
<Option value="3">三级</Option>
|
<Option value="3">三级</Option>
|
||||||
</Select>
|
</Select>
|
||||||
</Col>
|
</Col>
|
||||||
|
</Row>
|
||||||
<Col span={3}>
|
<Row style={{ marginTop: '15px' }}>
|
||||||
|
<Col span={6}>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
style={{ marginTop: '5px' }}
|
style={{ marginTop: '5px' }}
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
|
|
@ -161,7 +162,16 @@ export class TopBar extends React.Component {
|
||||||
显示虚拟组织
|
显示虚拟组织
|
||||||
</Checkbox>
|
</Checkbox>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={3}>
|
<Col span={6}>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
style={{ marginRight: '10px' }}
|
||||||
|
onClick={() => {
|
||||||
|
this.props.onSynchronous(this.state.requestData);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
同步数据
|
||||||
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
style={{ marginRight: '10px' }}
|
style={{ marginRight: '10px' }}
|
||||||
|
|
|
||||||
|
|
@ -295,6 +295,17 @@ export default function companyPage() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleSynchronous = (requestData) => {
|
||||||
|
let api = '/api/bs/hrmorganization/orgchart/synchronousData';
|
||||||
|
fetch(api)
|
||||||
|
.then((res) => res.json())
|
||||||
|
.then((data) => {
|
||||||
|
message.success('同步成功');
|
||||||
|
this.handleSearch(requestData);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log('data', data);
|
console.log('data', data);
|
||||||
if (active == 'left') {
|
if (active == 'left') {
|
||||||
|
|
@ -335,6 +346,9 @@ export default function companyPage() {
|
||||||
onSearch={(requestData) => {
|
onSearch={(requestData) => {
|
||||||
handleSearch(requestData);
|
handleSearch(requestData);
|
||||||
}}
|
}}
|
||||||
|
onSynchronous={(requestData) => {
|
||||||
|
handleSynchronous(requestData);
|
||||||
|
}}
|
||||||
type="company"
|
type="company"
|
||||||
url="/api/bs/hrmorganization/orgchart/getCondition?type=company"
|
url="/api/bs/hrmorganization/orgchart/getCondition?type=company"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ export default function userPage() {
|
||||||
// 获取数据
|
// 获取数据
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
document.cookie =
|
document.cookie =
|
||||||
'loginidweaver=1; languageidweaver=7; loginuuids=1; JSESSIONID=aaa1QNMWge48Bh-3oq6oy; ecology_JSessionid=aaa1QNMWge48Bh-3oq6oy; __randcode__=5c4300d1-05d6-4ca6-adb4-f4e23a47acb5';
|
'Webstorm-3d4d3ad4=b8ca5bef-a131-4c2b-81da-6f8595481dc2; ecology_JSessionid=aaadYmKjyxMd8_cZAZkuy; JSESSIONID=aaadYmKjyxMd8_cZAZkuy; loginidweaver=1; languageidweaver=7; loginuuids=1; __randcode__=092aa42b-2879-41a3-81e9-7e50b58aa689';
|
||||||
d3.json(
|
d3.json(
|
||||||
// "/user/data"
|
// "/user/data"
|
||||||
'/api/bs/hrmorganization/orgchart/userData?fclass=0&root=0&date=' +
|
'/api/bs/hrmorganization/orgchart/userData?fclass=0&root=0&date=' +
|
||||||
|
|
@ -214,6 +214,17 @@ export default function userPage() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleSynchronous = (requestData) => {
|
||||||
|
let api = '/api/bs/hrmorganization/orgchart/synchronousData';
|
||||||
|
fetch(api)
|
||||||
|
.then((res) => res.json())
|
||||||
|
.then((data) => {
|
||||||
|
message.success('同步成功');
|
||||||
|
this.handleSearch(requestData);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (active == 'left') {
|
if (active == 'left') {
|
||||||
orgChart &&
|
orgChart &&
|
||||||
|
|
@ -290,7 +301,7 @@ export default function userPage() {
|
||||||
<img src="${
|
<img src="${
|
||||||
d.data.fleaderimg
|
d.data.fleaderimg
|
||||||
? d.data.fleaderimg
|
? d.data.fleaderimg
|
||||||
: d.data.ftype == 0
|
: d.data.ftype == 0 || d.data.ftype == 1
|
||||||
? './img/company.png'
|
? './img/company.png'
|
||||||
: './img/default_avator.png'
|
: './img/default_avator.png'
|
||||||
}" style="width: 58px; height: 58px;position:absolute;left:29px; border-radius: 50%; margin-top: 16px;position:absolute;left:29px;z-index:999"/>
|
}" style="width: 58px; height: 58px;position:absolute;left:29px; border-radius: 50%; margin-top: 16px;position:absolute;left:29px;z-index:999"/>
|
||||||
|
|
@ -496,6 +507,9 @@ export default function userPage() {
|
||||||
setRequestRes(requestData);
|
setRequestRes(requestData);
|
||||||
handleSearch(requestData);
|
handleSearch(requestData);
|
||||||
}}
|
}}
|
||||||
|
onSynchronous={(requestData) => {
|
||||||
|
handleSynchronous(requestData);
|
||||||
|
}}
|
||||||
type="user"
|
type="user"
|
||||||
url="/api/bs/hrmorganization/orgchart/getCondition?type=user"
|
url="/api/bs/hrmorganization/orgchart/getCondition?type=user"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue