Compare commits

..

13 Commits

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" native2AsciiForPropertiesFiles="true" defaultCharsetForPropertiesFiles="UTF-8" />
</project>

@ -1,36 +0,0 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="JavaDoc" enabled="true" level="WARNING" enabled_by_default="true">
<option name="TOP_LEVEL_CLASS_OPTIONS">
<value>
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
<option name="REQUIRED_TAGS" value="" />
</value>
</option>
<option name="INNER_CLASS_OPTIONS">
<value>
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
<option name="REQUIRED_TAGS" value="" />
</value>
</option>
<option name="METHOD_OPTIONS">
<value>
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
<option name="REQUIRED_TAGS" value="@return@param@throws or @exception" />
</value>
</option>
<option name="FIELD_OPTIONS">
<value>
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
<option name="REQUIRED_TAGS" value="" />
</value>
</option>
<option name="IGNORE_DEPRECATED" value="false" />
<option name="IGNORE_JAVADOC_PERIOD" value="true" />
<option name="IGNORE_DUPLICATED_THROWS" value="false" />
<option name="IGNORE_POINT_TO_ITSELF" value="false" />
<option name="myAdditionalJavadocTags" value="date" />
</inspection_tool>
</profile>
</component>

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="JSX" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="10" project-jdk-type="JavaSDK" />
</project>

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/org-chart-frant.iml" filepath="$PROJECT_DIR$/.idea/org-chart-frant.iml" />
</modules>
</component>
</project>

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

@ -1,593 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="449daba1-1dd3-4ffd-906d-6ef641fb81de" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/src/d3-org-chart.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/d3-org-chart.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/pages/dragTree.jsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/dragTree.jsx" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/d3-org-chart.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-146">
<folding>
<element signature="e#0#49#0" expanded="true" />
<element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
<element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
<element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
<element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
<element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
<element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
<element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
<element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
<element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
<element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsGulpfileManager">
<detection-done>true</detection-done>
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="NodeModulesDirectoryManager">
<handled-path value="$PROJECT_DIR$/node_modules" />
</component>
<component name="NodePackageJsonFileManager">
<packageJsonPaths>
<path value="$PROJECT_DIR$/package.json" />
</packageJsonPaths>
</component>
<component name="ProjectFrameBounds" fullScreen="true">
<option name="x" value="1440" />
<option name="width" value="1920" />
<option name="height" value="1080" />
</component>
<component name="ProjectInspectionProfilesVisibleTreeState">
<entry key="Project Default">
<profile-state>
<expanded-state>
<State />
<State>
<id>ActionScript specificJavaScript</id>
</State>
<State>
<id>Android</id>
</State>
<State>
<id>Ant</id>
</State>
<State>
<id>Batch Applications</id>
</State>
<State>
<id>CFML</id>
</State>
<State>
<id>CSS</id>
</State>
<State>
<id>Class structureJava</id>
</State>
<State>
<id>Code quality toolsCSS</id>
</State>
<State>
<id>Code quality toolsJavaScript</id>
</State>
<State>
<id>Code style issuesJava</id>
</State>
<State>
<id>CoffeeScript</id>
</State>
<State>
<id>CorrectnessLintAndroid</id>
</State>
<State>
<id>Cucumber</id>
</State>
<State>
<id>Error handlingJava</id>
</State>
<State>
<id>Faces Model</id>
</State>
<State>
<id>Flow type checkerJavaScript</id>
</State>
<State>
<id>FreeMarker</id>
</State>
<State>
<id>General</id>
</State>
<State>
<id>GeneralCoffeeScript</id>
</State>
<State>
<id>GeneralJavaScript</id>
</State>
<State>
<id>Google Web Toolkit</id>
</State>
<State>
<id>GrailsGroovy</id>
</State>
<State>
<id>Groovy</id>
</State>
<State>
<id>HTML</id>
</State>
<State>
<id>Hibernate</id>
</State>
<State>
<id>IconsUsabilityLintAndroid</id>
</State>
<State>
<id>ImportsJava</id>
</State>
<State>
<id>Inheritance issuesJava</id>
</State>
<State>
<id>Internationalization</id>
</State>
<State>
<id>InternationalizationJava</id>
</State>
<State>
<id>InternationalizationLintAndroid</id>
</State>
<State>
<id>Invalid elementsCSS</id>
</State>
<State>
<id>J2ME issuesJava</id>
</State>
<State>
<id>JSON and JSON5</id>
</State>
<State>
<id>JSP</id>
</State>
<State>
<id>Java</id>
</State>
<State>
<id>Java 8Java language level migration aidsJava</id>
</State>
<State>
<id>Java interop issuesKotlin</id>
</State>
<State>
<id>Java language level migration aidsJava</id>
</State>
<State>
<id>JavaFX</id>
</State>
<State>
<id>JavaScript</id>
</State>
<State>
<id>JavadocJava</id>
</State>
<State>
<id>Kotlin</id>
</State>
<State>
<id>LintAndroid</id>
</State>
<State>
<id>LintLintAndroid</id>
</State>
<State>
<id>Manifest</id>
</State>
<State>
<id>Markdown</id>
</State>
<State>
<id>MessagesCorrectnessLintAndroid</id>
</State>
<State>
<id>Node.jsJavaScript</id>
</State>
<State>
<id>OSGi</id>
</State>
<State>
<id>OtherGroovy</id>
</State>
<State>
<id>Pages Navigation Model</id>
</State>
<State>
<id>Plugin DevKit</id>
</State>
<State>
<id>PortabilityJava</id>
</State>
<State>
<id>Potentially confusing code constructsGroovy</id>
</State>
<State>
<id>Probable bugsJava</id>
</State>
<State>
<id>Properties Files</id>
</State>
<State>
<id>Properties FilesJava</id>
</State>
<State>
<id>RELAX NG</id>
</State>
<State>
<id>RESTful Web Service</id>
</State>
<State>
<id>Resource managementJava</id>
</State>
<State>
<id>SQL</id>
</State>
<State>
<id>Sass/SCSS</id>
</State>
<State>
<id>SecurityLintAndroid</id>
</State>
<State>
<id>SetupSpring CoreSpring</id>
</State>
<State>
<id>Spring</id>
</State>
<State>
<id>Spring BootSpring</id>
</State>
<State>
<id>Spring CoreSpring</id>
</State>
<State>
<id>Struts</id>
</State>
<State>
<id>Struts 1Struts</id>
</State>
<State>
<id>Struts 2Struts</id>
</State>
<State>
<id>Style issuesKotlin</id>
</State>
<State>
<id>TestNGJava</id>
</State>
<State>
<id>Threading issuesJava</id>
</State>
<State>
<id>TypeScript</id>
</State>
<State>
<id>UI Form</id>
</State>
<State>
<id>UsabilityLintAndroid</id>
</State>
<State>
<id>Validity issuesGroovy</id>
</State>
<State>
<id>Velocity</id>
</State>
<State>
<id>Verbose or redundant code constructsJava</id>
</State>
<State>
<id>VisibilityJava</id>
</State>
<State>
<id>Vue</id>
</State>
<State>
<id>Web Services</id>
</State>
<State>
<id>XML</id>
</State>
<State>
<id>XMLSpring CoreSpring</id>
</State>
<State>
<id>XPath</id>
</State>
<State>
<id>YAML</id>
</State>
</expanded-state>
</profile-state>
</entry>
</component>
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="org-chart-frant" type="b2602c69:ProjectViewProjectNode" />
<item name="org-chart-frant" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="org-chart-frant" type="b2602c69:ProjectViewProjectNode" />
<item name="org-chart-frant" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="org-chart-frant" type="b2602c69:ProjectViewProjectNode" />
<item name="org-chart-frant" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="components" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="org-chart-frant" type="b2602c69:ProjectViewProjectNode" />
<item name="org-chart-frant" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="components" type="462c0819:PsiDirectoryNode" />
<item name="dialog" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="PackagesPane" />
<pane id="Scope" />
<pane id="CatdeaLogs" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="aspect.path.notification.shown" value="true" />
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1690446615685" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
<property name="project.structure.last.edited" value="Project" />
<property name="project.structure.proportion" value="0.0" />
<property name="project.structure.side.proportion" value="0.0" />
<property name="settings.editor.selected.configurable" value="preferences.externalDependencies" />
</component>
<component name="RebelAgentSelection">
<selection>jr</selection>
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="449daba1-1dd3-4ffd-906d-6ef641fb81de" name="Default Changelist" comment="" />
<created>1689842546961</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1689842546961</updated>
<workItem from="1689842557088" duration="205000" />
<workItem from="1690192167781" duration="39000" />
<workItem from="1690341272941" duration="164000" />
<workItem from="1690446551998" duration="218000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="626000" />
</component>
<component name="ToolWindowManager">
<frame x="1440" y="0" width="1920" height="1080" extended-state="0" />
<layout>
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.19382322" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="JRebel" order="2" side_tool="true" />
<window_info id="Image Layers" order="3" />
<window_info id="Capture Tool" order="4" />
<window_info id="UI Designer" order="5" />
<window_info id="Favorites" order="6" side_tool="true" />
<window_info id="Designer" order="7" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="bottom" id="Run" order="2" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="bottom" id="Event Log" order="7" side_tool="true" />
<window_info anchor="bottom" id="Terminal" order="8" />
<window_info anchor="bottom" id="Docker" order="9" show_stripe_button="false" />
<window_info anchor="bottom" id="Messages" order="10" />
<window_info anchor="bottom" id="Database Changes" order="11" show_stripe_button="false" />
<window_info active="true" anchor="bottom" id="Version Control" order="12" visible="true" weight="0.26039603" />
<window_info anchor="bottom" id="JRebel Console" order="13" side_tool="true" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
<window_info anchor="right" id="Palette" order="3" />
<window_info anchor="right" id="Capture Analysis" order="4" />
<window_info anchor="right" id="Maven Projects" order="5" />
<window_info anchor="right" id="aiXcoder" order="6" />
<window_info anchor="right" id="Database" order="7" />
<window_info anchor="right" id="Palette&#9;" order="8" />
<window_info anchor="right" id="Theme Preview" order="9" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="Vcs.Log.History.Properties">
<option name="COLUMN_ORDER">
<list>
<option value="0" />
<option value="2" />
<option value="3" />
<option value="1" />
</list>
</option>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/components/dialog/index.jsx">
<provider selected="true" editor-type-id="text-editor">
<state>
<folding>
<element signature="e#0#26#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/d3-org-chart.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-146">
<folding>
<element signature="e#0#49#0" expanded="true" />
<element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
<element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
<element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
<element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
<element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
<element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
<element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
<element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
<element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
<element signature="n#style#0;n#div#0;n#!!top" expanded="true" />
</folding>
</state>
</provider>
</entry>
</component>
<component name="ideajad">
<property name="annotate" value="false" />
<property name="annotateFully" value="false" />
<property name="braces" value="false" />
<property name="clear" value="false" />
<property name="confirmNavigationTriggeredDecompile" value="true" />
<property name="dead" value="true" />
<property name="defaultInitializers" value="false" />
<property name="dissassemblerOnly" value="false" />
<property name="fieldsFirst" value="true" />
<property name="fileExtension" value="java" />
<property name="fullyQualifiedNames" value="false" />
<property name="indentation" value="4" />
<property name="intRadix" value="10" />
<property name="lineNumbersAsComments" value="true" />
<property name="longRadix" value="10" />
<property name="maxStringLength" value="64" />
<property name="nocast" value="false" />
<property name="noclass" value="false" />
<property name="nocode" value="false" />
<property name="noconv" value="false" />
<property name="noctor" value="false" />
<property name="nodos" value="false" />
<property name="nofd" value="false" />
<property name="noinner" value="false" />
<property name="nolvt" value="false" />
<property name="nonlb" value="false" />
<property name="outputDirectory" value="" />
<property name="packFields" value="3" />
<property name="packImports" value="7" />
<property name="prefixNumericalClasses" value="_cls" />
<property name="prefixNumericalFields" value="_fld" />
<property name="prefixNumericalLocals" value="_lcl" />
<property name="prefixNumericalMethods" value="_mth" />
<property name="prefixNumericalParameters" value="_prm" />
<property name="prefixUnusedExceptions" value="_ex" />
<property name="readonly" value="false" />
<property name="safe" value="false" />
<property name="sort" value="false" />
<property name="spaceAfterKeyword" value="false" />
<property name="splitStringsAtNewline" value="false" />
<property name="useTabs" value="false" />
</component>
<component name="masterDetails">
<states>
<state key="GlobalLibrariesConfigurable.UI">
<settings>
<last-edited>fastdfs-client-java-1.27-RELEASE</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="JdkListConfigurable.UI">
<settings>
<last-edited>10</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ProjectJDKs.UI">
<settings>
<last-edited>1.8</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ProjectLibrariesConfigurable.UI">
<settings>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 978 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 981 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 997 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 945 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 978 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 835 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"
/>
<link rel="stylesheet" href="./umi.c64b754c.css" />
<script>
window.routerBase = "/spa/orgChart/";
</script>
<script>
//! umi version: 3.5.32
</script>
</head>
<body>
<div id="root"></div>
<script src="./umi.1df510d5.js"></script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -24,6 +24,7 @@
"@types/d3": "^7.4.0", "@types/d3": "^7.4.0",
"d3": "7.4.4", "d3": "7.4.4",
"d3-org-chart": "2.6.0", "d3-org-chart": "2.6.0",
"jquery": "^3.7.1",
"js-export-excel": "^1.1.4", "js-export-excel": "^1.1.4",
"jspdf": "^2.5.1", "jspdf": "^2.5.1",
"moment": "^2.29.3", "moment": "^2.29.3",

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 835 B

