Compare commits
5 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
51884bd8df | |
|
|
08d7be4d4a | |
|
|
8180d91a9f | |
|
|
aa47404b27 | |
|
|
62a97a3b2e |
|
|
@ -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-12-16 11:24:29
|
* @LastEditTime: 2023-02-22 11:31:21
|
||||||
* @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
|
||||||
*/
|
*/
|
||||||
|
|
@ -18,7 +18,7 @@ export default defineConfig({
|
||||||
type: 'none',
|
type: 'none',
|
||||||
},
|
},
|
||||||
routes: [
|
routes: [
|
||||||
{ path: '/user', component: '@/pages/user' },
|
{ path: '/jcuser', component: '@/pages/user' },
|
||||||
{ path: '/company', component: '@/pages/company' },
|
{ path: '/company', component: '@/pages/company' },
|
||||||
],
|
],
|
||||||
fastRefresh: {},
|
fastRefresh: {},
|
||||||
|
|
@ -26,7 +26,7 @@ export default defineConfig({
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
// 标识需要进行转换的请求的url
|
// 标识需要进行转换的请求的url
|
||||||
target: 'http://localhost:8686/api', // 服务端域名 / http://localhost:8686
|
target: 'http://localhost:9006/api', // 服务端域名 / http://localhost:8686
|
||||||
changeOrigin: true, // 允许域名进行转换
|
changeOrigin: true, // 允许域名进行转换
|
||||||
pathRewrite: { '^/api': '' }, // 将请求url里的ci去掉
|
pathRewrite: { '^/api': '' }, // 将请求url里的ci去掉
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -69,10 +69,10 @@ export class TopBar extends React.Component {
|
||||||
label: '导出图片',
|
label: '导出图片',
|
||||||
key: '1',
|
key: '1',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
label: '导出PDF',
|
// label: '导出PDF',
|
||||||
key: '2',
|
// key: '2',
|
||||||
},
|
// },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
@ -104,23 +104,8 @@ export class TopBar extends React.Component {
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
||||||
<Col span={6}>
|
<Col span={6}>
|
||||||
维度:
|
组织:
|
||||||
<Select
|
|
||||||
defaultValue="0"
|
|
||||||
style={{ width: 120 }}
|
|
||||||
value={this.state.requestData.fclass}
|
|
||||||
onChange={(value) => this.handleFormChange({ fclass: value })}
|
|
||||||
>
|
|
||||||
{this.state.fclasslist.map((item) => (
|
|
||||||
<Option value={item.id}>{item.companyname}</Option>
|
|
||||||
))}
|
|
||||||
</Select>
|
|
||||||
</Col>
|
|
||||||
|
|
||||||
<Col span={6}>
|
|
||||||
根节点:
|
|
||||||
<Select
|
<Select
|
||||||
showSearch
|
showSearch
|
||||||
filterOption={(input, option) =>
|
filterOption={(input, option) =>
|
||||||
|
|
@ -150,20 +135,6 @@ export class TopBar extends React.Component {
|
||||||
<Option value="3">三级</Option>
|
<Option value="3">三级</Option>
|
||||||
</Select>
|
</Select>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
|
||||||
<Row style={{ marginTop: '15px' }}>
|
|
||||||
<Col span={6}>
|
|
||||||
<Checkbox
|
|
||||||
style={{ marginTop: '5px' }}
|
|
||||||
onChange={(e) =>
|
|
||||||
this.handleFormChange({
|
|
||||||
fisvitual: e.target.checked ? '1' : '0',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
>
|
|
||||||
显示虚拟组织
|
|
||||||
</Checkbox>
|
|
||||||
</Col>
|
|
||||||
<Col span={6}>
|
<Col span={6}>
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
|
||||||
|
|
@ -50,11 +50,11 @@ export default function userPage() {
|
||||||
if (topBarSearchRequest) {
|
if (topBarSearchRequest) {
|
||||||
let request = { ...topBarSearchRequest, ids: idsStr };
|
let request = { ...topBarSearchRequest, ids: idsStr };
|
||||||
api =
|
api =
|
||||||
'/api/bs/hrmorganization/orgchart/asyncUserData' +
|
'/api/bs/junchuangorgchart/asyncUserData' +
|
||||||
qs.stringify(request, { addQueryPrefix: true });
|
qs.stringify(request, { addQueryPrefix: true });
|
||||||
} else {
|
} else {
|
||||||
api =
|
api =
|
||||||
'/api/bs/hrmorganization/orgchart/asyncUserData?fclass=0&root=0&date=' +
|
'/api/bs/junchuangorgchart/asyncUserData?fclass=0&root=0&date=' +
|
||||||
moment(new Date()).format('YYYY-MM-DD') +
|
moment(new Date()).format('YYYY-MM-DD') +
|
||||||
'&ids=' +
|
'&ids=' +
|
||||||
idsStr;
|
idsStr;
|
||||||
|
|
@ -87,10 +87,10 @@ export default function userPage() {
|
||||||
// 获取数据
|
// 获取数据
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
document.cookie =
|
document.cookie =
|
||||||
'Webstorm-3d4d3ad4=b8ca5bef-a131-4c2b-81da-6f8595481dc2; ecology_JSessionid=aaad2HRSW843U9BJFcUuy; JSESSIONID=aaad2HRSW843U9BJFcUuy; loginidweaver=1; languageidweaver=7; loginuuids=1; __randcode__=47f1e1cc-51de-48b3-af04-3875b717805f';
|
'Webstorm-3d4d3ad4=b8ca5bef-a131-4c2b-81da-6f8595481dc2; ecology_JSessionid=aaap23kDZ0ldP8JGBGSzy; JSESSIONID=aaap23kDZ0ldP8JGBGSzy; Systemlanguid=7; loginidweaver=1; languageidweaver=7; loginuuids=1; langType=zh_CN; ecology_JSessionId=abc5qFfEfVOtpgAwYd3zy; __randcode__=c92e9ed1-3d66-4e6b-bdb6-c01df6c639a1';
|
||||||
d3.json(
|
d3.json(
|
||||||
// "/user/data"
|
// "/user/data"
|
||||||
'/api/bs/hrmorganization/orgchart/userData?fclass=0&root=0&date=' +
|
'/api/bs/junchuangorgchart/userData?fclass=0&root=0&date=' +
|
||||||
moment(new Date()).format('YYYY-MM-DD'),
|
moment(new Date()).format('YYYY-MM-DD'),
|
||||||
).then((data) => {
|
).then((data) => {
|
||||||
setData(data.data);
|
setData(data.data);
|
||||||
|
|
@ -199,7 +199,7 @@ export default function userPage() {
|
||||||
const handleSearch = (requestData) => {
|
const handleSearch = (requestData) => {
|
||||||
setTpBarSearchRequest(requestData);
|
setTpBarSearchRequest(requestData);
|
||||||
let api =
|
let api =
|
||||||
'/api/bs/hrmorganization/orgchart/userData' +
|
'/api/bs/junchuangorgchart/userData' +
|
||||||
qs.stringify(requestData, { addQueryPrefix: true });
|
qs.stringify(requestData, { addQueryPrefix: true });
|
||||||
fetch(api)
|
fetch(api)
|
||||||
.then((res) => res.json())
|
.then((res) => res.json())
|
||||||
|
|
@ -217,7 +217,7 @@ export default function userPage() {
|
||||||
|
|
||||||
const handleSynchronous = (requestData) => {
|
const handleSynchronous = (requestData) => {
|
||||||
setDisabled(true);
|
setDisabled(true);
|
||||||
let api = '/api/bs/hrmorganization/orgchart/synchronousData';
|
let api = '/api/bs/junchuangorgchart/syncOrgMapData';
|
||||||
fetch(api)
|
fetch(api)
|
||||||
.then((res) => res.json())
|
.then((res) => res.json())
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
|
|
@ -259,9 +259,9 @@ export default function userPage() {
|
||||||
// 岗位地址
|
// 岗位地址
|
||||||
let jobtitleUrl = `/spa/organization/static/index.html#/main/organization/jobExtend/${d.data.fobjid}`;
|
let jobtitleUrl = `/spa/organization/static/index.html#/main/organization/jobExtend/${d.data.fobjid}`;
|
||||||
// 人员地址
|
// 人员地址
|
||||||
let userUrl = `/spa/organization/static/index.html#/main/organization/resourceCard/${d.data.fleader}`;
|
let userUrl = `/spa/hrm/index_mobx.html#/main/hrm/card/cardInfo/${d.data.fleader}`;
|
||||||
// 岗位人员地址
|
// 岗位人员地址
|
||||||
let postUserUrl = `/spa/organization/static/index.html#/main/organization/resourceCard/${d.data.fobjid}`;
|
let postUserUrl = `/spa/hrm/index_mobx.html#/main/hrm/card/cardInfo/${d.data.fobjid}`;
|
||||||
//集团通讯录
|
//集团通讯录
|
||||||
let addressBookGroupUrl = `/spa/organization/static/index.html#/main/organization/resource/?virtualtype=0`;
|
let addressBookGroupUrl = `/spa/organization/static/index.html#/main/organization/resource/?virtualtype=0`;
|
||||||
// 分部通讯录
|
// 分部通讯录
|
||||||
|
|
@ -286,15 +286,9 @@ export default function userPage() {
|
||||||
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
|
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
" onclick="if(${d.data.fisvitual}==1) return;window.open('${
|
" onclick="if(${d.data.fisvitual}==1) return;">${
|
||||||
d.data.ftype == 0
|
d.data.fname
|
||||||
? companyUrl
|
}</span>
|
||||||
: d.data.ftype == 1
|
|
||||||
? subcompanyUrl
|
|
||||||
: d.data.ftype == 2
|
|
||||||
? departmentUrl
|
|
||||||
: ''
|
|
||||||
}', '_blank')">${d.data.fname}</span>
|
|
||||||
<span style="margin-left: 70px;">
|
<span style="margin-left: 70px;">
|
||||||
<img src="./img/user-card/line1.png" />
|
<img src="./img/user-card/line1.png" />
|
||||||
<img src="./img/user-card/line2.png" />
|
<img src="./img/user-card/line2.png" />
|
||||||
|
|
@ -329,6 +323,7 @@ export default function userPage() {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
margin-bottom: 19px;
|
margin-bottom: 19px;
|
||||||
|
margin-top: 25px;
|
||||||
white-space:nowrap;
|
white-space:nowrap;
|
||||||
overflow:hidden;
|
overflow:hidden;
|
||||||
text-overflow:ellipsis;"
|
text-overflow:ellipsis;"
|
||||||
|
|
@ -341,85 +336,13 @@ export default function userPage() {
|
||||||
<div style="display: ${
|
<div style="display: ${
|
||||||
d.data.fisvitual == 0 ? 'flex' : 'none'
|
d.data.fisvitual == 0 ? 'flex' : 'none'
|
||||||
};" >
|
};" >
|
||||||
<div style="height: 28px;border: 1px solid #00C2FF; border-radius: 10px; line-height: 24px; padding: 0px 5px; min-width: 60px;">编制: ${
|
|
||||||
d.data.fplan
|
|
||||||
}</div>
|
|
||||||
<div style="height: 28px;border: 1px solid #00C2FF; border-radius: 10px; line-height: 24px; padding: 0px 5px; min-width: 60px; margin-left: 10px;" onclick="if(${
|
|
||||||
d.data.fisvitual
|
|
||||||
}==1) return;event.stopPropagation();window.open('${
|
|
||||||
d.data.ftype == 0
|
|
||||||
? addressBookGroupUrl
|
|
||||||
: d.data.ftype == 1
|
|
||||||
? addressBookUrl
|
|
||||||
: d.data.ftype == 2
|
|
||||||
? addressBookDepartmentUrl
|
|
||||||
: ''
|
|
||||||
}', '_blank')">在岗: ${d.data.fonjob}</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>`;
|
</div>`;
|
||||||
} else if (d.data.ftype == 3) {
|
} else if (d.data.ftype == 3) {
|
||||||
return `<div>
|
|
||||||
<div style="position: relative;">
|
|
||||||
<img src="./img/user-card/card-label-start.png" />
|
|
||||||
<span style="display: inline-block;
|
|
||||||
position: absolute;
|
|
||||||
left: 5px;
|
|
||||||
top: -8px;
|
|
||||||
background: #F7F9FD;
|
|
||||||
z-index: 100;
|
|
||||||
padding: 0px 10px;
|
|
||||||
font-size: 16px;
|
|
||||||
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #000000;
|
|
||||||
" onclick="if(${
|
|
||||||
d.data.fisvitual
|
|
||||||
}==1) return;window.open('${jobtitleUrl}', '_blank')">${
|
|
||||||
d.data.fname
|
|
||||||
}</span>
|
|
||||||
<span style="margin-left: 70px;">
|
|
||||||
<img src="./img/user-card/line1.png" />
|
|
||||||
<img src="./img/user-card/line2.png" />
|
|
||||||
</span>
|
|
||||||
<div style=" height: 152px;background-size: 100% 100%;box-sizing: border-box;padding-top: 40px;">
|
|
||||||
<div style='position:absolute;z-index:-1;top:16px'>
|
|
||||||
<img src='./img/user-card/user-card.png'>
|
|
||||||
</div>
|
|
||||||
<img src="./img/user-card/jobicon.png" style="margin-left: 20px; vertical-align: top;"/>
|
|
||||||
<div style="display: inline-block; margin-left: 15px;">
|
|
||||||
<div style="
|
|
||||||
font-size: 13px;
|
|
||||||
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #333333;
|
|
||||||
margin-bottom: 23px;
|
|
||||||
" onclick="if(${
|
|
||||||
d.data.fisvitual
|
|
||||||
}==1) return;window.open('${jobtitleUrl}', '_blank')">${
|
|
||||||
d.data.fname
|
|
||||||
}</div>
|
|
||||||
<div style="
|
|
||||||
font-size: 13px;
|
|
||||||
font-family: Microsoft YaHei-Regular, Microsoft YaHei;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #333333;
|
|
||||||
display: ${d.data.fisvitual == 0 ? 'flex' : 'none'};
|
|
||||||
">
|
|
||||||
<span>编制:${d.data.fplan}</span>
|
|
||||||
<span style="margin-left: 10px;" onclick="if(${
|
|
||||||
d.data.fisvitual
|
|
||||||
}==1) return;window.open('${addressBookPostUrl}', '_blank')">在岗:${
|
|
||||||
d.data.fonjob
|
|
||||||
}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>`;
|
|
||||||
} else if (d.data.ftype == 4) {
|
|
||||||
return `<div>
|
return `<div>
|
||||||
<div style="position: relative;" >
|
<div style="position: relative;" >
|
||||||
<img src="./img/user-card/card-label-start.png" />
|
<img src="./img/user-card/card-label-start.png" />
|
||||||
|
|
@ -518,7 +441,7 @@ export default function userPage() {
|
||||||
}}
|
}}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
type="user"
|
type="user"
|
||||||
url="/api/bs/hrmorganization/orgchart/getCondition?type=user"
|
url="/api/bs/junchuangorgchart/getCondition?type=user"
|
||||||
/>
|
/>
|
||||||
<ToolBar
|
<ToolBar
|
||||||
onTopLayoutClick={handleTopLayoutClick}
|
onTopLayoutClick={handleTopLayoutClick}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue