feat: 添加功能模块相关字段和界面优化

- 在FUNC表中添加CONTROLLER、ICON和DESCRIPTION字段
- 重构角色管理相关类名和路径
- 优化公司表格单元格显示逻辑
- 添加功能权限管理界面
- 优化日志配置和FXML文件引用
- 移除冗余代码和注释
This commit is contained in:
danyz
2025-08-23 18:39:05 +08:00
parent 6cbe3f37ee
commit 8135acf16a
52 changed files with 1015 additions and 511 deletions

View File

@@ -27,7 +27,9 @@
<logger name="com.ecep.contract.manager.Desktop" level="debug"/>
<logger name="com.ecep.contract.manager.SpringApp" level="debug"/>
<logger name="com.ecep.contract.manager.ui.service" level="info"/>
<logger name="com.ecep.contract.manager.ui.AbstEntityTableTabSkin" level="debug"/>
<logger name="com.ecep.contract.manager.ui.AbstEntityManagerSkin" level="debug"/>
<logger name="com.ecep.contract.manager.ui.BaseController" level="debug"/>
<logger name="com.ecep.contract.manager.ui.controller" level="info"/>
<logger name="com.ecep.contract.manager.ui.task.MonitoredTask" level="debug"/>

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane fx:id="root" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.other.controller.permission.FunctionTabSkinPermission">
<children>
<VBox AnchorPane.bottomAnchor="5.0" AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="5.0"
AnchorPane.topAnchor="5.0">
<children>
<HBox spacing="3.0">
<children>
<TextField fx:id="searchKeyField" promptText="检索关键字"/>
<Button fx:id="searchBtn" mnemonicParsing="false" text="检索"/>
</children>
<padding>
<Insets bottom="10.0" left="7.0" right="10.0" top="10.0"/>
</padding>
</HBox>
<TableView fx:id="table" prefHeight="300.0" VBox.vgrow="ALWAYS">
<columns>
<TableColumn fx:id="idColumn" prefWidth="50.0"
sortType="DESCENDING" text="ID"/>
<TableColumn fx:id="nameColumn" prefWidth="150.0" text="名称"/>
<TableColumn fx:id="keyColumn" prefWidth="150" text="KEY"/>
<TableColumn fx:id="descriptionColumn" prefWidth="200"
text="备注"/>
</columns>
</TableView>
<Pane prefHeight="50.0">
<children>
<Label layoutX="14.0" layoutY="7.0" text="权限名称"/>
</children>
</Pane>
</children>
</VBox>
</children>
</AnchorPane>

View File

@@ -0,0 +1,128 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.paint.Color?>
<?import javafx.scene.text.Font?>
<?import org.controlsfx.control.ListSelectionView?>
<BorderPane fx:id="root" maxHeight="900" maxWidth="1024" minHeight="300" minWidth="200" prefHeight="500.0"
prefWidth="800.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.ecep.contract.manager.ds.other.controller.permission.FunctionWindowController">
<center>
<TabPane fx:id="tabPane" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minWidth="150.0"
tabClosingPolicy="UNAVAILABLE" tabMaxWidth="100.0" tabMinWidth="40.0">
<tabs>
<Tab fx:id="baseInfoTab" text="基本信息">
<content>
<ScrollPane fitToHeight="true" fitToWidth="true" maxHeight="1.7976931348623157E308"
maxWidth="1.7976931348623157E308" minWidth="150.0" pannable="true">
<content>
<VBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308"
minWidth="150.0">
<children>
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308"
minWidth="150.0" VBox.vgrow="NEVER">
<columnConstraints>
<ColumnConstraints halignment="CENTER" hgrow="NEVER" maxWidth="200.0"
minWidth="80.0" prefWidth="120.0"/>
<ColumnConstraints hgrow="ALWAYS" maxWidth="1.7976931348623157E308"
minWidth="50.0" prefWidth="180.0"/>
<ColumnConstraints halignment="CENTER" hgrow="NEVER" maxWidth="200.0"
minWidth="80.0" prefWidth="120.0"/>
<ColumnConstraints hgrow="ALWAYS" maxWidth="1.7976931348623157E308"
minWidth="50.0" prefWidth="180.0"/>
</columnConstraints>
<rowConstraints>
<RowConstraints fillHeight="false" minHeight="30.0" prefHeight="30.0"
vgrow="NEVER"/>
<RowConstraints fillHeight="false" minHeight="30.0" prefHeight="30.0"
vgrow="NEVER"/>
<RowConstraints fillHeight="false" minHeight="30.0" prefHeight="30.0"
vgrow="NEVER"/>
<RowConstraints fillHeight="false" minHeight="30.0" prefHeight="30.0"
vgrow="NEVER"/>
<RowConstraints fillHeight="false" minHeight="30.0" prefHeight="30.0"
vgrow="NEVER"/>
<RowConstraints fillHeight="false" minHeight="30.0" prefHeight="30.0"
vgrow="NEVER"/>
<RowConstraints fillHeight="false" minHeight="30.0" prefHeight="30.0"
vgrow="NEVER"/>
<RowConstraints fillHeight="false" minHeight="30.0" prefHeight="30.0"
vgrow="NEVER"/>
<RowConstraints fillHeight="false" minHeight="30.0" prefHeight="30.0"
vgrow="NEVER"/>
<RowConstraints fillHeight="false" minHeight="30.0" prefHeight="30.0"
vgrow="NEVER"/>
<RowConstraints fillHeight="false" minHeight="30.0" prefHeight="30.0"
vgrow="NEVER"/>
<RowConstraints fillHeight="false" maxHeight="1.7976931348623157E308"
minHeight="30.0" prefHeight="42.0" vgrow="NEVER"/>
</rowConstraints>
<children>
<Label text="名称 *" GridPane.rowIndex="1"/>
<TextField fx:id="nameField" GridPane.columnIndex="1" GridPane.rowIndex="1"/>
<Label text="键 *" GridPane.rowIndex="2"/>
<TextField fx:id="keyField" GridPane.columnIndex="1" GridPane.rowIndex="2"/>
<Label text="控制器" GridPane.rowIndex="3"/>
<TextField fx:id="controllerField" GridPane.columnIndex="1" GridPane.rowIndex="3"/>
<Label text="图标" GridPane.rowIndex="4"/>
<TextField fx:id="iconField" GridPane.columnIndex="1" GridPane.rowIndex="4"/>
<Label text="描述" GridPane.rowIndex="5"/>
<TextField fx:id="descriptionField" GridPane.columnIndex="1" GridPane.rowIndex="5"/>
<HBox alignment="CENTER_RIGHT" spacing="5.0" GridPane.columnIndex="1" GridPane.columnSpan="3" GridPane.rowIndex="11">
<children>
</children>
</HBox>
<Label fx:id="versionLabel" text="\@Version" GridPane.rowIndex="11"/>
<!-- <CheckListView fx:id="rolesField" GridPane.columnIndex="3" GridPane.rowSpan="10" />-->
<Label text="角色" GridPane.columnIndex="2" GridPane.rowSpan="10">
<tooltip>
<Tooltip text="用于解决有些姓名错别字,无法匹配"/>
</tooltip>
</Label>
</children>
<VBox.margin>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/>
</VBox.margin>
</GridPane>
<Pane prefHeight="50.0" prefWidth="200.0"/>
</children>
</VBox>
</content>
</ScrollPane>
</content>
</Tab>
<Tab fx:id="permissionTab" text="权限">
</Tab>
</tabs>
</TabPane>
</center>
<top>
<ToolBar prefHeight="40.0" prefWidth="200.0" BorderPane.alignment="CENTER">
<items>
<Button fx:id="saveBtn" disable="true" text="保存(_S)"/>
</items>
</ToolBar>
</top>
<bottom>
<HBox id="HBox" alignment="CENTER_LEFT" spacing="5.0">
<children>
<Label fx:id="leftStatusLabel" maxHeight="1.7976931348623157E308" text="Left status"
HBox.hgrow="ALWAYS">
<font>
<Font size="11.0" fx:id="x3"/>
</font>
<textFill>
<Color red="0.625" green="0.625" blue="0.625" fx:id="x4"/>
</textFill>
</Label>
<Pane HBox.hgrow="ALWAYS"/>
<Label fx:id="rightStatusLabel" font="$x3" text="Right status" textFill="$x4" HBox.hgrow="NEVER"/>
</children>
<padding>
<Insets bottom="3.0" left="3.0" right="3.0" top="3.0"/>
</padding>
</HBox>
</bottom>
</BorderPane>