@ -10,106 +10,103 @@ import * as d3 from 'd3';
import './index.less'; import './index.less';
import { HomeOutlined } from '@ant-design/icons'; import { HomeOutlined } from '@ant-design/icons';
import './index.less'; import './index.less';
import { getLabel } from '../../util/i18n.js';
const layout = { const layout = {
labelCol: { span: 8 }, labelCol: { span: 8 },
wrapperCol: { span: 14 }, wrapperCol: { span: 14 },
}; };
const CopyDialog = forwardRef( const CopyDialog = forwardRef(({ open, onCreate, onCancel }, ref) => {
({ open, onCreate, onCancel, labelData }, ref) => { const [treeData, setData] = useState([]);
const [treeData, setData] = useState([]); const [form] = Form.useForm();
const [form] = Form.useForm(); const formRef = useRef(null);
const formRef = useRef(null);
useImperativeHandle(ref, () => ({ useImperativeHandle(ref, () => ({
getTreeData() { getTreeData() {
form.resetFields(); form.resetFields();
d3.json('/api/bs/hrmorganization/orgchart/getSubCompanyTree').then( d3.json('/api/bs/hrmorganization/orgchart/getSubCompanyTree').then(
(data) => { (data) => {
data.companyTree.map((item, index) => { data.companyTree.map((item, index) => {
item.icon = <HomeOutlined />; item.icon = <HomeOutlined />;
}); });
setData(data.companyTree); setData(data.companyTree);
}, },
); );
}, },
})); }));
/** /**
* 根节点树异步加载 * 根节点树异步加载
* @param {} parentId * @param {} parentId
* @returns * @returns
*/ */
const onRootLoadData = (treeNode) => const onRootLoadData = (treeNode) =>
new Promise((resolve) => { new Promise((resolve) => {
const { id } = treeNode.props; const { id } = treeNode.props;
setTimeout(() => { setTimeout(() => {
d3.json( d3.json(
`/api/bs/hrmorganization/orgchart/getSubCompanyTree?subcompany=${id}`, `/api/bs/hrmorganization/orgchart/getSubCompanyTree?subcompany=${id}`,
).then((data) => { ).then((data) => {
data.companyTree.map((item, index) => { data.companyTree.map((item, index) => {
item.icon = <HomeOutlined />; item.icon = <HomeOutlined />;
});
let arr = [...treeData, ...data.companyTree];
setData(arr);
}); });
resolve(undefined); let arr = [...treeData, ...data.companyTree];
}, 200); setData(arr);
}); });
resolve(undefined);
}, 200);
});
return ( return (
<Modal <Modal
open={open} open={open}
title={getLabel(547505, labelData)} title="部门复制"
okText={getLabel(547319, labelData)} okText="确认"
cancelText={getLabel(547318, labelData)} cancelText="取消"
onCancel={onCancel} onCancel={onCancel}
onOk={() => { onOk={() => {
form form
.validateFields() .validateFields()
.then((values) => { .then((values) => {
onCreate(values); onCreate(values);
}) })
.catch((info) => { .catch((info) => {
console.log('Validate Failed:', info); console.log('Validate Failed:', info);
}); });
}} }}
> >
<Form ref={formRef} {...layout} form={form} name="form_in_modal"> <Form ref={formRef} {...layout} form={form} name="form_in_modal">
<Form.Item <Form.Item
name="company" name="company"
label={getLabel(547506, labelData)} label="复制到分部"
rules={[ rules={[
{ {
required: true, required: true,
message: `${getLabel(547507, labelData)}`, message: '【复制到分部】为必填项!',
}, },
]} ]}
> >
<TreeSelect <TreeSelect
className="custom-tree-select" className="custom-tree-select"
treeDataSimpleMode treeDataSimpleMode
allowClear allowClear
style={{ width: '100%' }} style={{ width: '100%' }}
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }} dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
loadData={onRootLoadData} loadData={onRootLoadData}
treeData={treeData} treeData={treeData}
treeIcon treeIcon
/> />
</Form.Item> </Form.Item>
<Form.Item <Form.Item
name="copySubDept" name="copySubDept"
valuePropName="checked" valuePropName="checked"
label={getLabel(547262, labelData)} label="是否复制子部门信息"
> >
<Checkbox /> <Checkbox />
</Form.Item> </Form.Item>
</Form> </Form>
</Modal> </Modal>
); );
}, });
);
export default CopyDialog; export default CopyDialog;

@ -10,117 +10,114 @@ import * as d3 from 'd3';
import './index.less'; import './index.less';
import { HomeOutlined, FolderOutlined } from '@ant-design/icons'; import { HomeOutlined, FolderOutlined } from '@ant-design/icons';
import './index.less'; import './index.less';
import { getLabel } from '../../util/i18n.js';
const layout = { const layout = {
labelCol: { span: 6 }, labelCol: { span: 6 },
wrapperCol: { span: 14 }, wrapperCol: { span: 14 },
}; };
const MergeDialog = forwardRef( const MergeDialog = forwardRef(({ open, onCreate, onCancel }, ref) => {
({ open, onCreate, onCancel, labelData }, ref) => { const [treeData, setData] = useState([]);
const [treeData, setData] = useState([]); const [form] = Form.useForm();
const [form] = Form.useForm(); const formRef = useRef(null);
const formRef = useRef(null);
const [treeLine, setTreeLine] = useState(true); const [treeLine, setTreeLine] = useState(true);
useImperativeHandle(ref, () => ({ useImperativeHandle(ref, () => ({
getTreeData() { getTreeData() {
form.resetFields(); form.resetFields();
d3.json('/api/bs/hrmorganization/orgchart/getDepartmentTree').then( d3.json('/api/bs/hrmorganization/orgchart/getDepartmentTree').then(
(data) => { (data) => {
data.departmentTree.map((item, index) => { data.departmentTree.map((item, index) => {
item.icon = <HomeOutlined />; item.icon = <HomeOutlined />;
}); });
setData(data.departmentTree); setData(data.departmentTree);
}, },
); );
}, },
})); }));
/** /**
* 根节点树异步加载 * 根节点树异步加载
* @param {} parentId * @param {} parentId
* @returns * @returns
*/ */
const onRootLoadData = (treeNode) => const onRootLoadData = (treeNode) =>
new Promise((resolve) => { new Promise((resolve) => {
const { id } = treeNode.props; const { id } = treeNode.props;
setTimeout(() => { setTimeout(() => {
d3.json( d3.json(
`/api/bs/hrmorganization/orgchart/getDepartmentTree?subcompany=${id}`, `/api/bs/hrmorganization/orgchart/getDepartmentTree?subcompany=${id}`,
).then((data) => { ).then((data) => {
data.departmentTree.map((item, index) => { data.departmentTree.map((item, index) => {
if (item.key.indexOf('d') > -1) { if (item.key.indexOf('d') > -1) {
item.icon = <FolderOutlined />; item.icon = <FolderOutlined />;
} else { } else {
item.icon = <HomeOutlined />; item.icon = <HomeOutlined />;
} }
});
let arr = [...treeData, ...data.departmentTree];
setData(arr);
}); });
resolve(undefined); let arr = [...treeData, ...data.departmentTree];
}, 200); setData(arr);
}); });
resolve(undefined);
}, 200);
});
return ( return (
<Modal <Modal
open={open} open={open}
title={getLabel(547508, labelData)} title="部门合并"
okText={getLabel(547319, labelData)} okText="确认"
cancelText={getLabel(547318, labelData)} cancelText="取消"
onCancel={onCancel} onCancel={onCancel}
onOk={() => { onOk={() => {
form form
.validateFields() .validateFields()
.then((values) => { .then((values) => {
onCreate(values); onCreate(values);
}) })
.catch((info) => { .catch((info) => {
console.log('Validate Failed:', info); console.log('Validate Failed:', info);
}); });
}} }}
> >
<Form ref={formRef} {...layout} form={form} name="form_in_modal"> <Form ref={formRef} {...layout} form={form} name="form_in_modal">
<Form.Item <Form.Item
name="department" name="department"
label={getLabel(547264, labelData)} label="合并到部门"
rules={[ rules={[
{ {
required: true, required: true,
message: `${getLabel(547509, labelData)}`, message: '【合并到部门】为必填项!',
}, },
]} ]}
> >
<TreeSelect <TreeSelect
className="custom-tree-select" className="custom-tree-select"
treeDataSimpleMode treeDataSimpleMode
allowClear allowClear
style={{ width: '100%' }} style={{ width: '100%' }}
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }} dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
loadData={onRootLoadData} loadData={onRootLoadData}
treeData={treeData} treeData={treeData}
treeIcon treeIcon
/> />
</Form.Item> </Form.Item>
<Form.Item <Form.Item
name="mergeName" name="mergeName"
label={getLabel(547265, labelData)} label="合并后名称"
rules={[ rules={[
{ {
required: true, required: true,
message: `${getLabel(547510, labelData)}`, message: '【合并后的名称】为必填项!',
}, },
]} ]}
> >
<Input /> <Input />
</Form.Item> </Form.Item>
</Form> </Form>
</Modal> </Modal>
); );
}, });
);
export default MergeDialog; export default MergeDialog;

@ -18,7 +18,7 @@ import { message } from 'antd';
import jsPDF from 'jspdf'; import jsPDF from 'jspdf';
import ExportJsonExcel from 'js-export-excel'; import ExportJsonExcel from 'js-export-excel';
import './index.less'; import './index.less';
import { getLabel } from '../../util/i18n.js'; import { CodepenCircleOutlined } from '@ant-design/icons';
let addNodeChildFunc = null; let addNodeChildFunc = null;
let orgChart = null; let orgChart = null;
@ -35,21 +35,26 @@ export default class DrawerComponents extends React.Component {
columns: [], columns: [],
spinning: true, spinning: true,
showJob: false, showJob: false,
defaultTypeValue: ['isBelongTo'], nbOptions: [],
defaultStatusValue: [0, 1, 2, 3], defaultNbValue: [],
disabled: false, wbOptions: [],
defaultWbValue: [],
}; };
} }
componentDidMount() {} componentDidMount() {}
componentDidUpdate(prevProps, prevState, snapshotValue) {
//
// if (orgChart != null) {
// orgChart.getChartState().svgHeight = 3000;
// }
}
// //
onNodeClick(node) { onNodeClick(node) {
if (node.ftype == '4') { if (node.ftype == '4') {
window.open( window.open(node.pcUrl, '_blank');
`/spa/hrm/index_mobx.html#/main/hrm/card/cardInfo/${node.id}`,
'_blank',
);
} }
} }
@ -74,12 +79,29 @@ export default class DrawerComponents extends React.Component {
: `./img/user-card/user-card-blue.png`; : `./img/user-card/user-card-blue.png`;
} }
//
getDeatilCondition() {
return new Promise((resolve) => {
d3.json('/api/bs/hrmorganization/orgchart/getDeptDetailCondition?').then(
(data) => {
this.setState({
nbOptions: data.nbCondition,
wbOptions: data.wbCondition,
defaultNbValue: data.nbValue,
defaultWbValue: data.wbValue,
});
resolve();
},
);
});
}
// //
getDeatilDatas(params, type = 'chart', showJob = '1') { getDeatilDatas(params, type = 'chart', showJob = '0') {
this.setState({ spinning: true, data: [], dataSource: [] }); this.setState({ spinning: true, data: [] });
d3.json( d3.json(
'/api/bs/hrmorganization/orgchart/getDepartmentDetail?' + '/api/bs/hrmorganization/orgchart/getDepartmentDetail?' +
qs.stringify({ detauleType: type, ...params, showJob }), qs.stringify({ detailType: type, ...params, showJob }),
).then((data) => { ).then((data) => {
// //
if (type == 'chart') { if (type == 'chart') {
@ -181,7 +203,6 @@ export default class DrawerComponents extends React.Component {
}; };
handleExport = (e) => { handleExport = (e) => {
const { labelData } = this.props;
let type = e.key == '1' ? 'png' : e.key == '1' ? 'pdf' : 'excel'; let type = e.key == '1' ? 'png' : e.key == '1' ? 'pdf' : 'excel';
if (type == 'png') { if (type == 'png') {
orgChart && orgChart.exportImg({ full: true }); orgChart && orgChart.exportImg({ full: true });
@ -208,30 +229,30 @@ export default class DrawerComponents extends React.Component {
} }
} }
} }
option.fileName = `${getLabel(547468, labelData)}`; option.fileName = '组织信息';
option.datas = [ option.datas = [
{ {
sheetData: dataTable, sheetData: dataTable,
sheetName: 'sheet', sheetName: 'sheet',
sheetFilter: [ sheetFilter: [
`${getLabel(547327, labelData)}`, '序号',
`${getLabel(547328, labelData)}`, '工号',
`${getLabel(547329, labelData)}`, '姓名',
`${getLabel(547330, labelData)}`, '性别',
`${getLabel(547331, labelData)}`, '部门',
`${getLabel(547332, labelData)}`, '分部',
`${getLabel(547333, labelData)}`, '岗位',
`${getLabel(547334, labelData)}`, '手机号',
], ],
sheetHeader: [ sheetHeader: [
`${getLabel(547327, labelData)}`, '序号',
`${getLabel(547328, labelData)}`, '工号',
`${getLabel(547329, labelData)}`, '姓名',
`${getLabel(547330, labelData)}`, '性别',
`${getLabel(547331, labelData)}`, '部门',
`${getLabel(547332, labelData)}`, '分部',
`${getLabel(547333, labelData)}`, '岗位',
`${getLabel(547334, labelData)}`, '手机号',
], ],
}, },
]; ];
@ -244,7 +265,10 @@ export default class DrawerComponents extends React.Component {
* 节点渲染 * 节点渲染
*/ */
nodeContentRender = (d, i, arr, state) => { nodeContentRender = (d, i, arr, state) => {
const { labelData } = this.props; let name = d.data.deptType == 0 ? '所属部门' : '所属科室';
if (d.data.fisvitual != 0) {
name = '所属部门';
}
if (d.data.ftype == 2) { if (d.data.ftype == 2) {
return `<div style="position: relative;"> return `<div style="position: relative;">
@ -256,20 +280,22 @@ export default class DrawerComponents extends React.Component {
</div> </div>
<div style="display: inline-block; background-size: 100% 100%; width: 35%; height: 90px; text-align:center; vertical-align: top; margin-left: 11px;box-sizing: border;"> <div style="display: inline-block; background-size: 100% 100%; width: 35%; height: 90px; text-align:center; vertical-align: top; margin-left: 11px;box-sizing: border;">
<img src='./img/user-card/avatar-outer.png' style='position:absolute;width:90px;height:90px;left:11px'/> <img src='./img/user-card/avatar-outer.png' style='position:absolute;width:90px;height:90px;left:11px'/>
<img src="./img/department.png" style="width: 58px; height: 58px;position:absolute;left:29px; border-radius: 50%; margin-top: 16px;position:absolute;left:29px;z-index:999"/> <img src="${
</div> d.data.fleaderimg
? d.data.fleaderimg
: './img/department.png'
}" style="width: 58px; height: 58px;position:absolute;left:29px; border-radius: 50%; margin-top: 16px;position:absolute;left:29px;z-index:999"/>
</div>
<div style="display: inline-block; margin-left: 6px;width: 55%"> <div style="display: inline-block; margin-left: 6px;width: 55%">
<div class="dept-box" style="font-size: 15px;font-family: Microsoft YaHei-Regular, Microsoft YaHei;font-weight: 900;color: #333333;height: 25px;line-height: 25px;width:110px,white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"> <div class="dept-box" style="font-size: 15px;font-family: Microsoft YaHei-Regular, Microsoft YaHei;font-weight: 900;color: #333333;height: 25px;line-height: 25px;width:110px,white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">
${d.data.fname} ${d.data.fname}
</div> </div>
<div style="font-size: 13px;font-family: Microsoft YaHei-Bold, Microsoft YaHei;color: #333333;line-height: 25px;"> <div style="font-size: 13px;font-family: Microsoft YaHei-Bold, Microsoft YaHei;color: #333333;height: 25px;line-height: 25px;">
${getLabel(547190, labelData)}:${d.data.fleader} 负责人:${d.data.fleader}
</div> </div>
<div style="display:flex" > <div style="display:flex" >
<div style="height: 25px; line-height: 25px; min-width: 80px;"> <div style="height: 25px; line-height: 25px; min-width: 80px;">
${getLabel(547323, labelData)}: ${ 在岗: ${d.data.fonjob}
d.data.fonjob
} ${getLabel(547525, labelData)}
</div> </div>
</div> </div>
</div> </div>
@ -284,13 +310,9 @@ export default class DrawerComponents extends React.Component {
</div> </div>
<img src="./img/user-card/jobicon-orange.png" style="margin-left: 20px; vertical-align: top;"/> <img src="./img/user-card/jobicon-orange.png" style="margin-left: 20px; vertical-align: top;"/>
<div style="display: inline-block; margin-left: 15px;"> <div style="display: inline-block; margin-left: 15px;">
<div style="font-size: 15px;height: 25px;line-height: 25px;font-family: Microsoft YaHei-Bold, Microsoft YaHei;font-weight: bold;color: #333333;">${ <div style="font-size: 15px;height: 25px;line-height: 25px;font-family: Microsoft YaHei-Bold, Microsoft YaHei;font-weight: bold;color: #333333;">${d.data.fname}</div>
d.data.fname
}</div>
<div style="font-size: 13px;font-family: Microsoft YaHei-Regular, Microsoft YaHei;font-weight: 400;color: #333333;display: flex;height: 25px;line-height: 25px;"> <div style="font-size: 13px;font-family: Microsoft YaHei-Regular, Microsoft YaHei;font-weight: 400;color: #333333;display: flex;height: 25px;line-height: 25px;">
<span>${getLabel(547323, labelData)}: ${ <span>在岗: ${d.data.fonjob} </span>
d.data.fonjob
} ${getLabel(547525, labelData)}</span>
</div> </div>
</div> </div>
</div> </div>
@ -309,34 +331,32 @@ export default class DrawerComponents extends React.Component {
: './img/default_avator.png' : './img/default_avator.png'
}" style="width: 58px; height: 58px; border-radius: 50%; margin-top: 16px;margin-left: -6px;z-index:999" /> }" style="width: 58px; height: 58px; border-radius: 50%; margin-top: 16px;margin-left: -6px;z-index:999" />
</div> </div>
<div style="display: inline-block;width: 55%;height:100%"> <div style="display: inline-block; margin-left: 6px;width: 55%;height:100%;margin-top: -12px;">
<div style='display:flex;align-items:center;height: 25px;line-height: 25px;margin-top:2px'> <div style='display:flex;align-items:center;height: 25px;line-height: 25px;margin-top:15px'>
<div style="font-weight: bold;font-size: 14px;ont-family: Microsoft YaHei-Bold, Microsoft YaHei;color: #333333;"> <div style="font-weight: bold;font-size: 15px;ont-family: Microsoft YaHei-Bold, Microsoft YaHei;color: #333333;">${
${d.data.fname} d.data.fname
<span style='color: red;'>(${d.data.accountType})</span> }</div>
</div>
</div> </div>
<div style="font-size: 13px;margin-top: 5px;font-family: Microsoft YaHei-Regular, Microsoft YaHei;font-weight: 400;color: #333333;display: flex;height: 25px;line-height: 25px;"> <div style="font-size: 13px;font-family: Microsoft YaHei-Regular, Microsoft YaHei;font-weight: 400;color: #333333;height: 25px;line-height: 25px;">
<span>${getLabel(547324, labelData)}: ${ <span>${name}: ${d.data.localDeptName} </span>
d.data.companyWorkYear <div>岗位名称: ${d.data.jobTitle}</div>
} ${getLabel(547526, labelData)}</span>
</div> </div>
</div> </div>
</div> </div>
</div>`; </div>`;
} }
}; };
showDrawer = (params) => { showDrawer = async (params) => {
const { defaultStatusValue, defaultTypeValue } = this.state; this.setState({ open: true, params: params });
await this.getDeatilCondition();
const { defaultNbValue, defaultWbValue } = this.state;
params = { params = {
...params, ...params,
typeValue: defaultTypeValue.join(','), nbValue: defaultNbValue.join(','),
statusValue: defaultStatusValue.join(','), wbValue: defaultWbValue.join(','),
}; };
this.getDeatilDatas(params, 'chart', '0'); this.getDeatilDatas(params, 'chart', '0');
this.setState({ open: true, params: params });
}; };
onClose = () => { onClose = () => {
@ -344,63 +364,58 @@ export default class DrawerComponents extends React.Component {
open: false, open: false,
detailType: 'chart', detailType: 'chart',
showJob: false, showJob: false,
defaultStatusValue: [0, 1, 2, 3], data: [],
defaultTypeValue: ['isBelongTo'], dataSource: [],
disabled: false, defaultNbValue: [],
defaultWbValue: [],
}); });
}; };
changeDetail = () => { changeDetail = () => {
const { detailType, params, defaultTypeValue, defaultStatusValue } = const {
this.state; defaultNbValue,
const newParam = { defaultWbValue,
...params, detailType,
typeValue: defaultTypeValue.join(','), params,
statusValue: defaultStatusValue.join(','), data,
}; dataSource,
} = this.state;
let type = detailType == 'chart' ? 'table' : 'chart'; let type = detailType == 'chart' ? 'table' : 'chart';
const showJob = this.state.showJob ? '1' : '0';
this.setState({ this.setState({
detailType: type, detailType: type,
}); });
this.getDeatilDatas(newParam, type, showJob); const nParam = {
...params,
nbValue: defaultNbValue.join(','),
wbValue: defaultWbValue.join(','),
};
this.getDeatilDatas(nParam, type, '0');
}; };
onStatusChange = (checkedValues) => { onNbChange = (checkedValues) => {
const { labelData } = this.props;
if (checkedValues.length === 0) {
return message.error(`${getLabel(547728, labelData)}`, 2);
}
this.setState({ this.setState({
defaultStatusValue: checkedValues, defaultNbValue: checkedValues,
}); });
const { defaultTypeValue, params, detailType } = this.state; const { defaultWbValue, params, detailType } = this.state;
const showJob = this.state.showJob ? '1' : '0';
const nParam = { const nParam = {
...params, ...params,
statusValue: checkedValues.join(','), nbValue: checkedValues.join(','),
typeValue: defaultTypeValue.join(','), wbValue: defaultWbValue.join(','),
}; };
this.getDeatilDatas(nParam, detailType, showJob); this.getDeatilDatas(nParam, detailType, '0');
}; };
onTypeChange = (checkedValues) => { onWbChange = (checkedValues) => {
const { labelData } = this.props;
if (this.state.showJob) {
return message.error(`${getLabel(547729, labelData)}`, 2);
}
this.setState({ this.setState({
defaultTypeValue: checkedValues, defaultWbValue: checkedValues,
disabled: checkedValues.includes('isManager') ? true : false,
}); });
const { defaultStatusValue, params, detailType } = this.state; const { defaultNbValue, params, detailType } = this.state;
const showJob = this.state.showJob ? '1' : '0';
const nParam = { const nParam = {
...params, ...params,
statusValue: defaultStatusValue.join(','), nbValue: defaultNbValue.join(','),
typeValue: checkedValues.join(','), wbValue: checkedValues.join(','),
}; };
this.getDeatilDatas(nParam, detailType, showJob); this.getDeatilDatas(nParam, detailType, '0');
}; };
render() { render() {
@ -413,103 +428,68 @@ export default class DrawerComponents extends React.Component {
columns, columns,
spinning, spinning,
showJob, showJob,
defaultStatusValue, nbOptions,
defaultTypeValue, defaultNbValue,
disabled, wbOptions,
defaultWbValue,
} = this.state; } = this.state;
let arr = []; let arr = [];
const { labelData } = this.props;
const optionsType = [
{ label: `${getLabel(547715, labelData)}`, value: 'isManager' },
{ label: `${getLabel(547716, labelData)}`, value: 'isBelongTo' },
];
const optionsStatus = [
{ label: `${getLabel(547718, labelData)}`, value: 0 },
{ label: `${getLabel(547719, labelData)}`, value: 1 },
{ label: `${getLabel(547720, labelData)}`, value: 2 },
{ label: `${getLabel(547721, labelData)}`, value: 3 },
{ label: `${getLabel(547722, labelData)}`, value: 4 },
{ label: `${getLabel(547723, labelData)}`, value: 5 },
{ label: `${getLabel(547724, labelData)}`, value: 6 },
{ label: `${getLabel(547725, labelData)}`, value: 7 },
];
if (detailType == 'chart') { if (detailType == 'chart') {
arr.push({ label: `${getLabel(547315, labelData)}`, key: '1' }); arr.push({ label: '导出图片', key: '1' });
//arr.push({ label: 'PDF', key: '2' }); //arr.push({ label: 'PDF', key: '2' });
} else { } else {
arr.push({ label: `${getLabel(547448, labelData)}`, key: '3' }); arr.push({ label: '导出表格', key: '3' });
} }
const menu = <Menu onClick={this.handleExport.bind(this)} items={arr} />; const menu = <Menu onClick={this.handleExport.bind(this)} items={arr} />;
return ( return (
<Drawer <Drawer
title={getLabel(547321, labelData)} title={
<>
<CodepenCircleOutlined
style={{ color: '#0086ff', fontSize: '16px' }}
/>
<span style={{ marginLeft: '5px', color: '#0086ff' }}>
部门详情
</span>
</>
}
width={1200} width={1200}
onClose={this.onClose} onClose={this.onClose}
open={open} open={open}
bodyStyle={{
paddingBottom: 80,
}}
extra={ extra={
<Space> <Space>
{detailType == 'chart' && params && params.fclass == '0' && (
<Checkbox
style={{ marginTop: '5px', marginLeft: 100 }}
checked={showJob}
disabled={disabled}
onChange={(e) => {
this.setState({
showJob: e.target.checked,
});
const newParam = {
...params,
statusValue: defaultStatusValue.join(','),
typeValue: defaultTypeValue.join(','),
};
this.getDeatilDatas(
newParam,
detailType,
e.target.checked ? '1' : '0',
);
}}
>
{getLabel(547447, labelData)}
</Checkbox>
)}
<Dropdown overlay={menu}> <Dropdown overlay={menu}>
<Button type="primary">{getLabel(547314, labelData)}</Button> <Button type="primary">导出</Button>
</Dropdown> </Dropdown>
<Button type="primary" onClick={this.changeDetail}> <Button type="primary" onClick={this.changeDetail}>
{getLabel(547326, labelData)} 切换
</Button> </Button>
</Space> </Space>
} }
> >
<> <>
{detailType == 'chart' && ( <Row style={{ margin: '20px 20px' }}>
<Row style={{ margin: '20px 20px 0px 20px' }}> <Col span={2}>内部职工</Col>{' '}
<Col span={2}>{getLabel(547714, labelData)}</Col> <Col span={22}>
<Col span={22}> {' '}
<Checkbox.Group <Checkbox.Group
options={optionsType} options={nbOptions}
value={defaultTypeValue} value={defaultNbValue}
onChange={this.onTypeChange} onChange={this.onNbChange}
/> />
</Col> </Col>
</Row> </Row>
)} <Row style={{ margin: '0px 20px' }}>
<Row style={{ margin: '10px 20px 10px 20px' }}> <Col span={2}>外部人员</Col>
<Col span={2}>{getLabel(547717, labelData)}</Col>
<Col span={22}> <Col span={22}>
{' '}
<Checkbox.Group <Checkbox.Group
options={optionsStatus} options={wbOptions}
value={defaultStatusValue} value={defaultWbValue}
onChange={this.onStatusChange} onChange={this.onWbChange}
/> />
</Col> </Col>
</Row> </Row>
@ -518,7 +498,7 @@ export default class DrawerComponents extends React.Component {
<Spin <Spin
size="large" size="large"
spinning={spinning} spinning={spinning}
tip={getLabel(547320, labelData)} tip="正在读取数据...."
className="loading-center" className="loading-center"
/> />
{data.length > 0 && ( {data.length > 0 && (
@ -540,13 +520,16 @@ export default class DrawerComponents extends React.Component {
<Table <Table
dataSource={dataSource} dataSource={dataSource}
columns={columns} columns={columns}
scroll={{ y: 500 }}
loading={spinning} loading={spinning}
pagination={{ pagination={{
showSizeChanger: false, locale: {
showTotal: (total) => //
`${getLabel(547523, labelData)} ${ items_per_page: '条/页',
dataSource.length jump_to: '跳至',
} ${getLabel(547524, labelData)}`, page: '页',
},
showTotal: (total) => `${dataSource.length}`,
}} }}
/> />
</div> </div>

@ -12,7 +12,6 @@ import styles from './index.less';
import leftTreeShow from './img/leftTree-show.png'; import leftTreeShow from './img/leftTree-show.png';
import leftHide from './img/leftTree-hide.png'; import leftHide from './img/leftTree-hide.png';
import { CloseCircleOutlined } from '@ant-design/icons'; import { CloseCircleOutlined } from '@ant-design/icons';
import { getLabel } from '../../util/i18n.js';
export default class TimeLine extends React.Component { export default class TimeLine extends React.Component {
constructor(props) { constructor(props) {
@ -44,10 +43,10 @@ export default class TimeLine extends React.Component {
.then((res) => res.json()) .then((res) => res.json())
.then((data) => { .then((data) => {
if (data.api_status) { if (data.api_status) {
message.success(`${getLabel(547484, labelData)}`, 2, 3); message.success(`删除成功`, 2, 3);
window.location.reload(true); window.location.reload(true);
} else { } else {
message.error(`${getLabel(547483, labelData)}`, 2, 3); message.error(`系统错误`, 2, 3);
} }
}); });
} }
@ -73,8 +72,6 @@ export default class TimeLine extends React.Component {
}; };
render() { render() {
const { labelData } = this.props;
let showStyle = {}; let showStyle = {};
let positionStyle = {}; let positionStyle = {};
if (this.state.open) { if (this.state.open) {
@ -110,22 +107,19 @@ export default class TimeLine extends React.Component {
key={item.key} key={item.key}
className={styles.timeline} className={styles.timeline}
color={item.color} color={item.color}
style={{
color: item.color == 'blue' ? '#1890ff' : 'dimgray',
}}
> >
<div <div onClick={this.handleLineClick.bind(this, item)}>
className={styles.title}
style={{
color: item.color == 'blue' ? '#1890ff' : 'dimgray',
}}
onClick={this.handleLineClick.bind(this, item)}
>
{item.title} {item.title}
</div> </div>
{item.key != 0 && ( {item.key != 0 && (
<Popconfirm <Popconfirm
title={`${getLabel(547491, labelData)}[${item.title}]?`} title={`确认要删除[${item.title}]版本?`}
onConfirm={this.handleDelete.bind(this, item.key)} onConfirm={this.handleDelete.bind(this, item.key)}
okText={getLabel(547319, labelData)} okText="确认"
cancelText={getLabel(547318, labelData)} cancelText="取消"
> >
<div className={styles.delete}> <div className={styles.delete}>
<CloseCircleOutlined /> <CloseCircleOutlined />

@ -15,9 +15,9 @@
cursor: pointer; cursor: pointer;
} }
// .timeline .title:hover { .timeline :hover {
// color: #1890ff; color: #1890ff;
// } }
.time { .time {
color: dimgray; color: dimgray;

@ -15,17 +15,14 @@ import {
Modal, Modal,
Input, Input,
message, message,
notification,
} from 'antd'; } from 'antd';
const { Option } = Select; const { Option } = Select;
const { TextArea } = Input; const { TextArea } = Input;
import moment from 'moment'; import moment from 'moment';
import 'moment/locale/zh-cn'; import 'moment/locale/zh-cn';
import locale from 'antd/lib/date-picker/locale/zh_CN'; import locale from 'antd/lib/date-picker/locale/zh_CN';
import { HomeOutlined, FolderOutlined } from '@ant-design/icons'; import { HomeOutlined, FolderOpenOutlined } from '@ant-design/icons';
moment.locale('zh-cn'); moment.locale('zh-cn');
import { getLabel } from '../../util/i18n.js';
import { SmileOutlined } from '@ant-design/icons';
export class TopBar extends React.Component { export class TopBar extends React.Component {
constructor(props) { constructor(props) {
@ -35,18 +32,19 @@ export class TopBar extends React.Component {
rootTreeData: [], // rootTreeData: [], //
treeLoadedKeys: [], treeLoadedKeys: [],
treeExpandedKeys: [], treeExpandedKeys: [],
deptTreeData: [],
requestData: { requestData: {
fclass: '0', fclass: '0',
root: undefined, root: undefined,
level: '2', department: undefined,
level: '3',
fisvitual: '0', fisvitual: '0',
hidedept: '0', hidedept: '0',
showClass: '0', // 0
}, },
open: false, open: false,
confirmLoading: false, confirmLoading: false,
description: '', description: '',
timelineId: '0',
treeKey: 1,
}; };
} }
@ -59,37 +57,17 @@ export class TopBar extends React.Component {
this.setState({ requestData }); this.setState({ requestData });
} }
handleTreeData(treeData = [], timelineId) {
this.setState({
rootTreeData: treeData,
timelineId: timelineId,
treeKey: this.state.treeKey + 1,
});
}
onChange = (e) => { onChange = (e) => {
this.setState({ description: e.target.value }); this.setState({ description: e.target.value });
}; };
generateKey = (
length = 5,
chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789',
) => {
let result = '';
for (let i = 0; i < length; i++) {
result += chars.charAt(Math.floor(Math.random() * chars.length));
}
return result;
};
/** /**
* 弹窗确认 * 弹窗确认
*/ */
handleOk = () => { handleOk = () => {
const { description, requestData } = this.state; const { description, requestData } = this.state;
const { labelData } = this.props;
if (description.length == 0) { if (description.length == 0) {
return message.error(`${getLabel(547512, labelData)}`); return message.error('请填写描述信息');
} }
this.setState({ confirmLoading: true }); this.setState({ confirmLoading: true });
let api = let api =
@ -105,9 +83,9 @@ export class TopBar extends React.Component {
open: false, open: false,
confirmLoading: false, confirmLoading: false,
}); });
message.success(`${getLabel(547513, labelData)}`, 2, 3); message.success('版本记录成功,请重新刷新页面', 2, 3);
} else { } else {
message.error(`${getLabel(547514, labelData)}`, 2, 3); message.error('版本记录失败,请联系相关人员处理数据', 2, 3);
} }
}); });
}; };
@ -138,9 +116,6 @@ export class TopBar extends React.Component {
} }
arr.map((item, index) => { arr.map((item, index) => {
item.icon = <HomeOutlined />; item.icon = <HomeOutlined />;
if (item.type == 2) {
item.icon = <FolderOutlined />;
}
}); });
this.setState({ this.setState({
rootTreeData: arr, rootTreeData: arr,
@ -159,14 +134,11 @@ export class TopBar extends React.Component {
const { id } = treeNode; const { id } = treeNode;
setTimeout(() => { setTimeout(() => {
const { fclass } = this.state.requestData; const { fclass } = this.state.requestData;
const { timelineId } = this.state;
let api = let api =
'/api/bs/hrmorganization/orgchart/getSubCompanyTree?subcompany=' + '/api/bs/hrmorganization/orgchart/getSubCompanyTree?subcompany=' +
id + id +
'&fclass=' + '&fclass=' +
fclass + fclass;
'&id=' +
timelineId;
this.getNodeTreeNode(api); this.getNodeTreeNode(api);
resolve(undefined); resolve(undefined);
}, 500); }, 500);
@ -187,6 +159,29 @@ export class TopBar extends React.Component {
this.getSeatchCondition(this.props.url); this.getSeatchCondition(this.props.url);
} }
/**
* 部门节点树
*/
getDeptTreeData = (url) => {
fetch(url)
.then((res) => res.json())
.then((data) => {
if (data.api_status) {
let arr = [...data.departmentTree];
arr.map((item, index) => {
item.icon = <FolderOpenOutlined />;
});
this.setState({
deptTreeData: arr,
});
}
});
};
onDeptChange = (value, label, extra) => {
this.handleFormChange({ department: value });
};
getSeatchCondition = (url) => { getSeatchCondition = (url) => {
fetch(url) fetch(url)
.then((res) => res.json()) .then((res) => res.json())
@ -194,10 +189,14 @@ export class TopBar extends React.Component {
data.companyTree.map((item, index) => { data.companyTree.map((item, index) => {
item.icon = <HomeOutlined />; item.icon = <HomeOutlined />;
}); });
this.handleFormChange({ root: data.root });
this.setState({ this.setState({
fclasslist: data.fclasslist, fclasslist: data.fclasslist,
rootTreeData: data.companyTree, rootTreeData: data.companyTree,
}); });
this.getDeptTreeData(
`/api/bs/hrmorganization/orgchart/getDepartmentTree?fclass=0&subcompany=${data.root}`,
);
}); });
}; };
@ -206,7 +205,7 @@ export class TopBar extends React.Component {
onClick={this.handleExportMenuClick.bind(this)} onClick={this.handleExportMenuClick.bind(this)}
items={[ items={[
{ {
label: `${getLabel(547315, this.props.labelData)}`, label: '导出图片',
key: '1', key: '1',
}, },
// { // {
@ -218,63 +217,62 @@ export class TopBar extends React.Component {
); );
render() { render() {
const { disabled, type, labelData } = this.props; const { disabled, type, timelineId } = this.props;
const { rootTreeData, open, confirmLoading, treeExpandedKeys, treeKey } = const {
this.state; rootTreeData,
open,
confirmLoading,
treeExpandedKeys,
requestData,
deptTreeData,
} = this.state;
const { fclass, department, root, showClass } = requestData;
return ( return (
<div className={style.topbarWrapper}> <div className={style.topbarWrapper}>
<Row> <Row>
<Col span={6}> <Col span={6}>
{getLabel(547293, labelData)} 所属分部
<Select
defaultValue="0"
style={{ width: 140 }}
value={this.state.requestData.fclass}
onChange={(value) => {
const requestData = {
fclass: value,
root: undefined,
level: '2',
fisvitual: '0',
hidedept: '0',
};
this.handleFormChange(requestData);
this.setState({
rootTreeData: [],
});
this.getNodeTreeNode(
`/api/bs/hrmorganization/orgchart/getSubCompanyTree?fclass=${value}`,
false,
);
this.props.changeFclass(requestData);
}}
>
{this.state.fclasslist.map((item) => (
<Option key={item.key} value={item.id}>
{item.companyname}
</Option>
))}
</Select>
</Col>
<Col span={8}>
{getLabel(547294, labelData)}
<TreeSelect <TreeSelect
key={treeKey} disabled
treeDataSimpleMode treeDataSimpleMode
allowClear allowClear
style={{ width: '65%' }} style={{ width: '75%' }}
value={this.state.requestData.root} value={root}
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }} dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
placeholder={getLabel(547298, labelData)} placeholder="请选择根节点"
onChange={this.onRootChange} onChange={this.onRootChange}
loadData={this.onRootLoadData} loadData={this.onRootLoadData}
treeData={rootTreeData} treeData={rootTreeData}
treeIcon treeIcon
/> />
</Col> </Col>
<Col span={5}> {timelineId == 0 && (
<Col span={6}>
<Checkbox
style={{ marginTop: '5px', marginLeft: 60 }}
checked={showClass == '1'}
onChange={(e) =>
this.handleFormChange({
showClass: e.target.checked ? '1' : '0',
})
}
>
显示班组
</Checkbox>
<Tooltip
title="提示:开启后将显示班组信息"
color="#0082fb"
placement="rightTop"
>
<QuestionCircleOutlined
style={{ color: '#0082fb', cursor: 'pointer', fontSize: 16 }}
/>
</Tooltip>
</Col>
)}
<Col span={6}>
<Checkbox <Checkbox
style={{ marginTop: '5px', marginLeft: 100 }} style={{ marginTop: '5px', marginLeft: 100 }}
checked={this.state.requestData.hidedept == '1'} checked={this.state.requestData.hidedept == '1'}
@ -284,10 +282,10 @@ export class TopBar extends React.Component {
}) })
} }
> >
{getLabel(547296, labelData)} 隐藏部门
</Checkbox> </Checkbox>
<Tooltip <Tooltip
title={getLabel(547303, labelData)} title="提示:开启后将只显示分部组织架构!!!"
color="#0082fb" color="#0082fb"
placement="rightTop" placement="rightTop"
> >
@ -296,79 +294,39 @@ export class TopBar extends React.Component {
/> />
</Tooltip> </Tooltip>
</Col> </Col>
<Col span={5}> <Col span={6}>
{getLabel(547299, labelData)} 部门层级
<Select <Select
defaultValue="3" defaultValue="3"
style={{ width: 140 }} style={{ width: 140 }}
value={this.state.requestData.level} value={this.state.requestData.level}
onChange={(value) => this.handleFormChange({ level: value })} onChange={(value) => this.handleFormChange({ level: value })}
> >
<Option value="1">{getLabel(547301, labelData)}</Option> <Option value="1">全部</Option>
<Option value="2">{getLabel(547463, labelData)}</Option> <Option value="2">一级</Option>
<Option value="3">{getLabel(547464, labelData)}</Option> <Option value="3">二级</Option>
<Option value="4">{getLabel(547465, labelData)}</Option> <Option value="4">三级</Option>
</Select> </Select>
</Col> </Col>
</Row> </Row>
<Row style={{ marginTop: '15px' }}> <Row style={{ marginTop: '15px' }}>
<Col span={6}> {timelineId == 0 && (
<Checkbox <Col span={6}>
style={{ marginTop: '5px' }} 部门节点
checked={this.state.requestData.fisvitual == '1'} <TreeSelect
onChange={(e) => treeDataSimpleMode
this.handleFormChange({ allowClear
fisvitual: e.target.checked ? '1' : '0', style={{ width: '75%' }}
}) value={department}
} dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
> placeholder="请选择"
{getLabel(547302, labelData)} onChange={this.onDeptChange}
</Checkbox> treeData={deptTreeData}
<Tooltip treeIcon
title={getLabel(547304, labelData)}
color="#0082fb"
placement="rightTop"
>
<QuestionCircleOutlined
style={{ color: '#0082fb', cursor: 'pointer', fontSize: 16 }}
/> />
</Tooltip> </Col>
</Col> )}
<Col span={6} style={{ textAlign: 'center' }}>
<Col span={10}>
{this.state.requestData.fclass == '0' && (
<span>
<Button
type="primary"
style={{ marginRight: '10px' }}
disabled={disabled}
onClick={() => {
this.setState({ open: true });
}}
>
{getLabel(547305, labelData)}
</Button>
<Button
type="primary"
style={{ marginRight: '10px' }}
onClick={() => {
window.open('#/dragtree', 'blank');
}}
>
{getLabel(547310, labelData)}
</Button>
<Button
type="primary"
style={{ marginRight: '10px' }}
onClick={() => {
window.open('#/statistics', 'blank');
}}
>
{getLabel(547313, labelData)}
</Button>
</span>
)}
<Button <Button
type="primary" type="primary"
style={{ marginRight: '10px' }} style={{ marginRight: '10px' }}
@ -376,28 +334,47 @@ export class TopBar extends React.Component {
this.props.onSearch(this.state.requestData); this.props.onSearch(this.state.requestData);
}} }}
> >
{getLabel(547307, labelData)} 查询
</Button> </Button>
{/* <Button
type="primary"
style={{ marginRight: '10px' }}
onClick={() => {
window.open('#/dragtree', 'blank');
}}
>
组织调整
</Button>
<Button
type="primary"
style={{ marginRight: '10px' }}
onClick={() => {
window.open('#/statistics', 'blank');
}}
>
人数统计
</Button> */}
<Dropdown overlay={this.menu}> <Dropdown overlay={this.menu}>
<Button type="primary">{getLabel(547314, labelData)}</Button> <Button type="primary">导出</Button>
</Dropdown> </Dropdown>
</Col> </Col>
</Row> </Row>
<Modal <Modal
title={getLabel(547305, labelData)} title="版本记录"
cancelText={getLabel(547318, labelData)} cancelText="取消"
okText={getLabel(547319, labelData)} okText="确定"
open={open} open={open}
onOk={this.handleOk} onOk={this.handleOk}
confirmLoading={confirmLoading} confirmLoading={confirmLoading}
onCancel={() => this.setState({ open: false })} onCancel={() => this.setState({ open: false })}
> >
<p style={{ color: 'red' }}>{getLabel(547316, labelData)}</p> <p style={{ color: 'red' }}>
<p>{getLabel(547317, labelData)}:</p> 提示:版本记录耗时较长请谨慎操作仅记录当前维度的数据版本
</p>
<p>主题:</p>
<TextArea <TextArea
showCount showCount
maxLength={20} maxLength={10}
style={{ height: 120, resize: 'none' }} style={{ height: 120, resize: 'none' }}
onChange={this.onChange} onChange={this.onChange}
placeholder="please enter" placeholder="please enter"

@ -230,8 +230,8 @@ export class OrgChart {
top: { top: {
nodeLeftX: (node) => -node.width / 2, nodeLeftX: (node) => -node.width / 2,
nodeRightX: (node) => node.width / 2, nodeRightX: (node) => node.width / 2,
nodeTopY: (node) => 0, //nodeTopY: (node) => 0,
//nodeTopY: (node) => node.height / 0.3, nodeTopY: (node) => node.height / 0.4,
nodeBottomY: (node) => node.height, nodeBottomY: (node) => node.height,
nodeJoinX: (node) => node.x - node.width / 2, nodeJoinX: (node) => node.x - node.width / 2,
nodeJoinY: (node) => node.y + node.height, nodeJoinY: (node) => node.y + node.height,

@ -10,9 +10,10 @@ import OperateDialog from '../components/dialog';
import jsPDF from 'jspdf'; import jsPDF from 'jspdf';
import moment from 'moment'; import moment from 'moment';
import qs from 'qs'; import qs from 'qs';
import { message, Spin, notification } from 'antd'; import { message, Spin, notification, Affix, Button, Tooltip } from 'antd';
import { SmileOutlined } from '@ant-design/icons'; import { SmileOutlined } from '@ant-design/icons';
import { getLabel } from '../util/i18n.js'; import remind from '../../public/img/remind.png';
import hand from '../../public/img/hand.gif';
let active = 'top'; let active = 'top';
let drawerCom = null; let drawerCom = null;
@ -21,6 +22,8 @@ let timeLine = null;
let orgChart = null; let orgChart = null;
let topbar = null; let topbar = null;
let versionId = 0;
export default function companyPage() { export default function companyPage() {
const [data, setData] = useState(null); const [data, setData] = useState(null);
let compact = 0; let compact = 0;
@ -33,13 +36,17 @@ export default function companyPage() {
const [timelineId, setTimelineId] = useState(0); const [timelineId, setTimelineId] = useState(0);
const infoRef = useRef(); const infoRef = useRef();
const [labelData, setLabelData] = useState({}); useEffect(() => {
const [lebelCompleted, setLabelCompleted] = useState(false); notification.open({
message: '提示',
description:
'组织架构图中编制数和在编数显示初始化需参考文档配置定时任务并执行!!!(编制数默认取本年度最新编制信息,人数统计展示仅限于行政维度)',
icon: <SmileOutlined style={{ color: '#108ee9' }} />,
});
}, []);
useEffect(() => { useEffect(() => {
infoRef.current = timelineId; infoRef.current = timelineId;
}, [timelineId]); }, [timelineId]);
const [spinning, setSpinning] = useState(false); const [spinning, setSpinning] = useState(false);
// //
@ -49,6 +56,8 @@ export default function companyPage() {
rootId: node.id, rootId: node.id,
fclass: topbar.state.requestData.fclass, fclass: topbar.state.requestData.fclass,
id: infoRef.current, id: infoRef.current,
versionId: versionId,
deptLevel: node.deptLevel,
}; };
drawerCom.showDrawer(params); drawerCom.showDrawer(params);
} }
@ -76,10 +85,9 @@ export default function companyPage() {
'/api/bs/hrmorganization/orgchart/asyncCompanyData' + '/api/bs/hrmorganization/orgchart/asyncCompanyData' +
qs.stringify(request, { addQueryPrefix: true }); qs.stringify(request, { addQueryPrefix: true });
} else { } else {
let request = { ...topbar.state.requestData, ids: idsStr };
api = api =
'/api/bs/hrmorganization/orgchart/asyncCompanyData' + '/api/bs/hrmorganization/orgchart/asyncCompanyData?fclass=0&fisvitual=0&id=0&root=0&ids=' +
qs.stringify(request, { addQueryPrefix: true }); idsStr;
} }
fetch(api) fetch(api)
.then((res) => res.json()) .then((res) => res.json())
@ -95,8 +103,13 @@ export default function companyPage() {
}; };
// //
function getDepartmentImage(fisvitual) { function getDepartmentImage(level) {
return fisvitual == '0' ? `./img/back/level4.png` : `./img/back/level8.png`; //return `./img/department/dept${level}.png`;
if (level == '0' || level == '1') {
return `./img/department/dept${level}.png`;
} else {
return `./img/department/dept2.png`;
}
} }
// //
@ -104,30 +117,15 @@ export default function companyPage() {
return fisvitual == '0' ? `./img/back/level1.png` : `./img/back/level5.png`; return fisvitual == '0' ? `./img/back/level1.png` : `./img/back/level5.png`;
} }
//
useEffect(() => {
d3.json('/api/bs/hrmorganization/orgchart/i18n').then((res) => {
setLabelData(res.data);
setLabelCompleted(true);
notification.open({
message: `${getLabel(547283, res.data)}`,
description: `${getLabel(547292, res.data)}`,
icon: <SmileOutlined style={{ color: '#108ee9' }} />,
});
});
}, []);
// //
useEffect(() => { useEffect(() => {
if (lebelCompleted) { d3.json(
d3.json( '/api/bs/hrmorganization/orgchart/companyData?fclass=0&fisvitual=0&hidedept=0&root=0&level=3&id=0&showClass=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); });
}); }, [true]);
}
}, [lebelCompleted]);
// ButtonContent // ButtonContent
const buttonContentRender = ({ node, state }) => { const buttonContentRender = ({ node, state }) => {
@ -164,9 +162,11 @@ export default function companyPage() {
const nodeContentRender = (d, i, arr, state) => { const nodeContentRender = (d, i, arr, state) => {
let fclass = topbar.state.requestData.fclass; let fclass = topbar.state.requestData.fclass;
let statisticsStyle = fclass == 0 ? 'block' : 'none'; let statisticsStyle = fclass == 0 ? 'block' : 'none';
// let flevelStyle =
// d.data.ftype == 2 && d.data.deptLevel == 0 ? 'inline-block' : 'none';
if (d.data.ftype == 0) { if (d.data.ftype == 0) {
return `<div style="text-align: center;"> return `<div>
<div style="display: inline-block; margin-left: 5px;"> <div style="display: inline-block; text-align: center; margin-left: 5px;">
<div style=" <div style="
font-size: 24px; font-size: 24px;
font-family: Microsoft YaHei-Bold, Microsoft YaHei; font-family: Microsoft YaHei-Bold, Microsoft YaHei;
@ -186,14 +186,12 @@ export default function companyPage() {
</div> </div>
<div style="width: 144px;height: 80px;top: 35px;position: relative;font-weight: 400;font-size: 14px; <div style="width: 144px;height: 80px;top: 35px;position: relative;font-weight: 400;font-size: 14px;
font-family: Microsoft YaHei-Regular, Microsoft YaHei;color: #333333;text-align: center;"> font-family: Microsoft YaHei-Regular, Microsoft YaHei;color: #333333;text-align: center;">
<div class="tooltip"> <div title=${
<div class="tooltitle"> ${d.data.fname} </div> d.data.fname
<div class="tooltiptext">${d.data.fname}</div> } style="width: 110px;margin: 0 auto;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;-o-text-overflow:ellipsis;
</div> line-height: 18px;word-break: break-all;">${d.data.fname}</div>
<div style="display: ${statisticsStyle}"> <div style="display: ${statisticsStyle}">
<span style="color:red">${d.data.staffNum}</span> / <span style="color:red;}">${d.data.staffNum}</span>
<span style="color:green">${d.data.onJobNum}</span>
</div> </div>
</div> </div>
</div> </div>
@ -203,19 +201,15 @@ export default function companyPage() {
<div style="width: 100%; height: 100%; background-size: 100% 100%;"> <div style="width: 100%; height: 100%; background-size: 100% 100%;">
<div style='position:absolute;height:100%'> <div style='position:absolute;height:100%'>
<img style='width:144px;height:106px' src="${getDepartmentImage( <img style='width:144px;height:106px' src="${getDepartmentImage(
d.data.fisvitual, d.data.deptLevel,
)}"/> )}"/>
</div> </div>
<div style="width: 144px;height: 80px;top: 35px;position: relative;font-weight: 400;font-size: 14px; <div style="width: 144px;height: 80px;top: 35px;position: relative;font-weight: 400;font-size: 14px;
font-family: Microsoft YaHei-Regular, Microsoft YaHei;color: #333333;text-align: center;"> font-family: Microsoft YaHei-Regular, Microsoft YaHei;color: #333333;text-align: center;">
<div class="tooltip"> <div style="width: 110px;margin: 0 auto;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;
<div class="tooltitle"> ${d.data.fname} </div> line-height: 18px;word-break: break-all;">${d.data.fname}</div>
<div class="tooltiptext">${d.data.fname}</div>
</div>
<div style="display: ${statisticsStyle}"> <div style="display: ${statisticsStyle}">
<span style="color:red">${d.data.staffNum}</span> / <span style="color:red;">${d.data.staffNum} </span>
<span style="color:green">${d.data.onJobNum}</span>
</div> </div>
</div> </div>
</div> </div>
@ -351,10 +345,6 @@ export default function companyPage() {
*/ */
const handleExport = (type) => { const handleExport = (type) => {
if (type == 'png') { if (type == 'png') {
const hiddenElements = document.querySelectorAll('.tooltitle');
const hiddenElementsArray = Array.from(hiddenElements);
// DOM
hiddenElementsArray.forEach((el) => (el.style.display = 'none'));
orgChart && orgChart.exportImg({ full: true }); orgChart && orgChart.exportImg({ full: true });
} else { } else {
orgChart && downloadPdf(orgChart); orgChart && downloadPdf(orgChart);
@ -367,16 +357,14 @@ export default function companyPage() {
*/ */
const timeLineSearch = (timeline) => { const timeLineSearch = (timeline) => {
setTimelineId(timeline.id); setTimelineId(timeline.id);
versionId = timeline.id;
const fclass = topbar.state.requestData.fclass; const fclass = topbar.state.requestData.fclass;
const resetParams = { const resetParams = {
root: undefined,
level: '2', level: '2',
fisvitual: '0', fisvitual: '0',
hidedept: '0', hidedept: '0',
}; };
topbar.handleFormChange({ ...resetParams }); topbar.handleFormChange({ ...resetParams });
//
topbar.handleTreeData([], timeline.id);
topbar.getNodeTreeNode( topbar.getNodeTreeNode(
`/api/bs/hrmorganization/orgchart/getSubCompanyTree?fclass=${fclass}&id=${timeline.id}`, `/api/bs/hrmorganization/orgchart/getSubCompanyTree?fclass=${fclass}&id=${timeline.id}`,
false, false,
@ -404,7 +392,7 @@ export default function companyPage() {
if (data.data) { if (data.data) {
if (!data.data.length) { if (!data.data.length) {
setData([{}]); setData([{}]);
message.warning(`${getLabel(547516, labelData)}`); message.warning('暂无数据');
} else { } else {
setData(data?.data); setData(data?.data);
} }
@ -451,14 +439,13 @@ export default function companyPage() {
style={{ display: 'block', margin: '0 auto' }} style={{ display: 'block', margin: '0 auto' }}
src="./img/permission.png" src="./img/permission.png"
/> />
<p style={{ textAlign: 'center' }}>{getLabel(547515, labelData)}</p> <p style={{ textAlign: 'center' }}>对不起您暂时没有权限!</p>
</div> </div>
); );
} }
return ( return (
hasRight && hasRight && (
Object.keys(labelData).length != 0 && (
<div className={styles.contentWrapper}> <div className={styles.contentWrapper}>
<TopBar <TopBar
ref={(r) => (topbar = r)} ref={(r) => (topbar = r)}
@ -471,9 +458,9 @@ export default function companyPage() {
changeFclass={(requestData) => { changeFclass={(requestData) => {
handleChange(requestData); handleChange(requestData);
}} }}
timelineId={timelineId}
type="company" type="company"
url="/api/bs/hrmorganization/orgchart/getCondition?fclass=0&type=company&id=0" url="/api/bs/hrmorganization/orgchart/getCondition?fclass=0&type=company&id=0"
labelData={labelData}
/> />
<ToolBar <ToolBar
onTopLayoutClick={(progressBtn) => handleTopLayoutClick(progressBtn)} onTopLayoutClick={(progressBtn) => handleTopLayoutClick(progressBtn)}
@ -496,7 +483,6 @@ export default function companyPage() {
timeLineSearch(timeline); timeLineSearch(timeline);
}} }}
url={'/api/bs/hrmorganization/orgchart/timeLines?fclass=0'} url={'/api/bs/hrmorganization/orgchart/timeLines?fclass=0'}
labelData={labelData}
/> />
<Spin size="large" spinning={spinning}> <Spin size="large" spinning={spinning}>
<OrgChartComponent <OrgChartComponent
@ -511,13 +497,22 @@ export default function companyPage() {
nodeContent={nodeContentRender} nodeContent={nodeContentRender}
/> />
</Spin> </Spin>
<DrawerComponents ref={(r) => (drawerCom = r)} labelData={labelData} /> <DrawerComponents ref={(r) => (drawerCom = r)} />
<OperateDialog <OperateDialog
ref={(r) => (operateCom = r)} ref={(r) => (operateCom = r)}
addFolderNode={addFolderNode} addFolderNode={addFolderNode}
deleteNode={deleteNode} deleteNode={deleteNode}
labelData={labelData}
/> />
<Affix style={{ position: 'fixed', top: 200, left: 20 }}>
<Tooltip
title="提示:图中红色数字代表编制数,绿色数字代表在职人数"
color="#0082fb"
placement="rightTop"
>
<img className={styles.remindImage} src={remind} />
</Tooltip>
<img className={styles.handImage} alt="手势" src={hand} />
</Affix>
</div> </div>
) )
); );

@ -5,7 +5,6 @@ import qs from 'qs';
import MergeDialog from '../components/dialog/mergeDialog'; import MergeDialog from '../components/dialog/mergeDialog';
import CopyDialog from '../components/dialog/copyDialog'; import CopyDialog from '../components/dialog/copyDialog';
import inset from '../../public/img/back/inset.png'; import inset from '../../public/img/back/inset.png';
import { getLabel } from '../util/i18n.js';
import { import {
HomeOutlined, HomeOutlined,
@ -22,7 +21,7 @@ const DragTree = () => {
const [expandedKeys, setExpandedKeys] = useState([undefined]); const [expandedKeys, setExpandedKeys] = useState([undefined]);
const childRef = useRef(null); const childRef = useRef(null);
const copyChildRef = useRef(null); const copyChildRef = useRef(null);
const [tip, setTip] = useState(''); const [tip, setTip] = useState('正在加载,请稍候...');
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [showCanceled, setShowCanceled] = useState(0); const [showCanceled, setShowCanceled] = useState(0);
const [drawerOpen, setDrawerOpen] = useState(false); const [drawerOpen, setDrawerOpen] = useState(false);
@ -32,13 +31,8 @@ const DragTree = () => {
const [mergeId, setMergeId] = useState(null); const [mergeId, setMergeId] = useState(null);
const [copyopen, setCopyOpen] = useState(false); const [copyopen, setCopyOpen] = useState(false);
const [copyId, setCopyId] = useState(null); const [copyId, setCopyId] = useState(null);
const [labelData, setLabelData] = useState({});
useEffect(() => { useEffect(() => {
d3.json('/api/bs/hrmorganization/orgchart/i18n').then((res) => {
setLabelData(res.data);
setTip(`${getLabel(547473, res.data)}`);
});
getMoveTree(0); getMoveTree(0);
}, [true]); }, [true]);
@ -78,24 +72,19 @@ const DragTree = () => {
info.dropPosition - Number(dropPos[dropPos.length - 1]); info.dropPosition - Number(dropPos[dropPos.length - 1]);
if (dropPosition == -1) { if (dropPosition == -1) {
return message.error(`${getLabel(547475, labelData)}`, 2); return message.error('不支持该操作!!!', 2);
} }
let pos = let pos = dropPosition == 0 ? '内部' : '下方';
dropPosition == 0
? `${getLabel(547476, labelData)}`
: `${getLabel(547477, labelData)}`;
let title = `${getLabel(547478, labelData)}${ let title = `确定将【${info.dragNode.title}】移到 【${info.node.title}${pos}`;
info.dragNode.title
} ${getLabel(547479, labelData)} ${info.node.title}${pos}`;
Modal.confirm({ Modal.confirm({
title: `${getLabel(547480, labelData)}`, title: '转移操作',
content: title, content: title,
okText: `${getLabel(547319, labelData)}`, okText: '确认',
cancelText: `${getLabel(547318, labelData)}`, cancelText: '取消',
onOk() { onOk() {
setLoading(true); setLoading(true);
setTip(`${getLabel(547481, labelData)}`); setTip('正在转移,请稍候...');
fetch('/api/bs/hrmorganization/dept/dragDepartment', { fetch('/api/bs/hrmorganization/dept/dragDepartment', {
method: 'POST', method: 'POST',
@ -153,14 +142,14 @@ const DragTree = () => {
} }
} }
setGData(data); setGData(data);
message.success(`${getLabel(547482, labelData)}`, 2); message.success('转移成功', 2);
} else { } else {
message.warning(res.msg, 2); message.warning(res.msg, 2);
} }
setLoading(false); setLoading(false);
}) })
.catch((error) => { .catch((error) => {
message.error(`${getLabel(547483, labelData)}`); message.error('接口异常,请联系管理员');
}); });
}, },
onCancel() {}, onCancel() {},
@ -189,14 +178,14 @@ const DragTree = () => {
arr.splice(index, 1); arr.splice(index, 1);
}); });
setGData(data); setGData(data);
message.success(`${getLabel(547484, labelData)}`, 2); message.success('删除成功', 2);
} else { } else {
message.warning(res.data.message, 2); message.warning(res.data.message, 2);
} }
} }
}) })
.catch((error) => { .catch((error) => {
message.error(`${getLabel(547483, labelData)}`); message.error('接口异常,请联系管理员');
}); });
}; };
@ -222,7 +211,7 @@ const DragTree = () => {
if (res.code == 200) { if (res.code == 200) {
const data = [...gData]; const data = [...gData];
if (nodeData.canceled != '0') { if (nodeData.canceled != '0') {
message.success(`${getLabel(547485, labelData)}`, 2); message.success('恢复成功', 2);
loop(data, nodeData.key, (item, index, arr) => { loop(data, nodeData.key, (item, index, arr) => {
arr[index].canceled = '0'; arr[index].canceled = '0';
}); });
@ -230,7 +219,7 @@ const DragTree = () => {
loop(data, nodeData.key, (item, index, arr) => { loop(data, nodeData.key, (item, index, arr) => {
arr.splice(index, 1); arr.splice(index, 1);
}); });
message.success(`${getLabel(547486, labelData)}`, 2); message.success('封存成功', 2);
} }
setGData(data); setGData(data);
} else { } else {
@ -238,7 +227,7 @@ const DragTree = () => {
} }
}) })
.catch((error) => { .catch((error) => {
message.error(`${getLabel(547483, labelData)}`); message.error('接口异常,请联系管理员');
}); });
}; };
@ -271,14 +260,14 @@ const DragTree = () => {
.then((res) => { .then((res) => {
if (res.code == 200) { if (res.code == 200) {
getMoveTree(0, values.department); getMoveTree(0, values.department);
message.success(`${getLabel(547487, labelData)}`, 2); message.success('合并成功', 2);
} else { } else {
message.warning(res.msg, 2); message.warning(res.msg, 2);
} }
setOpen(false); setOpen(false);
}) })
.catch((error) => { .catch((error) => {
message.error(`${getLabel(547483, labelData)}`); message.error('接口异常,请联系管理员');
}); });
}; };
@ -312,13 +301,13 @@ const DragTree = () => {
if (res.code == 200) { if (res.code == 200) {
setCopyOpen(false); setCopyOpen(false);
getMoveTree(0, values.company); getMoveTree(0, values.company);
message.success(`${getLabel(547488, labelData)}`, 2); message.success('复制成功', 2);
} else { } else {
message.warning(res.msg, 2); message.warning(res.msg, 2);
} }
}) })
.catch((error) => { .catch((error) => {
message.error(`${getLabel(547483, labelData)}`); message.error('接口异常,请联系管理员');
}); });
}; };
@ -344,7 +333,7 @@ const DragTree = () => {
{nodeData.title} {nodeData.title}
{nodeData.canceled == '1' ? ( {nodeData.canceled == '1' ? (
<span style={{ color: 'red', marginLeft: '5px' }}> <span style={{ color: 'red', marginLeft: '5px' }}>
({getLabel(547489, labelData)}) (已封存)
</span> </span>
) : ( ) : (
'' ''
@ -363,28 +352,24 @@ const DragTree = () => {
); );
}} }}
> >
{getLabel(547490, labelData)} 查看
</span> </span>
<Popconfirm <Popconfirm
title={`${getLabel(547491, labelData)}[${nodeData.title}]?`} title={`确认要删除[${nodeData.title}]?`}
onConfirm={() => onDelete(nodeData)} onConfirm={() => onDelete(nodeData)}
okText={getLabel(547319, labelData)} okText="确认"
cancelText={getLabel(547318, labelData)} cancelText="取消"
> >
<span className="drag-button"> <span className="drag-button">删除</span>
{getLabel(547492, labelData)}
</span>
</Popconfirm> </Popconfirm>
<Popconfirm <Popconfirm
title={`${getLabel(547493, labelData)} [${nodeData.title}]?`} title={`确认要封存或恢复 [${nodeData.title}]?`}
onConfirm={() => onCancel(nodeData)} onConfirm={() => onCancel(nodeData)}
okText={getLabel(547319, labelData)} okText="确认"
cancelText={getLabel(547318, labelData)} cancelText="取消"
> >
<span className="drag-button"> <span className="drag-button">
{nodeData.canceled == '0' {nodeData.canceled == '0' ? '封存' : '恢复'}
? `${getLabel(547494, labelData)}`
: `${getLabel(547495, labelData)}`}
</span> </span>
</Popconfirm> </Popconfirm>
<span <span
@ -392,14 +377,14 @@ const DragTree = () => {
className="drag-button" className="drag-button"
onClick={() => onMerge(nodeData)} onClick={() => onMerge(nodeData)}
> >
{getLabel(547194, labelData)} 合并
</span> </span>
<span <span
style={{ display: attr }} style={{ display: attr }}
className="drag-button" className="drag-button"
onClick={() => onCopy(nodeData)} onClick={() => onCopy(nodeData)}
> >
{getLabel(547196, labelData)} 复制
</span> </span>
</div> </div>
</> </>
@ -413,84 +398,82 @@ const DragTree = () => {
}; };
return ( return (
Object.keys(labelData).length != 0 && ( <div className="drag-wrapper">
<div className="drag-wrapper"> <Spin tip={tip} spinning={loading}>
<Spin tip={tip} spinning={loading}> <div className="drag-layout">
<div className="drag-layout"> <div className="drag-header">
<div className="drag-header"> <img src={inset} />
<img src={inset} /> <div>组织快速调整</div>
<div>{getLabel(547282, labelData)}</div> </div>
</div> <div className="drag-content">
<div className="drag-content"> <ApartmentOutlined
<ApartmentOutlined className="drag-showcanceled"
className="drag-showcanceled" style={{ color: showCanceled == 0 ? '#000' : '#1890ff' }}
style={{ color: showCanceled == 0 ? '#000' : '#1890ff' }} onClick={() => {
onClick={() => { const value = showCanceled == 0 ? 1 : 0;
const value = showCanceled == 0 ? 1 : 0; setTip('正在加载,请稍候...');
setTip(`${getLabel(547473, labelData)}`); setShowCanceled(value);
setShowCanceled(value); getMoveTree(value);
getMoveTree(value); }}
}} />
/> <Tree
<Tree className="draggable-tree"
className="draggable-tree" //defaultExpandedKeys={expandedKeys}
//defaultExpandedKeys={expandedKeys} expandedKeys={expandedKeys}
expandedKeys={expandedKeys} onExpand={onExpand}
onExpand={onExpand} draggable
draggable icon={false}
icon={false} blockNode
blockNode onDragEnter={onDragEnter}
onDragEnter={onDragEnter} onDrop={onDrop}
onDrop={onDrop} treeData={gData}
treeData={gData} titleRender={onTitleRender}
titleRender={onTitleRender} />
/> </div>
</div> <Drawer
<Drawer width="60%"
width="60%" placement="right"
placement="right" closable={false}
closable={false} onClose={() => setDrawerOpen(false)}
onClose={() => setDrawerOpen(false)} open={drawerOpen}
open={drawerOpen} >
> <iframe src={iframe} width="100%" height="100%" />
<iframe src={iframe} width="100%" height="100%" /> </Drawer>
</Drawer>
<div className="drag-footer"> <div className="drag-footer">
<p> <p>
<QuestionCircleOutlined /> <QuestionCircleOutlined />
{getLabel(547283, labelData)} 小提示
</p> </p>
<div className="tips"> <div className="tips">
<div>1.{getLabel(547284, labelData)}</div> <div>1.鼠标拖拽Tree节点到任一分部部门下可快速完成组织转移;</div>
<div>2.{getLabel(547285, labelData)}</div> <div>2.点击查看侧滑打开组织详细信息,可快速编辑;</div>
<div>3.{getLabel(547286, labelData)}</div> <div>
<div>4.{getLabel(547287, labelData)}</div> 3.鼠标悬停树节点 一键开启删除封存合并复制等功能;
</div> </div>
<div>4.顶部小图标点击可显示已封存的组织架构</div>
</div> </div>
</div> </div>
</Spin> </div>
</Spin>
<MergeDialog <MergeDialog
ref={childRef} ref={childRef}
open={open} open={open}
onCreate={onMergeCreate} onCreate={onMergeCreate}
onCancel={() => { onCancel={() => {
setOpen(false); setOpen(false);
}} }}
labelData={labelData} />
/> <CopyDialog
<CopyDialog ref={copyChildRef}
ref={copyChildRef} open={copyopen}
open={copyopen} onCreate={onCopyCreate}
onCreate={onCopyCreate} onCancel={() => {
onCancel={() => { setCopyOpen(false);
setCopyOpen(false); }}
}} />
labelData={labelData} </div>
/>
</div>
)
); );
}; };
export default DragTree; export default DragTree;

@ -114,44 +114,36 @@
} }
.ant-drawer-body { .ant-drawer-body {
padding: 0; padding: 0px !important;
overflow: hidden; overflow: hidden;
} }
.tooltip { .remindImage {
position: relative;
display: inline-block;
cursor: pointer; cursor: pointer;
width: 110px; width: 30px;
margin: 0 auto; height: 30px;
line-height: 18px; transition: transform 0.3s ease;
word-break: break-all;
} }
.tooltip .tooltitle { .handImage {
overflow: hidden; width: 40px;
white-space: nowrap; height: 40px;
text-overflow: ellipsis; }
}
.svg-container {
.tooltip .tooltiptext { overflow-y: auto;
visibility: hidden; //height: calc(~'100% - 100px');;
width: 144px; }
background-color: #555;
color: #fff; .svg-container::-webkit-scrollbar {
text-align: center; /*滚动条整体样式*/
border-radius: 6px; width: 10px;
padding: 5px 0; /*高宽分别对应横竖滚动条的尺寸*/
position: absolute; height: 1px;
z-index: 1; }
bottom: 125%;
left: 39%; .svg-container::-webkit-scrollbar-thumb {
margin-left: -60px; /*滚动条里面小方块 #c1c1c1*/
opacity: 0; border-radius: 10px;
transition: opacity 0.3s; background-color: #c1c1c1;
}
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
} }

@ -10,82 +10,73 @@ import React, { useEffect, useState, useRef } from 'react';
import * as d3 from 'd3'; import * as d3 from 'd3';
import qs from 'qs'; import qs from 'qs';
import { Table } from 'antd'; import { Table } from 'antd';
import { getLabel } from '../util/i18n.js';
const StatisticsTable = () => { const StatisticsTable = () => {
const [loading, setLoading] = useState(true); const [loading, setLoading] = useState(true);
const [dataSource, setDataSource] = useState([]); const [dataSource, setDataSource] = useState([]);
const [columns, setColumns] = useState([]); const [columns, setColumns] = useState([]);
const [labelData, setLabelData] = useState({});
useEffect(() => { useEffect(() => {
d3.json('/api/bs/hrmorganization/orgchart/i18n').then((res) => { const columns = [
setLabelData(res.data); {
const columns = [ title: '序号',
{ dataIndex: 'key',
title: `${getLabel(547327, res.data)}`, key: 'key',
dataIndex: 'key', },
key: 'key', {
title: '名称',
dataIndex: 'dataIdName',
key: 'dataIdName',
},
{
title: '上级',
dataIndex: 'superIdName',
key: 'superIdName',
},
{
title: '类型',
dataIndex: 'type',
key: 'type',
render(value, row, index) {
if (value == 1) {
return '分部';
} else {
return '部门';
}
}, },
{ },
title: `${getLabel(547517, res.data)}`, {
dataIndex: 'dataIdName', title: '在编数',
key: 'dataIdName', dataIndex: 'onJobNum',
}, key: 'onJobNum',
{ },
title: `${getLabel(547518, res.data)}`, {
dataIndex: 'superIdName', title: '编制数',
key: 'superIdName', dataIndex: 'staffNum',
}, key: 'staffNum',
{ },
title: `${getLabel(547519, res.data)}`, {
dataIndex: 'type', title: '创建人',
key: 'type', dataIndex: 'creator',
render(value, row, index) { key: 'creator',
if (value == 1) { },
return `${getLabel(547332, res.data)}`; {
} else { title: '创建时间',
return `${getLabel(547331, res.data)}`; dataIndex: 'createTime',
} key: 'createTime',
}, },
}, {
{ title: '更新时间',
title: `${getLabel(547346, res.data)}`, dataIndex: 'updateTime',
dataIndex: 'onJobNum', key: 'updateTime',
key: 'onJobNum', },
}, ];
{ setColumns(columns);
title: `${getLabel(547345, res.data)}`,
dataIndex: 'staffNum',
key: 'staffNum',
},
{
title: `${getLabel(547520, res.data)}`,
dataIndex: 'creator',
key: 'creator',
},
{
title: `${getLabel(547521, res.data)}`,
dataIndex: 'createTime',
key: 'createTime',
},
{
title: `${getLabel(547522, res.data)}`,
dataIndex: 'updateTime',
key: 'updateTime',
},
];
setColumns(columns);
selectData();
});
}, []);
const selectData = () => {
d3.json(`/api/bs/hrmorganization/orgchart/selectStatistics`).then((res) => { d3.json(`/api/bs/hrmorganization/orgchart/selectStatistics`).then((res) => {
setDataSource(res.data.result); setDataSource(res.data.result);
setLoading(false); setLoading(false);
}); });
}; }, [true]);
return ( return (
<> <>
@ -95,11 +86,12 @@ const StatisticsTable = () => {
columns={columns} columns={columns}
loading={loading} loading={loading}
pagination={{ pagination={{
showTotal: (total) => locale: {
`${getLabel(547523, labelData)} ${dataSource.length} ${getLabel( items_per_page: '条/页',
547524, jump_to: '跳至',
labelData, page: '页',
)}`, },
showTotal: (total) => `${dataSource.length}`,
}} }}
/> />
; ;

@ -99,7 +99,7 @@ export default function userPage() {
// //
useEffect(() => { useEffect(() => {
document.cookie = document.cookie =
'ecology_JSessionid=aaaLiDqzA0rZHgPBdxGez; JSESSIONID=aaaLiDqzA0rZHgPBdxGez; Systemlanguid=7; languageidweaver=7; loginuuids=1; loginidweaver=sysadmin; __randcode__=7b9b3b9b-a780-4d6a-b8d5-22d0f8aaf11a'; 'ecology_JSessionid=aaaIM-wLhZqZT42JQaHuz; JSESSIONID=aaaIM-wLhZqZT42JQaHuz; __randcode__=4a2611df-36e6-4b5b-9367-4eda0d961d91; Systemlanguid=7; languageidweaver=7; loginidweaver=sysadmin; loginuuids=1';
d3.json( d3.json(
'/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',
).then((data) => { ).then((data) => {

@ -1,15 +0,0 @@
let languageIdWeaver = document.cookie
.split('; ')
.find((row) => row.startsWith('languageidweaver='))
?.split('=')[1];
if (languageIdWeaver == undefined) {
languageIdWeaver = 7;
}
export const getLabel = (key, labelData) => {
if (labelData[key]) {
return labelData[key].labelName;
} else {
return languageIdWeaver == 7 ? '标签不存在' : 'Label does not exist';
}
};
Loading…
Cancel
Save