View File

@@ -28,46 +28,16 @@
<Button fx:id="searchBtn" mnemonicParsing="false" text="检索"/>
</items>
</ToolBar>
<SplitPane dividerPositions="0.5" prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS">
<items>
<AnchorPane>
<children>
<TitledPane animated="false" collapsible="false" text="功能表" AnchorPane.bottomAnchor="0.0"
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<content>
<TableView fx:id="table" prefHeight="200.0" prefWidth="200.0">
<columns>
<TableColumn fx:id="idColumn" prefWidth="50.0" sortType="DESCENDING" text="ID"/>
<TableColumn fx:id="nameColumn" prefWidth="150.0" text="名称"/>
<TableColumn fx:id="keyColumn" prefWidth="150" text="KEY"/>
</columns>
</TableView>
</content>
</TitledPane>
</children>
</AnchorPane>
<AnchorPane>
<children>
<TitledPane animated="false" collapsible="false" text="权限表" AnchorPane.bottomAnchor="0.0"
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<content>
<TableView fx:id="permissionTable" prefHeight="200.0" prefWidth="200.0">
<columns>
<TableColumn fx:id="permissionTable_idColumn" prefWidth="50.0"
sortType="DESCENDING" text="ID"/>
<TableColumn fx:id="permissionTable_nameColumn" prefWidth="150.0" text="名称"/>
<TableColumn fx:id="permissionTable_keyColumn" prefWidth="150" text="KEY"/>
<TableColumn fx:id="permissionTable_descriptionColumn" prefWidth="200"
text="备注"/>
</columns>
</TableView>
</content>
</TitledPane>
</children>
</AnchorPane>
</items>
</SplitPane>
<TableView fx:id="table" prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS">
<columns>
<TableColumn fx:id="idColumn" prefWidth="50.0" sortType="DESCENDING" text="ID"/>
<TableColumn fx:id="nameColumn" prefWidth="150.0" text="名称"/>
<TableColumn fx:id="keyColumn" prefWidth="150" text="KEY"/>
<TableColumn fx:id="controllerColumn" prefWidth="150" text="控制器"/>
<TableColumn fx:id="iconColumn" prefWidth="150" text="图标"/>
<TableColumn fx:id="descriptionColumn" prefWidth="200" text="备注"/>
</columns>
</TableView>
<fx:include source="../part-footer.fxml" fx:id="footer"/>
</children>
</VBox>

View File

@@ -2,7 +2,7 @@
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<VBox prefHeight="680.0" prefWidth="1000.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.ecep.contract.manager.ds.other.controller.permission.EmployeeRolesManagerWindowController">
<VBox prefHeight="680.0" prefWidth="1000.0" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.ecep.contract.manager.ds.other.controller.permission.EmployeeRoleManagerWindowController">
<children>
<MenuBar VBox.vgrow="NEVER">
<menus>