From 360cf955e142c001f96b20100f739e9b6a710e18 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期五, 23 八月 2024 18:31:04 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/PinyinCommon.java | 89 + Bin/lib/service/VciServiceMain.jar | 0 Bin/web/lib/accessors-smart-1.2.jar | 0 Bin/web/lib/hamcrest-library-1.3.jar | 0 Bin/web/lib/commons-fileupload-1.4.jar | 0 Bin/web/lib/jgoodies-common-1.8.1.jar | 0 Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/index.vue | 210 +++ Bin/web/lib/swingx-1.6.1.jar | 0 Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PLActionQueryDTO.java | 45 Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue | 2 Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue | 456 ++++++++ Bin/web/lib/plt-clientbase-1.0.RELEASE.jar | 0 Source/plt-web/plt-web-ui/src/views/systemModel/systemMonitor/index.vue | 0 Bin/web/lib/protege35-1.0.jar | 0 Bin/lib/thrid/jbpm-4.3.2.jar | 0 Bin/lib/service/UIService.jar | 0 Bin/web/lib/skinlf-6.7.jar | 0 Bin/web/lib/commons-compress-1.18.jar | 0 Bin/web/lib/mockito-core-2.23.4.jar | 0 Bin/properties/hibernate-master.cfg.xml | 48 Bin/web/lib/plt-slice-1.0.RELEASE.jar | 0 Bin/lib/service/OQService.jar | 0 Bin/lib/client/plt-clientbase.jar | 0 Bin/lib/common/plt-slice.jar | 0 Bin/web/lib/json-smart-2.3.jar | 0 Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue | 456 ++++++++ Bin/web/lib/android-json-0.0.20131108.vaadin1.jar | 0 Bin/web/lib/plt-common-1.0.RELEASE.jar | 0 Bin/web/lib/spring-boot-test-2.1.3.RELEASE.jar | 0 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsActionServiceImpl.java | 405 +++++++ Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PLActionClsDTO.java | 57 + Source/plt-web/plt-web-ui/src/views/systemModel/operateType/index.vue | 189 +++ Bin/lib/service/WFService.jar | 0 Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/index.vue | 212 +++ Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsActionServiceI.java | 68 + Bin/web/lib/pinyin4j-2.5.0.jar | 0 Bin/lib/service/LogService.jar | 0 Bin/web/lib/xmlunit-core-2.6.2.jar | 0 Bin/web/lib/jackson-databind-2.9.6.jar | 0 Bin/web/lib/swing-worker-1.1.jar | 0 Bin/web/lib/flatlaf-2.3.jar | 0 Bin/web/lib/nativeskin-1.0.jar | 0 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/other/IExportLogBean.java | 19 Bin/lib/service/BOFService.jar | 0 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsActionController.java | 160 +++ Bin/lib/common/plt-common.jar | 0 Bin/web/lib/spring-boot-starter-test-2.1.3.RELEASE.jar | 0 Bin/web/lib/spring-test-5.1.5.RELEASE.jar | 0 Source/plt-web/plt-web-ui/src/api/systemModel/mangeModel/api.js | 58 + Bin/web/lib/byte-buddy-agent-1.9.3.jar | 0 Bin/web/lib/assertj-core-3.11.1.jar | 0 Bin/web/lib/json-path-2.4.0.jar | 0 Bin/lib/service/CacheService.jar | 0 Bin/web/lib/byte-buddy-1.9.3.jar | 0 Bin/web/lib/jsonassert-1.5.0.jar | 0 Bin/properties/hibernate-slave.cfg.xml | 47 Source/plt-web/plt-web-ui/src/api/queryTemplate/businessTypeQuery.js | 12 Bin/lib/service/MsgService.jar | 0 Bin/properties/VolumnLog4j2.xml | 25 Source/plt-web/plt-web-ui/src/views/systemModel/systemConfig/index.vue | 0 Bin/lib/service/WFPlugins.jar | 0 Bin/properties/menuConfig.json | 91 + Bin/lib/service/VolumeService.jar | 0 Bin/web/lib/plt-poi-2024.1-SNAPSHOT.jar | 0 Bin/web/lib/spring-boot-test-autoconfigure-2.1.3.RELEASE.jar | 0 Bin/web/vci-platform-web.jar | 0 Bin/web/lib/filters-2.0.235.jar | 0 Bin/web/lib/uitheme-1.3.1.jar | 0 Bin/web/lib/objenesis-2.6.jar | 0 Source/plt-web/plt-web-ui/src/api/queryTemplate/linkTypeQuery.js | 10 Bin/web/lib/swixml-2.0.jar | 0 Bin/lib/service/FrameService.jar | 0 Bin/web/lib/jgraphx-3.1.0.0.jar | 0 Bin/web/lib/junit-4.8.jar | 0 Bin/lib/service/ServiceBase.jar | 0 Bin/web/lib/ice-3.7.10.jar | 0 Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/versioning/index.vue | 2 Bin/lib/service/OMDService.jar | 0 Bin/web/lib/icebox-3.7.10.jar | 0 Bin/web/lib/jgoodies-looks-2.5.3.jar | 0 /dev/null | 13 Bin/web/lib/plt-web-api-2024.1-SNAPSHOT.jar | 0 Source/plt-web/plt-web-ui/src/api/queryTemplate/queryDefine.js | 12 Bin/web/lib/asm-5.0.4.jar | 0 Bin/web/lib/transmittable-thread-local-2.12.6.jar | 0 Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PLActionDTO.java | 70 + Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/other/ExportBeans.java | 153 ++ Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/other/ExportActionLogBean.java | 156 +++ Bin/web/lib/hamcrest-core-1.3.jar | 0 Bin/web/lib/plt-web-base-2024.1-SNAPSHOT.jar | 0 Bin/web/lib/poi-scratchpad-3.9.jar | 0 Bin/web/lib/jgraph-3.1.0.0.jar | 0 Bin/web/lib/plt-starter-2024.1-SNAPSHOT.jar | 0 Bin/web/lib/spring-boot-configuration-processor-2.1.3.RELEASE.jar | 0 Bin/lib/client/plt-client.jar | 0 95 files changed, 3,013 insertions(+), 52 deletions(-) diff --git a/Bin/jre-linux/lib/security/trusted.libraries b/Bin/jre-linux/lib/security/trusted.libraries deleted file mode 100644 index e69de29..0000000 --- a/Bin/jre-linux/lib/security/trusted.libraries +++ /dev/null diff --git a/Bin/lib/client/plt-client.jar b/Bin/lib/client/plt-client.jar index aa88cc6..915c4c6 100644 --- a/Bin/lib/client/plt-client.jar +++ b/Bin/lib/client/plt-client.jar Binary files differ diff --git a/Bin/lib/client/plt-clientbase.jar b/Bin/lib/client/plt-clientbase.jar index c05e09c..5f4462c 100644 --- a/Bin/lib/client/plt-clientbase.jar +++ b/Bin/lib/client/plt-clientbase.jar Binary files differ diff --git a/Bin/lib/common/plt-common.jar b/Bin/lib/common/plt-common.jar index c584d57..c48fa29 100644 --- a/Bin/lib/common/plt-common.jar +++ b/Bin/lib/common/plt-common.jar Binary files differ diff --git a/Bin/lib/common/plt-slice.jar b/Bin/lib/common/plt-slice.jar index 216f0f4..6468ff3 100644 --- a/Bin/lib/common/plt-slice.jar +++ b/Bin/lib/common/plt-slice.jar Binary files differ diff --git a/Bin/lib/service/BOFService.jar b/Bin/lib/service/BOFService.jar index 3fc1d7a..129963c 100644 --- a/Bin/lib/service/BOFService.jar +++ b/Bin/lib/service/BOFService.jar Binary files differ diff --git a/Bin/lib/service/CacheService.jar b/Bin/lib/service/CacheService.jar index 16becd4..acb49a9 100644 --- a/Bin/lib/service/CacheService.jar +++ b/Bin/lib/service/CacheService.jar Binary files differ diff --git a/Bin/lib/service/FrameService.jar b/Bin/lib/service/FrameService.jar index 41e6872..45b254b 100644 --- a/Bin/lib/service/FrameService.jar +++ b/Bin/lib/service/FrameService.jar Binary files differ diff --git a/Bin/lib/service/LogService.jar b/Bin/lib/service/LogService.jar index 1a65ead..d2e5841 100644 --- a/Bin/lib/service/LogService.jar +++ b/Bin/lib/service/LogService.jar Binary files differ diff --git a/Bin/lib/service/MsgService.jar b/Bin/lib/service/MsgService.jar new file mode 100644 index 0000000..5dd90e6 --- /dev/null +++ b/Bin/lib/service/MsgService.jar Binary files differ diff --git a/Bin/lib/service/OMDService.jar b/Bin/lib/service/OMDService.jar index c2e3ca8..e77decb 100644 --- a/Bin/lib/service/OMDService.jar +++ b/Bin/lib/service/OMDService.jar Binary files differ diff --git a/Bin/lib/service/OQService.jar b/Bin/lib/service/OQService.jar index b21a6c3..3d8f673 100644 --- a/Bin/lib/service/OQService.jar +++ b/Bin/lib/service/OQService.jar Binary files differ diff --git a/Bin/lib/service/ServiceBase.jar b/Bin/lib/service/ServiceBase.jar index be2a063..8a2ab48 100644 --- a/Bin/lib/service/ServiceBase.jar +++ b/Bin/lib/service/ServiceBase.jar Binary files differ diff --git a/Bin/lib/service/UIService.jar b/Bin/lib/service/UIService.jar index 90eac7b..845bbd9 100644 --- a/Bin/lib/service/UIService.jar +++ b/Bin/lib/service/UIService.jar Binary files differ diff --git a/Bin/lib/service/VciServiceMain.jar b/Bin/lib/service/VciServiceMain.jar index 1115661..03229dc 100644 --- a/Bin/lib/service/VciServiceMain.jar +++ b/Bin/lib/service/VciServiceMain.jar Binary files differ diff --git a/Bin/lib/service/VolumeService.jar b/Bin/lib/service/VolumeService.jar index adae0a8..52dd1dd 100644 --- a/Bin/lib/service/VolumeService.jar +++ b/Bin/lib/service/VolumeService.jar Binary files differ diff --git a/Bin/lib/service/WFPlugins.jar b/Bin/lib/service/WFPlugins.jar index f216a6a..08ac518 100644 --- a/Bin/lib/service/WFPlugins.jar +++ b/Bin/lib/service/WFPlugins.jar Binary files differ diff --git a/Bin/lib/service/WFService.jar b/Bin/lib/service/WFService.jar index e24eefc..6146f02 100644 --- a/Bin/lib/service/WFService.jar +++ b/Bin/lib/service/WFService.jar Binary files differ diff --git a/Bin/lib/thrid/jbpm-4.3.2.jar b/Bin/lib/thrid/jbpm-4.3.2.jar index 21ccd58..49959a6 100644 --- a/Bin/lib/thrid/jbpm-4.3.2.jar +++ b/Bin/lib/thrid/jbpm-4.3.2.jar Binary files differ diff --git a/Bin/properties/VolumnLog4j2.xml b/Bin/properties/VolumnLog4j2.xml new file mode 100644 index 0000000..a5bfc4d --- /dev/null +++ b/Bin/properties/VolumnLog4j2.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Configuration status="WARN"> + <Appenders> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="[%-5p] %d{YYYY-MM-dd HH:mm:ss} [%t] %C{1}:%L - %msg%n" /> + </Console> + + <RollingFile name="RollingFile" filename="./logs/volume_log.log" filepattern="${logPath}/volume_%d{YYYYMMddHHmmss}.log"> + <PatternLayout pattern="[%-5p] %d{YYYY-MM-dd HH:mm:ss} [%t] %C{1}:%L - %msg%n" /> + <Policies> + <SizeBasedTriggeringPolicy size="10 MB" /> + </Policies> + <DefaultRolloverStrategy max="20" /> + </RollingFile> + + </Appenders> + <Loggers> + <Logger name="VolumeLog" level="DEBUG" additivity="true"> + <AppenderRef ref="RollingFile" /> + </Logger> + <Root level="DEBUG"> + <AppenderRef ref="Console" /> + </Root> + </Loggers> +</Configuration> diff --git a/Bin/properties/hibernate-master.cfg.xml b/Bin/properties/hibernate-master.cfg.xml new file mode 100644 index 0000000..f1269c1 --- /dev/null +++ b/Bin/properties/hibernate-master.cfg.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"> +<hibernate-configuration> + <session-factory> + <property name="show_sql">true</property> + <property name="dialect">org.hibernate.dialect.OracleDialect</property> + <property name="connection.driver_class">oracle.jdbc.OracleDriver</property> + + <!--<property name="connection.url">jdbc:oracle:thin:@172.16.0.243:1521:orcl</property> + <property name="connection.username">vcimes</property> + <property name="connection.password">vcimes</property>--> + + <!-- <property name="connection.url">jdbc:oracle:thin:@dev.yunkeruida.top:1521:orcl</property> --> + <property name="connection.url">jdbc:oracle:thin:@192.168.0.66:1521:orcl</property> + <!-- <property name="connection.username">NMPM112</property> --> + <property name="connection.username">PLT2024</property> + <property name="connection.password">vcitest</property> + <!--<property name="connection.username">mpm112</property> + <property name="connection.password">vcitest</property>--> + + <!--property name="hibernate.connection.release_mode">auto</property --> + + <!-- 璁剧疆C3P0 --> + <property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property> + <property name="hibernate.c3p0.acquireRetryAttempts">30</property> + <property name="hibernate.c3p0.acquireIncrement">2</property> + <property name="hibernate.c3p0.checkoutTimeout">30000</property> + <property name="hibernate.c3p0.idleConnectionTestPeriod">120</property> + <property name="hibernate.c3p0.maxIdleTime">180</property> + <property name="hibernate.c3p0.initialPoolSize">3</property> + <property name="hibernate.c3p0.maxPoolSize">100</property> + <property name="hibernate.c3p0.minPoolSize">1</property> + <property name="hibernate.c3p0.maxStatements">100</property> + <property name="maxStatementsPerConnection">100</property> + <property name="hibernate.current_session_context_class">com.vci.server.mw.SessionContext4JBPM</property> + <property name="hibernate.connection.isolation">2</property> + + + <!-- 鏆傛椂绂佺敤Hibernate鐨勪簨浠剁洃鍚� + <listener type="post-insert" + class="com.vci.base.server.persistence.history.HistoryListener" /> + <listener type="post-update" + class="com.vci.base.server.persistence.history.HistoryListener" /> + <listener type="post-delete" + class="com.vci.base.server.persistence.history.HistoryListener" /> + --> + </session-factory> +</hibernate-configuration> \ No newline at end of file diff --git a/Bin/properties/hibernate-slave.cfg.xml b/Bin/properties/hibernate-slave.cfg.xml new file mode 100644 index 0000000..96c62d7 --- /dev/null +++ b/Bin/properties/hibernate-slave.cfg.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"> +<hibernate-configuration> + <session-factory> + <property name="show_sql">true</property> + <property name="dialect">org.hibernate.dialect.OracleDialect</property> + <property name="connection.driver_class">oracle.jdbc.OracleDriver</property> + + <!--<property name="connection.url">jdbc:oracle:thin:@172.16.0.243:1521:orcl</property> + <property name="connection.username">vcimes</property> + <property name="connection.password">vcimes</property>--> + + <property name="connection.url">jdbc:oracle:thin:@192.168.0.66:1521:orcl</property> + <!-- <property name="connection.url">jdbc:oracle:thin:@dev.yunkeruida.top:1521:orcl</property> --> + <!-- <property name="connection.username">NMPM112</property> --> + <property name="connection.username">PLT2024</property> + <property name="connection.password">vcitest</property> + <!--<property name="connection.username">mpm112</property> + <property name="connection.password">vcitest</property>--> + + <!--property name="hibernate.connection.release_mode">auto</property --> + + <!-- 璁剧疆C3P0 --> + <property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property> + <property name="hibernate.c3p0.acquireRetryAttempts">30</property> + <property name="hibernate.c3p0.acquireIncrement">2</property> + <property name="hibernate.c3p0.checkoutTimeout">30000</property> + <property name="hibernate.c3p0.idleConnectionTestPeriod">120</property> + <property name="hibernate.c3p0.maxIdleTime">180</property> + <property name="hibernate.c3p0.initialPoolSize">3</property> + <property name="hibernate.c3p0.maxPoolSize">100</property> + <property name="hibernate.c3p0.minPoolSize">1</property> + <property name="hibernate.c3p0.maxStatements">100</property> + <property name="maxStatementsPerConnection">100</property> + <property name="hibernate.current_session_context_class">com.vci.server.mw.SessionContext4JBPM</property> + <property name="hibernate.connection.isolation">2</property> + + + <!-- 鏆傛椂绂佺敤Hibernate鐨勪簨浠剁洃鍚� + <listener type="post-insert" + class="com.vci.base.server.persistence.history.HistoryListener" /> + <listener type="post-update" + class="com.vci.base.server.persistence.history.HistoryListener" /> + <listener type="post-delete" + class="com.vci.base.server.persistence.history.HistoryListener" /> + --> + </session-factory> +</hibernate-configuration> \ No newline at end of file diff --git a/Bin/properties/menuConfig.json b/Bin/properties/menuConfig.json new file mode 100644 index 0000000..ff3052b --- /dev/null +++ b/Bin/properties/menuConfig.json @@ -0,0 +1,91 @@ +{ + "hasChildren": true, + "children": [ + { + "hasChildren": true, + "children": [], + "id": "systemManagmentNode", + "name": "绠$悊鍔熻兘妯″潡", + "parentId": "VCIBaseTreeNode", + "code": "systemManagmentNode", + "alias": "system", + "meta": { + "keepAlive": false + }, + "sort": 2, + "soruce": "", + "path": "views/systemModel/mangeModel/index" + }, + { + "hasChildren": true, + "children": [], + "id": "modelManagmentNode", + "name": "涓氬姟鍔熻兘妯″潡", + "parentId": "VCIBaseTreeNode", + "code": "modelManagmentNode", + "alias": "model", + "meta": { + "keepAlive": false + }, + "sort": 3, + "soruce": "", + "path": "views/systemModel/businessModel/index" + }, + { + "hasChildren": true, + "children": [], + "id": "operateNode", + "name": "鎿嶄綔绫诲瀷绠$悊", + "parentId": "VCIBaseTreeNode", + "code": "operateNode", + "alias": "operate", + "meta": { + "keepAlive": false + }, + "sort": 4, + "soruce": "", + "path": "views/systemModel/operateType/index" + }, + { + "hasChildren": false, + "children": [], + "id": "sysOptionNode", + "name": "绯荤粺閰嶇疆", + "parentId": "VCIBaseTreeNode", + "code": "sysOptionNode", + "alias": "sysOption", + "meta": { + "keepAlive": false + }, + "sort": 5, + "soruce": "", + "path": "views/systemModel/systemConfig/index" + }, + { + "hasChildren": false, + "children": [], + "id": "sysMonitorNode", + "name": "绯荤粺杩愯鐩戞帶", + "parentId": "VCIBaseTreeNode", + "code": "sysMonitorNode", + "alias": "sysMonitor", + "meta": { + "keepAlive": false + }, + "sort": 5, + "soruce": "", + "path": "views/systemModel/systemMonitor/index" + } + ], + "id": "VCIBaseTreeNode", + "name": "绯荤粺妯″潡閰嶇疆", + "parentId": "systemManagmentNode", + "code": "rootNode", + "alias": "root", + "meta": { + "keepAlive": false + }, + "sort": 0, + "soruce": "", + "path": "" +} \ No newline at end of file diff --git a/Bin/web/lib/accessors-smart-1.2.jar b/Bin/web/lib/accessors-smart-1.2.jar new file mode 100644 index 0000000..f4505e9 --- /dev/null +++ b/Bin/web/lib/accessors-smart-1.2.jar Binary files differ diff --git a/Bin/web/lib/android-json-0.0.20131108.vaadin1.jar b/Bin/web/lib/android-json-0.0.20131108.vaadin1.jar new file mode 100644 index 0000000..add495f --- /dev/null +++ b/Bin/web/lib/android-json-0.0.20131108.vaadin1.jar Binary files differ diff --git a/Bin/web/lib/asm-5.0.4.jar b/Bin/web/lib/asm-5.0.4.jar new file mode 100644 index 0000000..cdb283d --- /dev/null +++ b/Bin/web/lib/asm-5.0.4.jar Binary files differ diff --git a/Bin/web/lib/assertj-core-3.11.1.jar b/Bin/web/lib/assertj-core-3.11.1.jar new file mode 100644 index 0000000..87e5ee3 --- /dev/null +++ b/Bin/web/lib/assertj-core-3.11.1.jar Binary files differ diff --git a/Bin/web/lib/byte-buddy-1.9.3.jar b/Bin/web/lib/byte-buddy-1.9.3.jar new file mode 100644 index 0000000..c1c2b07 --- /dev/null +++ b/Bin/web/lib/byte-buddy-1.9.3.jar Binary files differ diff --git a/Bin/web/lib/byte-buddy-agent-1.9.3.jar b/Bin/web/lib/byte-buddy-agent-1.9.3.jar new file mode 100644 index 0000000..51a0bd4 --- /dev/null +++ b/Bin/web/lib/byte-buddy-agent-1.9.3.jar Binary files differ diff --git a/Bin/web/lib/commons-compress-1.18.jar b/Bin/web/lib/commons-compress-1.18.jar new file mode 100644 index 0000000..e401046 --- /dev/null +++ b/Bin/web/lib/commons-compress-1.18.jar Binary files differ diff --git a/Bin/web/lib/commons-fileupload-1.4.jar b/Bin/web/lib/commons-fileupload-1.4.jar new file mode 100644 index 0000000..e25a6bc --- /dev/null +++ b/Bin/web/lib/commons-fileupload-1.4.jar Binary files differ diff --git a/Bin/web/lib/filters-2.0.235.jar b/Bin/web/lib/filters-2.0.235.jar new file mode 100644 index 0000000..39e4dd5 --- /dev/null +++ b/Bin/web/lib/filters-2.0.235.jar Binary files differ diff --git a/Bin/web/lib/flatlaf-2.3.jar b/Bin/web/lib/flatlaf-2.3.jar new file mode 100644 index 0000000..9f292d2 --- /dev/null +++ b/Bin/web/lib/flatlaf-2.3.jar Binary files differ diff --git a/Bin/web/lib/hamcrest-core-1.3.jar b/Bin/web/lib/hamcrest-core-1.3.jar new file mode 100644 index 0000000..9d5fe16 --- /dev/null +++ b/Bin/web/lib/hamcrest-core-1.3.jar Binary files differ diff --git a/Bin/web/lib/hamcrest-library-1.3.jar b/Bin/web/lib/hamcrest-library-1.3.jar new file mode 100644 index 0000000..9eac80d --- /dev/null +++ b/Bin/web/lib/hamcrest-library-1.3.jar Binary files differ diff --git a/Bin/web/lib/ice-3.7.10.jar b/Bin/web/lib/ice-3.7.10.jar new file mode 100644 index 0000000..768c926 --- /dev/null +++ b/Bin/web/lib/ice-3.7.10.jar Binary files differ diff --git a/Bin/web/lib/icebox-3.7.10.jar b/Bin/web/lib/icebox-3.7.10.jar new file mode 100644 index 0000000..45e41b3 --- /dev/null +++ b/Bin/web/lib/icebox-3.7.10.jar Binary files differ diff --git a/Bin/web/lib/jackson-databind-2.9.6.jar b/Bin/web/lib/jackson-databind-2.9.6.jar new file mode 100644 index 0000000..e8eb658 --- /dev/null +++ b/Bin/web/lib/jackson-databind-2.9.6.jar Binary files differ diff --git a/Bin/web/lib/jgoodies-common-1.8.1.jar b/Bin/web/lib/jgoodies-common-1.8.1.jar new file mode 100644 index 0000000..f6a256e --- /dev/null +++ b/Bin/web/lib/jgoodies-common-1.8.1.jar Binary files differ diff --git a/Bin/web/lib/jgoodies-looks-2.5.3.jar b/Bin/web/lib/jgoodies-looks-2.5.3.jar new file mode 100644 index 0000000..3339053 --- /dev/null +++ b/Bin/web/lib/jgoodies-looks-2.5.3.jar Binary files differ diff --git a/Bin/web/lib/jgraph-3.1.0.0.jar b/Bin/web/lib/jgraph-3.1.0.0.jar new file mode 100644 index 0000000..9af266c --- /dev/null +++ b/Bin/web/lib/jgraph-3.1.0.0.jar Binary files differ diff --git a/Bin/web/lib/jgraphx-3.1.0.0.jar b/Bin/web/lib/jgraphx-3.1.0.0.jar new file mode 100644 index 0000000..6637aac --- /dev/null +++ b/Bin/web/lib/jgraphx-3.1.0.0.jar Binary files differ diff --git a/Bin/web/lib/json-path-2.4.0.jar b/Bin/web/lib/json-path-2.4.0.jar new file mode 100644 index 0000000..6229306 --- /dev/null +++ b/Bin/web/lib/json-path-2.4.0.jar Binary files differ diff --git a/Bin/web/lib/json-smart-2.3.jar b/Bin/web/lib/json-smart-2.3.jar new file mode 100644 index 0000000..0cd52ea --- /dev/null +++ b/Bin/web/lib/json-smart-2.3.jar Binary files differ diff --git a/Bin/web/lib/jsonassert-1.5.0.jar b/Bin/web/lib/jsonassert-1.5.0.jar new file mode 100644 index 0000000..aec04c5 --- /dev/null +++ b/Bin/web/lib/jsonassert-1.5.0.jar Binary files differ diff --git a/Bin/web/lib/junit-4.8.jar b/Bin/web/lib/junit-4.8.jar new file mode 100644 index 0000000..efdaa58 --- /dev/null +++ b/Bin/web/lib/junit-4.8.jar Binary files differ diff --git a/Bin/web/lib/mockito-core-2.23.4.jar b/Bin/web/lib/mockito-core-2.23.4.jar new file mode 100644 index 0000000..b259c8c --- /dev/null +++ b/Bin/web/lib/mockito-core-2.23.4.jar Binary files differ diff --git a/Bin/web/lib/nativeskin-1.0.jar b/Bin/web/lib/nativeskin-1.0.jar new file mode 100644 index 0000000..acacc56 --- /dev/null +++ b/Bin/web/lib/nativeskin-1.0.jar Binary files differ diff --git a/Bin/web/lib/objenesis-2.6.jar b/Bin/web/lib/objenesis-2.6.jar new file mode 100644 index 0000000..b4b29d5 --- /dev/null +++ b/Bin/web/lib/objenesis-2.6.jar Binary files differ diff --git a/Bin/web/lib/pinyin4j-2.5.0.jar b/Bin/web/lib/pinyin4j-2.5.0.jar new file mode 100644 index 0000000..2e1d819 --- /dev/null +++ b/Bin/web/lib/pinyin4j-2.5.0.jar Binary files differ diff --git a/Bin/web/lib/plt-clientbase-1.0.RELEASE.jar b/Bin/web/lib/plt-clientbase-1.0.RELEASE.jar index 88b1396..19cfc6d 100644 --- a/Bin/web/lib/plt-clientbase-1.0.RELEASE.jar +++ b/Bin/web/lib/plt-clientbase-1.0.RELEASE.jar Binary files differ diff --git a/Bin/web/lib/plt-common-1.0.RELEASE.jar b/Bin/web/lib/plt-common-1.0.RELEASE.jar index ec5d9d9..079294b 100644 --- a/Bin/web/lib/plt-common-1.0.RELEASE.jar +++ b/Bin/web/lib/plt-common-1.0.RELEASE.jar Binary files differ diff --git a/Bin/web/lib/plt-poi-2024.1-SNAPSHOT.jar b/Bin/web/lib/plt-poi-2024.1-SNAPSHOT.jar new file mode 100644 index 0000000..0b9e0b2 --- /dev/null +++ b/Bin/web/lib/plt-poi-2024.1-SNAPSHOT.jar Binary files differ diff --git a/Bin/web/lib/plt-slice-1.0.RELEASE.jar b/Bin/web/lib/plt-slice-1.0.RELEASE.jar index e0d1317..b6c28d5 100644 --- a/Bin/web/lib/plt-slice-1.0.RELEASE.jar +++ b/Bin/web/lib/plt-slice-1.0.RELEASE.jar Binary files differ diff --git a/Bin/web/lib/plt-starter-2024.1-SNAPSHOT.jar b/Bin/web/lib/plt-starter-2024.1-SNAPSHOT.jar new file mode 100644 index 0000000..b1b79dd --- /dev/null +++ b/Bin/web/lib/plt-starter-2024.1-SNAPSHOT.jar Binary files differ diff --git a/Bin/web/lib/plt-web-api-2024.1-SNAPSHOT.jar b/Bin/web/lib/plt-web-api-2024.1-SNAPSHOT.jar new file mode 100644 index 0000000..9f5cc1b --- /dev/null +++ b/Bin/web/lib/plt-web-api-2024.1-SNAPSHOT.jar Binary files differ diff --git a/Bin/web/lib/plt-web-base-2024.1-SNAPSHOT.jar b/Bin/web/lib/plt-web-base-2024.1-SNAPSHOT.jar new file mode 100644 index 0000000..f14632f --- /dev/null +++ b/Bin/web/lib/plt-web-base-2024.1-SNAPSHOT.jar Binary files differ diff --git a/Bin/web/lib/poi-scratchpad-3.9.jar b/Bin/web/lib/poi-scratchpad-3.9.jar new file mode 100644 index 0000000..1520855 --- /dev/null +++ b/Bin/web/lib/poi-scratchpad-3.9.jar Binary files differ diff --git a/Bin/web/lib/protege35-1.0.jar b/Bin/web/lib/protege35-1.0.jar new file mode 100644 index 0000000..8e99a2e --- /dev/null +++ b/Bin/web/lib/protege35-1.0.jar Binary files differ diff --git a/Bin/web/lib/skinlf-6.7.jar b/Bin/web/lib/skinlf-6.7.jar new file mode 100644 index 0000000..9bdb00f --- /dev/null +++ b/Bin/web/lib/skinlf-6.7.jar Binary files differ diff --git a/Bin/web/lib/spring-boot-configuration-processor-2.1.3.RELEASE.jar b/Bin/web/lib/spring-boot-configuration-processor-2.1.3.RELEASE.jar new file mode 100644 index 0000000..2f63fdf --- /dev/null +++ b/Bin/web/lib/spring-boot-configuration-processor-2.1.3.RELEASE.jar Binary files differ diff --git a/Bin/web/lib/spring-boot-starter-test-2.1.3.RELEASE.jar b/Bin/web/lib/spring-boot-starter-test-2.1.3.RELEASE.jar new file mode 100644 index 0000000..7df4790 --- /dev/null +++ b/Bin/web/lib/spring-boot-starter-test-2.1.3.RELEASE.jar Binary files differ diff --git a/Bin/web/lib/spring-boot-test-2.1.3.RELEASE.jar b/Bin/web/lib/spring-boot-test-2.1.3.RELEASE.jar new file mode 100644 index 0000000..253c3f1 --- /dev/null +++ b/Bin/web/lib/spring-boot-test-2.1.3.RELEASE.jar Binary files differ diff --git a/Bin/web/lib/spring-boot-test-autoconfigure-2.1.3.RELEASE.jar b/Bin/web/lib/spring-boot-test-autoconfigure-2.1.3.RELEASE.jar new file mode 100644 index 0000000..98622ad --- /dev/null +++ b/Bin/web/lib/spring-boot-test-autoconfigure-2.1.3.RELEASE.jar Binary files differ diff --git a/Bin/web/lib/spring-test-5.1.5.RELEASE.jar b/Bin/web/lib/spring-test-5.1.5.RELEASE.jar new file mode 100644 index 0000000..340a276 --- /dev/null +++ b/Bin/web/lib/spring-test-5.1.5.RELEASE.jar Binary files differ diff --git a/Bin/web/lib/swing-worker-1.1.jar b/Bin/web/lib/swing-worker-1.1.jar new file mode 100644 index 0000000..3935611 --- /dev/null +++ b/Bin/web/lib/swing-worker-1.1.jar Binary files differ diff --git a/Bin/web/lib/swingx-1.6.1.jar b/Bin/web/lib/swingx-1.6.1.jar new file mode 100644 index 0000000..b0bcc87 --- /dev/null +++ b/Bin/web/lib/swingx-1.6.1.jar Binary files differ diff --git a/Bin/web/lib/swixml-2.0.jar b/Bin/web/lib/swixml-2.0.jar new file mode 100644 index 0000000..2f0fa2b --- /dev/null +++ b/Bin/web/lib/swixml-2.0.jar Binary files differ diff --git a/Bin/web/lib/transmittable-thread-local-2.12.6.jar b/Bin/web/lib/transmittable-thread-local-2.12.6.jar new file mode 100644 index 0000000..bc6ca55 --- /dev/null +++ b/Bin/web/lib/transmittable-thread-local-2.12.6.jar Binary files differ diff --git a/Bin/web/lib/uitheme-1.3.1.jar b/Bin/web/lib/uitheme-1.3.1.jar new file mode 100644 index 0000000..caacb71 --- /dev/null +++ b/Bin/web/lib/uitheme-1.3.1.jar Binary files differ diff --git a/Bin/web/lib/xmlunit-core-2.6.2.jar b/Bin/web/lib/xmlunit-core-2.6.2.jar new file mode 100644 index 0000000..dec8eb5 --- /dev/null +++ b/Bin/web/lib/xmlunit-core-2.6.2.jar Binary files differ diff --git a/Bin/web/vci-platform-web.jar b/Bin/web/vci-platform-web.jar index 6e62cbc..02524dd 100644 --- a/Bin/web/vci-platform-web.jar +++ b/Bin/web/vci-platform-web.jar Binary files differ diff --git a/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PLActionClsDTO.java b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PLActionClsDTO.java new file mode 100644 index 0000000..529491a --- /dev/null +++ b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PLActionClsDTO.java @@ -0,0 +1,57 @@ +package com.vci.dto; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * Action鍒嗙被浼犺緭瀵硅薄 + * @author yuxc + * @date 2024/8/16 15:50 + */ +@Data +public class PLActionClsDTO implements java.io.Serializable{ + + /** + * 绂佹淇敼杩欎釜鍊� + */ + private static final long serialVersionUID = 2009350578651813260L; + /** + *涓婚敭 + */ + public String id; + /** + *鍒嗙被鍚嶇О + */ + public String name; + /** + *鐖朵富閿� + */ + public String pid; + /** + *澶囨敞 + */ + public String description; + /** + *鍒涘缓浜� + */ + public String creator; + /** + *鍒涘缓鏃堕棿 + */ + public long createTime; + /** + *鍒嗙被搴忓彿 + */ + public short serialno; + /** + * 瀛愯妭鐐� + */ + public List<PLActionClsDTO> childs = new ArrayList<>(); + + /** + * 褰撳墠鍒嗙被涓嬬殑鎵�鏈塧ction + */ + public List<PLActionDTO> actionChilds = new ArrayList<>(); +} diff --git a/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PLActionDTO.java b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PLActionDTO.java new file mode 100644 index 0000000..a631dd8 --- /dev/null +++ b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PLActionDTO.java @@ -0,0 +1,70 @@ +package com.vci.dto; + +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * Action浼犺緭瀵硅薄 + * @author yuxc + * @date 2024/8/20 16:47 + */ +@Data +public class PLActionDTO implements java.io.Serializable{ + + /** + * 绂佹淇敼杩欎釜鍊� + */ + private static final long serialVersionUID = 2009350578651813260L; + /** + * 涓婚敭 + */ + private String plOId; + /** + * 缂栧彿 + */ + private String plCode; + /** + * 鍚嶇О + */ + private String plName; + /** + * B/S鍦板潃锛岀晫闈㈢被璺緞 + */ + private String plBSUrl; + /** + * c/s绫昏矾寰� 鐣岄潰閾炬帴鍦板潃 + */ + private String plCSClass; + /** + * 鎻忚堪 + */ + private String plDesc; + /** + * 绫诲瀷 + */ + private String plTypeType; + /** + * 鍒涘缓鏃堕棿 + */ + private long plCreateTime; + /** + * 鍒涘缓浜� + */ + private String plCreateUser; + /** + * 淇敼鏃堕棿 + */ + private long plModifyTime; + /** + * 淇敼浜� + */ + private String plModifyUser; + + private String plLicensOrs; + /** + * 鐖惰妭鐐筰d + */ + private String plActionCls; +} diff --git a/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PLActionQueryDTO.java b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PLActionQueryDTO.java new file mode 100644 index 0000000..aa6032b --- /dev/null +++ b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PLActionQueryDTO.java @@ -0,0 +1,45 @@ +package com.vci.dto; + +import lombok.Data; +/** + * Action鏌ヨ浼犺緭瀵硅薄 + * @author yuxc + * @date 2024/8/20 14:45 + */ +@Data +public class PLActionQueryDTO implements java.io.Serializable{ + + /** + * 绂佹淇敼杩欎釜鍊� + */ + private static final long serialVersionUID = 2009350578651813260L; + /** + *缂栧彿 + */ + private String plcode; + /** + *鍚嶇О + */ + private String plname; + /** + *B/S绫昏矾寰� + */ + private String plbsurl; + /** + *C/S绫昏矾寰� + */ + private String plcsclass; + /** + *涓氬姟绫诲瀷 + */ + private String pltypetype; + /** + *鎻忚堪 + */ + private String pldesc; + /** + *鍒嗙被ID + */ + private String plactioncls; + +} diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsActionController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsActionController.java new file mode 100644 index 0000000..01b4da8 --- /dev/null +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsActionController.java @@ -0,0 +1,160 @@ +package com.vci.web.controller; + +import com.vci.corba.common.PLException; +import com.vci.dto.PLActionClsDTO; +import com.vci.dto.PLActionDTO; +import com.vci.dto.PLActionQueryDTO; +import com.vci.starter.web.pagemodel.BaseResult; +import com.vci.web.service.OsActionServiceI; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; + +/** + * Action绠$悊鐨勬帶鍒跺櫒 + * @author yuxc + * @date 2024-8-16 + */ +@RequestMapping("/actionController") +@RestController +public class OsActionController { + + /** + * Action鏈嶅姟 + */ + @Autowired + private OsActionServiceI osActionServiceI; + + /** + * 淇濆瓨Action鍒嗙被淇℃伅 + * @param pLActionCls Action鍒嗙被淇℃伅 + * @return 淇濆瓨缁撴灉 + */ + @PostMapping("/saveActionCls") + public BaseResult saveActionCls(@RequestBody PLActionClsDTO pLActionCls){ + try { + return osActionServiceI.saveActionCls(pLActionCls); + } catch (PLException e) { + BaseResult objectBaseResult = new BaseResult<>(); + objectBaseResult.setCode(Integer.parseInt(e.code)); + objectBaseResult.setMsg(Arrays.toString(e.messages)); + return objectBaseResult; + } + } + + /** + * 淇敼Action鍒嗙被淇℃伅 + * @param pLActionCls Action鍒嗙被淇℃伅 + * @return 淇敼缁撴灉 + */ + @PostMapping("/updateActionCls") + public BaseResult updateActionCls(@RequestBody PLActionClsDTO pLActionCls){ + try { + return osActionServiceI.updateActionCls(pLActionCls); + } catch (PLException e) { + BaseResult objectBaseResult = new BaseResult<>(); + objectBaseResult.setCode(Integer.parseInt(e.code)); + objectBaseResult.setMsg(Arrays.toString(e.messages)); + return objectBaseResult; + } + } + + /** + * 鑾峰彇Action鍒嗙被鏍� + * isExp 鏄惁鐢ㄦ埛瀵煎嚭 true鏄紝false鍚� + * @return 鏌ヨ缁撴灉 + */ + @GetMapping("/getActionTree") + public BaseResult getActionTree(boolean isExp){ + try { + return osActionServiceI.getActionTree(isExp); + } catch (PLException e) { + BaseResult objectBaseResult = new BaseResult<>(); + objectBaseResult.setCode(Integer.parseInt(e.code)); + objectBaseResult.setMsg(Arrays.toString(e.messages)); + return objectBaseResult; + } + } + + /** + * 鑾峰彇Action琛ㄦ牸鏁版嵁 + * dto 鏌ヨ鏉′欢 + * @return 鏌ヨ缁撴灉 + */ + @PostMapping("/getActionTableData") + public BaseResult getActionTableData(@RequestBody PLActionQueryDTO dto){ + try { + return osActionServiceI.getActionTableData(dto); + } catch (PLException e) { + BaseResult objectBaseResult = new BaseResult<>(); + objectBaseResult.setCode(Integer.parseInt(e.code)); + objectBaseResult.setMsg(Arrays.toString(e.messages)); + return objectBaseResult; + } + } + + /** + * 淇濆瓨Action鏁版嵁 + * dto action浼犺緭瀵硅薄 + * @return 淇濆瓨缁撴灉 + */ + @PostMapping("/saveAction") + public BaseResult saveAction(@RequestBody PLActionDTO dto){ + try { + return osActionServiceI.saveAction(dto); + } catch (PLException e) { + BaseResult objectBaseResult = new BaseResult<>(); + objectBaseResult.setCode(Integer.parseInt(e.code)); + objectBaseResult.setMsg(Arrays.toString(e.messages)); + return objectBaseResult; + } + } + + /** + * 淇敼Action鏁版嵁 + * dto action浼犺緭瀵硅薄 + * @return 淇敼缁撴灉 + */ + @PostMapping("/updateAction") + public BaseResult updateAction(@RequestBody PLActionDTO dto){ + try { + return osActionServiceI.updateAction(dto); + } catch (PLException e) { + BaseResult objectBaseResult = new BaseResult<>(); + objectBaseResult.setCode(Integer.parseInt(e.code)); + objectBaseResult.setMsg(Arrays.toString(e.messages)); + return objectBaseResult; + } + } + + /** + * 鍒犻櫎Action鏁版嵁 + * dto action浼犺緭瀵硅薄 + * @return 鍒犻櫎缁撴灉 + */ + @DeleteMapping("/deleteAction") + public BaseResult deleteAction(@RequestBody PLActionDTO dto){ + try { + return osActionServiceI.deleteAction(dto); + } catch (PLException e) { + BaseResult objectBaseResult = new BaseResult<>(); + objectBaseResult.setCode(Integer.parseInt(e.code)); + objectBaseResult.setMsg(Arrays.toString(e.messages)); + return objectBaseResult; + } + } + + /** + * 瀵煎嚭Action + * @return + */ + @PostMapping("/exportBeans") + public void exportBeans(@RequestBody List<String> actionOid, HttpServletResponse response) throws PLException, IOException { + osActionServiceI.exportBeans(actionOid, response); + } + +} diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/other/ExportActionLogBean.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/other/ExportActionLogBean.java new file mode 100644 index 0000000..231908c --- /dev/null +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/other/ExportActionLogBean.java @@ -0,0 +1,156 @@ +package com.vci.web.other; + +import java.text.SimpleDateFormat; +import java.util.Date; +public class ExportActionLogBean implements IExportLogBean { + /** + * + */ + private static final long serialVersionUID = 10086L; + private String no = "1"; + private static int index = 1; + private String exportState = "姝e父"; + private String coding = ""; + private String name =""; + private String CSRegister = ""; + private String BSRegister = ""; + private String type = ""; + private String description = ""; + private String category = ""; + private Date date = null; + private SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss "); + + public ExportActionLogBean() { + + this( "-1", "ExportActionLogBean 瀵硅薄鏋勫缓 浣嗘湭璁剧疆鍊�", "null", + "null", "null", "null", "null", + "null", "null" ); + index = 1; + + } + public ExportActionLogBean(String exportState, String coding, + String name, String cSRegister, String bSRegister, String type, + String description, String category) { + this( ""+index++, exportState, coding, + name, cSRegister, bSRegister,type, + description,category); + } + public ExportActionLogBean(String no, String exportState, String coding, + String name, String cSRegister, String bSRegister, String type, + String description, String category) { + super(); + this.no = no; + if( exportState!=null || !no.equals("-1")){//榛樿鐘舵�佷负姝e父 + this.exportState = exportState; + } + + this.coding = coding; + this.name = name; + CSRegister = cSRegister; + BSRegister = bSRegister; + this.type = type; + this.description = description; + this.category = category; + } + + @Override + public Object[] getLogRowObjcets() { + Object obj []= {no,exportState,coding,name,CSRegister,BSRegister,type,description,category}; + return obj; + } + + public Object[] getInportLogRowObjcets() { + Object obj []= {no,exportState,coding,name,CSRegister,BSRegister,type,description}; + return obj; + } + + public String getNo() { + return no; + } + + public String getExportState() { + return exportState; + } + + + + public String getName() { + return name; + } + + public String getCSRegister() { + return CSRegister; + } + + public String getBSRegister() { + return BSRegister; + } + + public String getType() { + return type; + } + + public String getDescription() { + return description; + } + + public String getCategory() { + return category; + } + + public void setNo(String no) { + this.no = no; + } + + public void setExportState(String exportState) { + this.exportState = exportState; + } + + public void setName(String name) { + this.name = name; + } + + public void setCSRegister(String cSRegister) { + CSRegister = cSRegister; + } + + public void setBSRegister(String bSRegister) { + BSRegister = bSRegister; + } + + public void setType(String type) { + this.type = type; + } + + public void setDescription(String description) { + this.description = description; + } + + public void setCategory(String category) { + this.category = category; + } + + @Override + public String getLogRowContent() { + date = new Date(); + String info =format.format(date)+"---------"; + return info+" [搴忓彿=" + no + ", 瀵煎嚭鐘舵��=" + exportState + + ", 缂栧彿=" + coding + ", 鍚嶇О=" + name + ", CS娉ㄥ唽=" + + CSRegister + ", BS娉ㄥ唽=" + BSRegister + ", 绫诲瀷=" + type + + ", 鎻忚堪=" + description + ", 鎵�灞炲垎绫�=" + category + + "]"; + + } + + public String getCoding() { + return coding; + } + + public void setCoding(String coding) { + this.coding = coding; + } + + + + +} diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/other/ExportBeans.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/other/ExportBeans.java new file mode 100644 index 0000000..109e2cc --- /dev/null +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/other/ExportBeans.java @@ -0,0 +1,153 @@ +package com.vci.web.other; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map.Entry; +import com.vci.corba.portal.data.PLAction; +import com.vci.corba.portal.data.PLActionCls; +import com.vci.corba.portal.data.PLActionParam; + + +public class ExportBeans implements Serializable{ + private static final long serialVersionUID = 10086L; + private HashMap<String/*ActionId*/,PLAction> PLActionBeans = new HashMap<String,PLAction>(); + private HashMap<String/*鍒嗙被鍚嶇О*/,String/*id*/> PLActionClsExt = new HashMap<String,String>(); + private HashMap<String/*id*/,PLActionCls> PLActionClsBeans = new HashMap<String,PLActionCls>(); + private HashMap<String/*Action缂栫爜*/, ArrayList<PLActionParam> > PLActionParamBeans = new HashMap<String, ArrayList<PLActionParam> >(); + private HashMap<String/*ActionCls缂栫爜*/, ArrayList<PLAction> > PLActionListsMap = null; + private ExportActionLogBean logBean = null;//鏃ュ織鏂囦欢 + + public ExportBeans() { + + logBean = new ExportActionLogBean(); + } + public HashMap<String, PLActionCls> getPLActionClsBeans() { + return PLActionClsBeans; + } + public HashMap<String, PLAction> getPLActions() { + return PLActionBeans; + } + + public void addPLActionClsBean(PLActionCls pLActionCls){ + PLActionClsBeans.put(pLActionCls.id, pLActionCls); + PLActionClsExt.put(pLActionCls.name,pLActionCls.id); + + } + public PLActionCls getPLActionClsBeanById(String id){ + return PLActionClsBeans.get(id); + } + public PLActionCls getPLActionClsBeanByName(String name){ + if(PLActionClsExt.get(name) == null){ + return null; + } + return PLActionClsBeans.get(PLActionClsExt.get(name)); + } + /** + * 娣诲姞PLActionBean骞跺悓鏃舵坊鍔燩LActionBean瀵瑰簲鍙傛暟杩涜璁板綍 + * @param pLAction + */ +// public void addPLActionBean(PLAction pLAction){ +// this.addPLActionBean(pLAction,null); +// } + /** + * 娣诲姞PLActionBean鍚� logBean瀛樺叆鍊� + * + */ + public void setLogBean(ExportActionLogBean logBean) { + this.logBean = logBean; + } + /** + * 娣诲姞PLActionBean鍚� logBean瀛樺叆鍊� + * + */ + public ExportActionLogBean getLogBean() { + return logBean; + } + + public PLAction getPLActionById(String pLActionId){ + return PLActionBeans.get(pLActionId); + } + public ArrayList<PLAction> getPLActionByPlActionClsId(String plActionClsId){ + if( PLActionListsMap == null){ + PLActionListsMap = new HashMap<String/*ActionCls缂栫爜*/,ArrayList<PLAction>>(); + for (Entry<String, PLAction> PLActionEntry : PLActionBeans.entrySet()) { + String PLActionListsMapKey = PLActionEntry.getValue().plActionCls ; + if(PLActionListsMapKey.equals("")){ + PLActionListsMapKey = "when key is null ,change the key to this"; + } + ArrayList<PLAction> actionList = PLActionListsMap.get(PLActionListsMapKey); + if( actionList == null){ + actionList = new ArrayList<PLAction>(); + actionList.add(PLActionEntry.getValue()); + PLActionListsMap.put(PLActionListsMapKey,actionList); + }else{ + actionList.add(PLActionEntry.getValue()); + } + + } + }; + + if(plActionClsId.equals("")){ + plActionClsId = "when key is null ,change the key to this"; + } + return PLActionListsMap.get(plActionClsId); + } + public void addPLActionParamBean(PLActionParam pLActionParam){ + if(pLActionParam.action!=null && pLActionParam.action!=""){ + if(PLActionParamBeans.get(pLActionParam.action) == null){ + ArrayList<PLActionParam> arraylist = new ArrayList<PLActionParam>(); + PLActionParamBeans.put(pLActionParam.action, arraylist); + } + PLActionParamBeans.get(pLActionParam.action).add(pLActionParam); + } + + } + public PLActionParam[] getPLActionParamArrayByActionId(String paramString){ + ArrayList<PLActionParam> pLActionParams = PLActionParamBeans.get(paramString); + + if(pLActionParams != null && pLActionParams.size() > 0 ){ + PLActionParam[] actionParams = new PLActionParam[pLActionParams.size()]; + for (int i = 0; i < pLActionParams.size(); i++) { + actionParams[i] = pLActionParams.get(i); + } + return actionParams; + } + return null; + } +// /** +// * 娣诲姞PLActionBean骞跺悓鏃舵坊鍔燩LActionBean瀵瑰簲鍙傛暟杩涜璁板綍 +// * 鑳借繃鏂逛究鑾峰緱category鏃剁敤姝ゆ柟娉�. 鍙互闄嶄綆绯荤粺娑堣�� +// * @param pLAction +// */ +// public void addPLActionBean(PLAction plAction, String category) { +// PLActionBeans.put(plAction.plOId, plAction); +// PLActionCls[] plActionCls = null; +// +// try { +// if(category == null ){ +// plActionCls = UITools.getService().getPLActionClsArray(); +// for (PLActionCls plActionCls2 : plActionCls) {//鑾峰緱鍒嗙被鍚嶇О +// if(plActionCls2.id.equals(plAction.plActionCls)){ +// category = plActionCls2.name ; +// } +// } +// } +// PLActionParam[] params = UITools.getService().getPLActionParamArrayByActionId(plAction.plOId); +// if(params != null && params.length > 0){//濡傛灉鍙傛暟瀛樺湪 +// for (PLActionParam plActionParam : params) {//娣诲姞action鍙傛暟 +// this.addPLActionParamBean(plActionParam); +// } +// } +// logBean = new ExportActionLogBean(ExportActionLogBean.RIGHT_STATE, +// plAction.plCode,plAction.plName,plAction.plCSClass,plAction.plBSUrl, +// plAction.plTypeType,plAction.plDesc,category); +// +// } catch (PLException e) { +// logBean = new ExportActionLogBean(e.getMessage(), +// plAction.plCode,plAction.plName,plAction.plCSClass,plAction.plBSUrl, +// plAction.plTypeType,plAction.plDesc,category); e.printStackTrace(); +// } +// } + +} \ No newline at end of file diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/other/IExportLogBean.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/other/IExportLogBean.java new file mode 100644 index 0000000..d35d27a --- /dev/null +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/other/IExportLogBean.java @@ -0,0 +1,19 @@ +package com.vci.web.other; + +import java.io.Serializable; + +public interface IExportLogBean extends Serializable{ + static final long serialVersionUID = 1L; + static String RIGHT_STATE = "姝e父"; + /** + * 杩斿洖瀛楃涓叉暟缁勫皢鍐呭鍐欏叆鍒癑Table鏂囦欢涓� + * @return + */ + public abstract Object[] getLogRowObjcets(); + /** + * 杩斿洖瀛楃涓插皢鍐呭鍐欏叆鍒發og鏂囦欢涓� + * @return + */ + public abstract String getLogRowContent(); + +} \ No newline at end of file diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsActionServiceI.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsActionServiceI.java new file mode 100644 index 0000000..26e0397 --- /dev/null +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsActionServiceI.java @@ -0,0 +1,68 @@ +package com.vci.web.service; + +import com.vci.corba.common.PLException; +import com.vci.dto.PLActionClsDTO; +import com.vci.dto.PLActionDTO; +import com.vci.dto.PLActionQueryDTO; +import com.vci.starter.web.pagemodel.BaseResult; +import org.springframework.web.bind.annotation.RequestBody; + +import javax.servlet.http.HttpServletResponse; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.List; + +/** + * Action绠$悊鐨勬湇鍔� + * @author yuxc + * @date 2024-8-16 + */ +public interface OsActionServiceI { + /** + * 淇濆瓨Action鍒嗙被淇℃伅 + * @param pLActionCls Action鍒嗙被淇℃伅 + * @return 淇濆瓨缁撴灉 + */ + BaseResult saveActionCls(PLActionClsDTO pLActionCls) throws PLException; + /** + * 淇敼Action鍒嗙被淇℃伅 + * @param pLActionCls Action鍒嗙被淇℃伅 + * @return 淇敼缁撴灉 + */ + BaseResult updateActionCls(PLActionClsDTO pLActionCls) throws PLException; + /** + * 鑾峰彇Action鍒嗙被鏍� + * isExp 鏄惁鐢ㄦ埛瀵煎嚭 true鏄紝false鍚� + * @return 鏌ヨ缁撴灉 + */ + BaseResult getActionTree(boolean isExp) throws PLException; + /** + * 鑾峰彇Action琛ㄦ牸鏁版嵁 + * dto 鏌ヨ鏉′欢 + * @return 鏌ヨ缁撴灉 + */ + BaseResult getActionTableData(PLActionQueryDTO dto) throws PLException; + /** + * 淇濆瓨Action鏁版嵁 + * dto action浼犺緭瀵硅薄 + * @return 淇濆瓨缁撴灉 + */ + BaseResult saveAction(PLActionDTO dto) throws PLException; + /** + * 淇敼Action鏁版嵁 + * dto action浼犺緭瀵硅薄 + * @return 淇敼缁撴灉 + */ + BaseResult updateAction(PLActionDTO dto) throws PLException; + /** + * 鍒犻櫎Action鏁版嵁 + * dto action浼犺緭瀵硅薄 + * @return 鍒犻櫎缁撴灉 + */ + BaseResult deleteAction(PLActionDTO dto) throws PLException; + /** + * 瀵煎嚭Action + * @return + */ + void exportBeans(List<String> actionOid, HttpServletResponse response) throws PLException, IOException; +} diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsActionServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsActionServiceImpl.java new file mode 100644 index 0000000..0ce7bef --- /dev/null +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsActionServiceImpl.java @@ -0,0 +1,405 @@ +package com.vci.web.service.impl; +import cn.hutool.core.io.FileUtil; +import com.vci.corba.common.PLException; +import com.vci.corba.omd.ltm.LinkType; +import com.vci.corba.omd.qtm.QTInfo; +import com.vci.corba.portal.data.Constraint; +import com.vci.corba.portal.data.PLAction; +import com.vci.corba.portal.data.PLActionCls; +import com.vci.corba.portal.data.PLActionParam; +import com.vci.dto.PLActionClsDTO; +import com.vci.dto.PLActionDTO; +import com.vci.dto.PLActionQueryDTO; +import com.vci.starter.web.pagemodel.BaseResult; +import com.vci.starter.web.util.ControllerUtil; +import com.vci.starter.web.util.LocalFileUtil; +import com.vci.web.other.ExportActionLogBean; +import com.vci.web.other.ExportBeans; +import com.vci.web.other.LinkQTExportData; +import com.vci.web.service.*; +import com.vci.web.util.*; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.web.bind.annotation.RequestBody; + +import javax.servlet.http.HttpServletResponse; +import java.io.*; +import java.util.*; +import java.util.stream.Collectors; + +/** + * Action绠$悊鐨勬湇鍔″疄鐜扮被 + * @author yuxc + * @date 2024-8-16 + */ +@Service +public class OsActionServiceImpl implements OsActionServiceI { + + @Autowired + private PlatformClientUtil platformClientUtil; + /** + * 淇濆瓨Action鍒嗙被淇℃伅 + * @param pLActionCls Action鍒嗙被淇℃伅 + * @return 淇濆瓨缁撴灉 + */ + @Override + public BaseResult saveActionCls(PLActionClsDTO pLActionCls) throws PLException { + + if (pLActionCls.getName() == null || pLActionCls.getName().trim().equals("")) { + throw new PLException("500", new String[]{"鍒嗙被鍚嶇О涓嶈兘涓虹┖!"}); + } + if (pLActionCls.getName().equals("鏈垎绫�")) { + throw new PLException("500", new String[]{"鏈垎绫昏妭鐐瑰凡缁忓瓨鍦�!"}); + } + PLActionCls pac = new PLActionCls(); + pac.id = WebUtil.getSnowflakePk(); + pac.name = pLActionCls.getName(); + pac.pid = pLActionCls.getPid(); + pac.description = pLActionCls.getDescription() == null ? "" : pLActionCls.getDescription(); + pac.creator = WebUtil.getCurrentUserId(); + pac.createTime = System.currentTimeMillis(); + pac.serialno = pLActionCls.getSerialno(); + // 淇濆瓨鍒嗙被淇℃伅 + String message = platformClientUtil.getUIService().creaetePLActionCls(pac); + if (message.startsWith("0")) { + if (message.equals("01")) { + message = "鍒嗙被" + pac.name + "宸茬粡瀛樺湪锛�"; + } else if (message.equals("02")) { + message = "鍚屼竴鍒嗙被涓嬪簭鍙蜂笉鑳介噸澶嶏紒"; + } else { + message = "淇濆瓨鍒嗙被鏃跺彂鐢熷紓甯革紒" + message.substring(1); + } + throw new PLException("500", new String[]{message}); + } + return BaseResult.success("鍒嗙被鍒涘缓鎴愬姛锛�"); + } + + /** + * 淇敼Action鍒嗙被淇℃伅 + * @param pLActionCls Action鍒嗙被淇℃伅 + * @return 淇濆瓨缁撴灉 + */ + @Override + public BaseResult updateActionCls(PLActionClsDTO pLActionCls) throws PLException { + + if (pLActionCls.getName() == null || pLActionCls.getName().trim().equals("")) { + throw new PLException("500", new String[]{"鍒嗙被鍚嶇О涓嶈兘涓虹┖!"}); + } + if (pLActionCls.getName().equals("鏈垎绫�")) { + throw new PLException("500", new String[]{"鏈垎绫昏妭鐐瑰凡缁忓瓨鍦�!"}); + } + if (pLActionCls.getId() == null || pLActionCls.getId().trim().equals("")) { + throw new PLException("500", new String[]{"涓婚敭涓嶈兘涓虹┖!"}); + } + PLActionCls pac = new PLActionCls(); + pac.name = pLActionCls.getName(); + pac.pid = pLActionCls.getPid(); + pac.description = pLActionCls.getDescription() == null ? "" : pLActionCls.getDescription(); + pac.creator = WebUtil.getCurrentUserId(); + pac.createTime = System.currentTimeMillis(); + pac.serialno = pLActionCls.getSerialno(); + // 淇敼鍒嗙被淇℃伅 + String message = platformClientUtil.getUIService().editPLActionCls(pac); + if (message.startsWith("0")) { + if (message.equals("01")) { + message = "鍒嗙被" + pac.name + "宸茬粡瀛樺湪锛�"; + } else if (message.equals("02")) { + message = "鍚屼竴鍒嗙被涓嬪簭鍙蜂笉鑳介噸澶嶏紒"; + } else { + message = "淇敼鍒嗙被鏃跺彂鐢熷紓甯革紒" + message.substring(1); + } + throw new PLException("500", new String[]{message}); + } + return BaseResult.success("鍒嗙被淇敼鎴愬姛锛�"); + } + + /** + * 鑾峰彇Action鍒嗙被鏍� + * isExp 鏄惁鐢ㄦ埛瀵煎嚭 true鏄紝false鍚� + * @return 鏌ヨ缁撴灉 + */ + @Override + public BaseResult getActionTree(boolean isExp) throws PLException { + PLActionCls[] clses = platformClientUtil.getUIService().getPLActionClsArray(); + PLActionClsDTO treDto = new PLActionClsDTO(); + treDto.setName("Action鍒嗙被"); + Map<String, List<PLActionCls>> allDataMap = Arrays.stream(clses).collect(Collectors.groupingBy(pl -> pl.pid)); + + for (PLActionCls cls : clses) { + if (StringUtils.isBlank(cls.pid)) { + PLActionClsDTO parentDto = new PLActionClsDTO(); + parentDto.setId(cls.id); + parentDto.setName(cls.name); + parentDto.setPid(cls.pid); + parentDto.setDescription(cls.description); + parentDto.setCreator(cls.creator); + parentDto.setCreateTime(cls.createTime); + parentDto.setSerialno(cls.serialno); + //杩欓噷澶勭悊瀵煎嚭鏍戠殑閫昏緫 + if(isExp){ + Constraint[] consArray = new Constraint[1]; + consArray[0] = new Constraint("plactioncls", cls.id); + PLAction[] plActionsByConsArray = platformClientUtil.getUIService().getPLActionsByConsArray(consArray); + if(parentDto.getChilds().isEmpty() && plActionsByConsArray.length == 0){ + continue; + } + for (PLAction plAction : plActionsByConsArray) { + PLActionDTO plActionDTO = new PLActionDTO(); + plActionDTO.setPlName(plAction.plCode + "/" + plAction.plName); + plActionDTO.setPlCode(plAction.plCode); + plActionDTO.setPlOId(plAction.plOId); + parentDto.getActionChilds().add(plActionDTO); + } + } + addClsTreeNode(parentDto, allDataMap, isExp); + treDto.getChilds().add(parentDto); + } + } + PLActionClsDTO plac = new PLActionClsDTO(); + plac.setName("鏈垎绫�"); + if(isExp){ + Constraint[] consArray = new Constraint[1]; + consArray[0] = new Constraint("plactioncls", ""); + PLAction[] plActionsByConsArray = platformClientUtil.getUIService().getPLActionsByConsArray(consArray); + for (PLAction plAction : plActionsByConsArray) { + PLActionDTO plActionDTO = new PLActionDTO(); + plActionDTO.setPlName(plAction.plCode + "/" + plAction.plName); + plActionDTO.setPlCode(plAction.plCode); + plActionDTO.setPlOId(plAction.plOId); + plac.getActionChilds().add(plActionDTO); + } + } + treDto.getChilds().add(plac); + return BaseResult.success(treDto); + } + /** + * 鑾峰彇Action琛ㄦ牸鏁版嵁 + * dto 鏌ヨ鏉′欢 + * @return 鏌ヨ缁撴灉 + */ + @Override + public BaseResult getActionTableData(PLActionQueryDTO dto) throws PLException { + Constraint[] consArray ; + if(StringUtils.isNotBlank(dto.getPlactioncls())){ + consArray = new Constraint[7]; + consArray[6] = new Constraint("plactioncls", dto.getPlactioncls()); + }else { + consArray = new Constraint[6]; + } + consArray[0] = new Constraint("plcode", dto.getPlcode()); + consArray[1] = new Constraint("plname", dto.getPlname()); + consArray[2] = new Constraint("plbsurl", dto.getPlbsurl()); + consArray[3] = new Constraint("plcsclass", dto.getPlcsclass()); + consArray[4] = new Constraint("pltypetype", dto.getPltypetype()); + consArray[5] = new Constraint("pldesc", dto.getPldesc()); + PLAction[] plActionsByConsArray = platformClientUtil.getUIService().getPLActionsByConsArray(consArray); + Arrays.sort(plActionsByConsArray, new Comparator<PLAction>() { + @Override + public int compare(PLAction o1, PLAction o2) { + String py1 = PinyinCommon.getPingYin(o1.plCode); + String py2 = PinyinCommon.getPingYin(o2.plCode); + return py1.compareTo(py2); + } + }); + return BaseResult.dataList(Arrays.asList(plActionsByConsArray)); + } + /** + * 淇濆瓨Action鏁版嵁 + * dto action浼犺緭瀵硅薄 + * @return 淇濆瓨缁撴灉 + */ + @Override + public BaseResult saveAction(PLActionDTO dto) throws PLException { + if(StringUtils.isBlank(dto.getPlCode())){ + throw new PLException("500", new String[]{"璇疯緭鍏ョ紪鍙�"}); + } + PLAction[] actionsInDB= platformClientUtil.getUIService().getAllPLAction(); + for(int i =0;i<actionsInDB.length;i++){ + if (dto.getPlCode().equals(actionsInDB[i].plCode)) { + throw new PLException("500", new String[]{"鏂板缓Action缂栧彿閲嶅锛岃閲嶆柊杈撳叆缂栧彿"}); + } + } + PLAction plAction = new PLAction(); + plAction.plOId = WebUtil.getSnowflakePk(); + plAction.plCode = StringUtils.defaultString(dto.getPlCode()); + plAction.plName = StringUtils.defaultString(dto.getPlName()); + plAction.plCSClass = StringUtils.defaultString(dto.getPlCSClass()); + plAction.plBSUrl = StringUtils.defaultString(dto.getPlBSUrl()); + plAction.plDesc = StringUtils.defaultString(dto.getPlDesc()); + plAction.plCreateUser = WebUtil.getCurrentUserId(); + plAction.plModifyUser = WebUtil.getCurrentUserId(); + plAction.plActionCls = StringUtils.defaultString(dto.getPlActionCls()); + plAction.plTypeType = StringUtils.defaultString(dto.getPlTypeType()); + boolean b = platformClientUtil.getUIService().savePLAction(plAction); + if(!b){ + throw new PLException("500", new String[]{"淇濆瓨澶辫触锛侊紒"}); + } + return BaseResult.success("鎿嶄綔鎴愬姛锛�"); + } + /** + * 淇敼Action鏁版嵁 + * dto action浼犺緭瀵硅薄 + * @return 淇敼缁撴灉 + */ + @Override + public BaseResult updateAction(PLActionDTO dto) throws PLException { + if(StringUtils.isBlank(dto.getPlCode())){ + throw new PLException("500", new String[]{"缂栧彿涓嶈兘涓虹┖"}); + } + PLAction[] actionsInDB= platformClientUtil.getUIService().getAllPLAction(); + for(int i =0;i<actionsInDB.length;i++){ + if (dto.getPlCode().equals(actionsInDB[i].plCode) && !dto.getPlOId().equals(actionsInDB[i].plOId)) { + throw new PLException("500", new String[]{"淇敼Action缂栧彿閲嶅锛岃纭缂栧彿"}); + } + } + PLAction plAction = new PLAction(); + plAction.plOId = StringUtils.defaultString(dto.getPlOId()); + plAction.plCode = StringUtils.defaultString(dto.getPlCode()); + plAction.plName = StringUtils.defaultString(dto.getPlName()); + plAction.plCSClass = StringUtils.defaultString(dto.getPlCSClass()); + plAction.plBSUrl = StringUtils.defaultString(dto.getPlBSUrl()); + plAction.plDesc = StringUtils.defaultString(dto.getPlDesc()); + plAction.plCreateUser = dto.getPlCreateUser(); + plAction.plModifyUser = WebUtil.getCurrentUserId(); + plAction.plActionCls = StringUtils.defaultString(dto.getPlActionCls()); + plAction.plTypeType = StringUtils.defaultString(dto.getPlTypeType()); + boolean b = platformClientUtil.getUIService().updatePLAction(plAction); + if(!b){ + throw new PLException("500", new String[]{"淇敼澶辫触锛侊紒"}); + } + return BaseResult.success("淇敼鎴愬姛锛�"); + } + + /** + * 鍒犻櫎Action鏁版嵁 + * dto action浼犺緭瀵硅薄 + * @return 鍒犻櫎缁撴灉 + */ + @Override + public BaseResult deleteAction(PLActionDTO dto) throws PLException { + PLAction plAction = new PLAction(); + plAction.plOId = StringUtils.defaultString(dto.getPlOId()); + plAction.plCode = StringUtils.defaultString(dto.getPlCode()); + plAction.plName = StringUtils.defaultString(dto.getPlName()); + plAction.plCSClass = StringUtils.defaultString(dto.getPlCSClass()); + plAction.plBSUrl = StringUtils.defaultString(dto.getPlBSUrl()); + plAction.plDesc = StringUtils.defaultString(dto.getPlDesc()); + plAction.plCreateUser = dto.getPlCreateUser(); + plAction.plModifyUser = WebUtil.getCurrentUserId(); + plAction.plActionCls = StringUtils.defaultString(dto.getPlActionCls()); + plAction.plTypeType = StringUtils.defaultString(dto.getPlTypeType()); + boolean b = platformClientUtil.getUIService().deletePLAction(plAction); + if(!b){ + throw new PLException("500", new String[]{"鍒犻櫎澶辫触锛侊紒"}); + } + return BaseResult.success("鍒犻櫎鎴愬姛锛�"); + } + /** + * 瀵煎嚭Action + * @return + */ + @Override + public void exportBeans(List<String> actionOid, HttpServletResponse response) throws PLException, IOException { + String defaultTempFolder = LocalFileUtil.getDefaultTempFolder(); + String vciqtmfFileName = defaultTempFolder + File.separator + "actionTemplateExp" + new Date().getTime() + ".vciamf"; + HashMap exportBeans = new HashMap<String, Object>(); + getExportBeans(actionOid, exportBeans);// 鑾峰緱瀵煎嚭Bean鍚屾椂锛岃褰昹og + + ObjectOutputStream vciamfFileStream = null; + try { + File vciqtmfFile = new File(vciqtmfFileName); + vciamfFileStream = new ObjectOutputStream(new FileOutputStream(vciqtmfFile)); + vciamfFileStream.writeObject(exportBeans); + }finally { + try { + if (vciamfFileStream != null) { + vciamfFileStream.flush(); + vciamfFileStream.close(); + } + } catch (Exception e) { + throw new PLException("500",new String[]{"瀵煎嚭娴佸叧闂紓甯革紒"}); + } + } + ControllerUtil.writeFileToResponse(response,vciqtmfFileName); + FileUtil.del(defaultTempFolder + File.separator); + } + + /** + * 澶勭悊瀵煎嚭鐨勫璞� + * @param actionOid 鐣岄潰閫夋嫨鐨刟ction鍒楄〃鏁版嵁 + * @param exportBeansMap 瀵煎嚭瀵硅薄 + * @return + * @throws PLException + */ + private void getExportBeans(List<String> actionOid, HashMap exportBeansMap) throws PLException { + PLActionCls[] plActionClsArray = platformClientUtil.getUIService().getPLActionClsArray(); + Map<String, PLActionCls> clsMap = Arrays.stream(plActionClsArray).collect(Collectors.toMap(e -> e.id, e -> e)); + ExportBeans exportBeans = new ExportBeans(); + for (String oid : actionOid) { + PLAction plAction = platformClientUtil.getUIService().getPLActionById(oid); + //鏈夌埗鑺傜偣鍒欒繘琛屽鐞� + if(StringUtils.isNotBlank(plAction.plActionCls)){ + allPLActionClsParent(exportBeans, clsMap.get(plAction.plActionCls), clsMap); + } + exportBeans.getPLActions().put(plAction.plOId, plAction); + PLActionParam[] params = platformClientUtil.getUIService().getPLActionParamArrayByActionId(plAction.plOId); + if(params != null && params.length > 0){//濡傛灉鍙傛暟瀛樺湪 + for (PLActionParam plActionParam : params) {//娣诲姞action鍙傛暟 + exportBeans.addPLActionParamBean(plActionParam); + } + } + String category = clsMap.containsKey(plAction.plActionCls) ? clsMap.get(plAction.plActionCls).name : ""; + exportBeans.setLogBean(new ExportActionLogBean(ExportActionLogBean.RIGHT_STATE, + plAction.plCode,plAction.plName,plAction.plCSClass,plAction.plBSUrl, + plAction.plTypeType,plAction.plDesc,category)); + } + exportBeansMap.put("exportBeans", exportBeans); + } + //澧炲姞鐖剁被鏁版嵁 + private void allPLActionClsParent(ExportBeans exportBeans, PLActionCls cls, Map<String, PLActionCls> clsMap) { + if(cls.pid != ""){ + allPLActionClsParent(exportBeans, clsMap.get(cls.pid), clsMap); + } + exportBeans.addPLActionClsBean(cls); + } + + /** + * 娣诲姞瀛愯妭鐐� + * @param parentDto 鐖惰妭鐐瑰璞� + * @param allDataMap 鎵�鏈夊垎缁勫璞� + * @param isExp true涓哄鍑哄姛鑳界殑鏍戯紝false涓虹晫闈㈠垎绫绘爲 + */ + private void addClsTreeNode(PLActionClsDTO parentDto, Map<String, List<PLActionCls>> allDataMap, Boolean isExp) throws PLException { + if(allDataMap.containsKey(parentDto.id)){ + for (PLActionCls cls : allDataMap.get(parentDto.id)) { + PLActionClsDTO childDto = new PLActionClsDTO(); + childDto.setId(cls.id); + childDto.setName(cls.name); + childDto.setPid(cls.pid); + childDto.setDescription(cls.description); + childDto.setCreator(cls.creator); + childDto.setCreateTime(cls.createTime); + childDto.setSerialno(cls.serialno); + if(isExp){ + Constraint[] consArray = new Constraint[1]; + consArray[0] = new Constraint("plactioncls", cls.id); + PLAction[] plActionsByConsArray = platformClientUtil.getUIService().getPLActionsByConsArray(consArray); + if(parentDto.getChilds().isEmpty() && plActionsByConsArray.length == 0){ + continue; + } + for (PLAction plAction : plActionsByConsArray) { + PLActionDTO plActionDTO = new PLActionDTO(); + plActionDTO.setPlName(plAction.plCode + "/" + plAction.plName); + plActionDTO.setPlCode(plAction.plCode); + plActionDTO.setPlOId(plAction.plOId); + parentDto.getActionChilds().add(plActionDTO); + } + } + addClsTreeNode(childDto, allDataMap, isExp); + parentDto.getChilds().add(childDto); + } + } + } + +} diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/PinyinCommon.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/PinyinCommon.java new file mode 100644 index 0000000..12cefb5 --- /dev/null +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/PinyinCommon.java @@ -0,0 +1,89 @@ +package com.vci.web.util; + +import net.sourceforge.pinyin4j.PinyinHelper; +import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType; +import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat; +import net.sourceforge.pinyin4j.format.HanyuPinyinToneType; +import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType; +import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination; + +/** + * + + * @author: ligang + + * @createtime: 2012-12-26 + + * @version: + + */ + public class PinyinCommon { + + /** + * 寰楀埌 鍏ㄦ嫾 + * @param src + * @return + */ + public static String getPingYin(String src){ + char[] t1 = null; + t1=src.toCharArray(); + String[] t2 = new String[t1.length]; + HanyuPinyinOutputFormat t3 = new HanyuPinyinOutputFormat(); + t3.setCaseType(HanyuPinyinCaseType.LOWERCASE); + t3.setToneType(HanyuPinyinToneType.WITHOUT_TONE); + t3.setVCharType(HanyuPinyinVCharType.WITH_V); + String t4=""; + int t0=t1.length; + try { + for (int i=0;i<t0;i++) { + //鍒ゆ柇鏄惁涓烘眽瀛楀瓧绗� + if(Character.toString(t1[i]).matches("[\\u4E00-\\u9FA5]+")) { + t2 = PinyinHelper.toHanyuPinyinStringArray(t1[i], t3); + t4+=t2[0]; + } else { + t4+= Character.toString(t1[i]); + } + } + return t4; + } + catch (BadHanyuPinyinOutputFormatCombination e1) { + e1.printStackTrace(); + } + return t4; + } + + /** + * 寰楀埌涓枃棣栧瓧姣� + * @param str + * @return + */ + public static String getPinYinHeadChar(String str) { + + String convert = ""; + for (int j = 0; j < str.length(); j++) { + char word = str.charAt(j); + String[] pinyinArray = PinyinHelper.toHanyuPinyinStringArray(word); + if (pinyinArray != null) { + convert += pinyinArray[0].charAt(0); + }else { + convert += word; + } + } + return convert; + } + /** + * 灏嗗瓧绗︿覆杞Щ涓篈SCII鐮� + * @param cnStr + * @return + */ + public static String getCnASCII(String cnStr) { + StringBuffer strBuf = new StringBuffer(); + byte[] bGBK = cnStr.getBytes(); + for(int i=0;i <bGBK.length;i++){ + //System.out.println(Integer.toHexString(bGBK[i]&0xff)); + strBuf.append(Integer.toHexString(bGBK[i]&0xff)); + } + return strBuf.toString(); + } + +} \ No newline at end of file diff --git a/Source/plt-web/plt-web-ui/src/api/queryTemplate/businessTypeQuery.js b/Source/plt-web/plt-web-ui/src/api/queryTemplate/businessTypeQuery.js new file mode 100644 index 0000000..3b4f3bd --- /dev/null +++ b/Source/plt-web/plt-web-ui/src/api/queryTemplate/businessTypeQuery.js @@ -0,0 +1,12 @@ +import request from '@/router/axios'; +//涓氬姟绫诲瀷鏌ヨ妯℃澘 +// 妯℃澘鍒楄〃鏌ヨ +export function gridTemplate(params) { + return request({ + url: "/api/templateController/queryTemplateList", + method: "get", + params:{ + ...params + } + }); +} diff --git a/Source/plt-web/plt-web-ui/src/api/queryTemplate/linkTypeQuery.js b/Source/plt-web/plt-web-ui/src/api/queryTemplate/linkTypeQuery.js new file mode 100644 index 0000000..12b013c --- /dev/null +++ b/Source/plt-web/plt-web-ui/src/api/queryTemplate/linkTypeQuery.js @@ -0,0 +1,10 @@ +import request from '@/router/axios'; +//閾炬帴绫诲瀷鏌ヨ妯℃澘 +// 鍒犻櫎 +export function deleteLinkTemplate(params) { + return request({ + url: "/api/templateController/deleteLinkTemplate", + method: "delete", + data:params + }); +} diff --git a/Source/plt-web/plt-web-ui/src/api/queryTemplate/queryDefine.js b/Source/plt-web/plt-web-ui/src/api/queryTemplate/queryDefine.js index c034c39..38c5e44 100644 --- a/Source/plt-web/plt-web-ui/src/api/queryTemplate/queryDefine.js +++ b/Source/plt-web/plt-web-ui/src/api/queryTemplate/queryDefine.js @@ -1,6 +1,6 @@ import request from '@/router/axios'; //鏌ヨ妯℃澘瀹氫箟 -// 妯℃澘鍒楄〃鏌ヨ +// 妯℃澘鍒楄〃瀹氫箟涓嬫媺妗嗘煡璇� export function gridTemplate(params) { return request({ url: "/api/templateController/queryTemplateList", @@ -11,6 +11,16 @@ }); } +export function getObjTypeQTs(params) { + return request({ + url: "/api/templateController/getObjTypeQTs", + method: "get", + params:{ + ...params + } + }); +} + // 淇敼 export function updateTemplate(params) { return request({ diff --git a/Source/plt-web/plt-web-ui/src/api/systemModel/mangeModel/api.js b/Source/plt-web/plt-web-ui/src/api/systemModel/mangeModel/api.js new file mode 100644 index 0000000..ec4b2c1 --- /dev/null +++ b/Source/plt-web/plt-web-ui/src/api/systemModel/mangeModel/api.js @@ -0,0 +1,58 @@ +import request from '@/router/axios'; + +// 鍒楄〃鏌ヨ +export function getSysModelTreeMenuByPID(params) { + return request({ + url: "/api/hmSysModConfigController/getSysModelTreeMenuByPID", + method: "get", + params + }); +} + +// 鏂板 +export function addModel(params) { + return request({ + url: "/api/hmSysModConfigController/addModel", + method: "post", + data:params + }); +} + +// 淇敼 +export function updateModel(params) { + return request({ + url: "/api/hmSysModConfigController/updateModel", + method: "put", + data:params + }); +} + +// 鍒犻櫎 +export function delModule(params) { + return request({ + url: "/api/hmSysModConfigController/delModule", + method: "delete", + data:params + }); +} + +// 瀵煎嚭sql +export function exportFunctionSql (params) { + return request({ + url: '/api/hmSysModConfigController/exportFunctionSql', + method: 'get', + headers: {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'}, + responseType: 'blob', + params + }) +} + +// 澧炲姞鎿嶄綔绫诲瀷 +export function addOperationType(data) { + return request({ + url: "/api/hmSysModConfigController/addOperationType", + method: "post", + data + }); +} + diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/versioning/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/versioning/index.vue index aeb9eea..276a7f3 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/versioning/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/versioning/index.vue @@ -19,7 +19,7 @@ </el-button> </div> <!-- 宸︿晶鏍� --> - <div style="height: calc(100vh - 300px);"> + <div style="height: calc(100vh - 260px);"> <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> <span slot-scope="{ node, data }" class="el-tree-node__label"> <span style="font-size: 15px"> diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/index.vue index 308c333..ddeabbc 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/index.vue @@ -3,24 +3,9 @@ <el-aside> <basic-container> - <div ref="TreeBox" style="height: calc(100vh - 144px);!important;"> - <div class="headerCon"> - <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">鍒涘缓 - </el-button> - <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">淇敼 - </el-button> - <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">鍒犻櫎 - </el-button> - <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭 - </el-button> - <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">瀵煎叆 - </el-button> - <el-button class="smallBtn" plain size="small" type="primary" - @click="checkViewClickHandler">鏌ョ湅浣跨敤鑼冨洿 - </el-button> - </div> + <div ref="TreeBox" style="height: calc(100vh - 154px);!important;"> <!-- 宸︿晶鏍� --> - <div style="height: calc(100vh - 280px);"> + <div style="height: calc(100vh - 190px);"> <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> <span slot-scope="{ node, data }" class="el-tree-node__label"> <span style="font-size: 15px"> @@ -36,6 +21,16 @@ <el-main> <basic-container> + <avue-crud ref="crud" + :data="crudData" :option="crudOption" :table-loading="tableLoading" style="margin-top: 10px"> + <template slot="menuLeft" slot-scope="scope"> + <el-button icon="el-icon-plus" size="small" type="primary" @click="addHandler">鍒涘缓</el-button> + <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editHandler">淇敼</el-button> + <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delHandler">鍒犻櫎</el-button> + <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭</el-button> + <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadClickHandler">瀵煎叆</el-button> + </template> + </avue-crud> </basic-container> </el-main> @@ -43,8 +38,187 @@ </template> <script> +import {getBizTypes} from "@/api/modeling/businessType/api"; +import {gridTemplate,saveTemplate,updateTemplate,deleteTemplate} from "@/api/queryTemplate/queryDefine"; +import basicOption from "@/util/basic-option"; +import func from "@/util/func"; +import {dateFormat} from "@/util/date"; export default { - name: "index" + name: "index", + data() { + return { + treeOption: { + height: 'auto', + defaultExpandedKeys: ['topNode'], + menu: false, + addBtn: false, + props: { + label: 'label', + value: 'oid', + children: 'children' + } + }, + nodeRow: {}, + treeData: [ { + label: '涓氬姟绫诲瀷鏍�', + oid: 'topNode', + children: [] + }], + templateForm: '', + templateData: [], + form: { + name: '' + }, + rules: { + name: [ + {required: true, message: '璇疯緭鍏ユ煡璇㈡ā鏉垮悕绉�', trigger: 'blur'} + ] + }, + title: '', + visible: false, + tableLoading: false, + crudData: [], + crudOption: { + ...basicOption, + addBtn: false, + editBtn: false, + delBtn: false, + selection: true, + menu: false, + height: "auto", + calcHeight: -40, + tip: false, + column: [{ + label: '鏌ヨ妯℃澘鍚嶇О', + prop: 'name' + }, { + label: '鍒涘缓浜�', + prop: 'creator' + }, { + label: '鍒涘缓鏃堕棿', + prop: 'createTime', + formatter:function (row, value) { + return dateFormat(new Date(value)) + } + }] + }, + selectionRow: [], + } + }, + created() { + this.getTreeList(); + }, + methods: { + //鏍戣〃鏌ヨ + getTreeList() { + const loading = this.$loading({}); + getBizTypes().then(res => { + const data = res.data.data.map(item => { + item.label = item.attributes.id; + return item; + }); + this.treeData[0].children = data; + loading.close(); + }) + }, + + // 鏍戠偣鍑� + nodeClick(row) { + this.nodeRow = row; + this.tableLoading = true; + this.getTemp(); + }, + getTemp() { + gridTemplate({btmName: this.nodeRow.label, linkFlag: false}).then(res => { + this.crudData = res.data.data; + this.tableLoading = false; + }) + }, + selectHandler(selection, row) { + + }, + changeTemp(data) { + this.$refs.queryCrud.clearSelection(); + if (data.value != '') { + let abNames = data.item.abNames.join(',').toLowerCase().split(',') + + } + }, + //鍒涘缓 + addHandler() { + if (func.isEmptyObject(this.nodeRow)) { + this.$message.error('璇烽�夋嫨瑕佹坊鍔犵殑鑺傜偣'); + return; + } + this.title = 'add'; + this.visible = true; + this.$nextTick(() => { + }); + }, + //淇敼 + editHandler() { + if (func.isEmptyObject(this.nodeRow)) { + this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�'); + return; + } + this.form.name = this.templateForm; + this.title = 'edit'; + this.visible = true; + this.$nextTick(() => { + }); + }, + // 鏂板缂栬緫淇濆瓨 + addDialogSavaHandler() { + this.$refs.form.validate((valid) => { + const saveFunction = this.title === 'add' ? saveTemplate : updateTemplate; + if (valid) { + saveFunction(this.form).then(res => { + if (res.data.code === 200) { + this.$message.success(res.data.obj); + this.addDialogClose(); + } + }) + } else { + return false; + } + }); + }, + // 鏂板缂栬緫瀵硅瘽妗嗗彇娑� + addDialogClose() { + this.form = { + name: '' + }; + this.$refs.form.clearValidate(); + this.visible = false; + }, + //鍒犻櫎 + delHandler() { + if (func.isEmptyObject(this.nodeRow)) { + this.$message.error('璇烽�夋嫨鏁版嵁'); + return; + } + this.$confirm('鎮ㄧ‘瀹氳鍒犻櫎鎵�閫夋嫨鐨勬暟鎹悧锛�', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + deleteTemplate({ + name: this.templateForm, + btmName: this.nodeRow.label, + linkFlag: false + }).then(res => { + if (res.data.code === 200) { + this.$message.success(res.data.obj); + } + }) + }).catch(() => { + this.$message({ + type: 'info', + message: '宸插彇娑堝垹闄�' + }); + }); + } + } } </script> diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/index.vue index 308c333..5d18cfc 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/index.vue @@ -3,24 +3,9 @@ <el-aside> <basic-container> - <div ref="TreeBox" style="height: calc(100vh - 144px);!important;"> - <div class="headerCon"> - <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">鍒涘缓 - </el-button> - <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">淇敼 - </el-button> - <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">鍒犻櫎 - </el-button> - <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭 - </el-button> - <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">瀵煎叆 - </el-button> - <el-button class="smallBtn" plain size="small" type="primary" - @click="checkViewClickHandler">鏌ョ湅浣跨敤鑼冨洿 - </el-button> - </div> + <div ref="TreeBox" style="height: calc(100vh - 154px);!important;"> <!-- 宸︿晶鏍� --> - <div style="height: calc(100vh - 280px);"> + <div style="height: calc(100vh - 190px);"> <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> <span slot-scope="{ node, data }" class="el-tree-node__label"> <span style="font-size: 15px"> @@ -36,6 +21,16 @@ <el-main> <basic-container> + <avue-crud ref="crud" + :data="crudData" :option="crudOption" :table-loading="tableLoading" style="margin-top: 10px"> + <template slot="menuLeft" slot-scope="scope"> + <el-button icon="el-icon-plus" size="small" type="primary" @click="addHandler">鍒涘缓</el-button> + <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editHandler">淇敼</el-button> + <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delHandler">鍒犻櫎</el-button> + <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭</el-button> + <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadClickHandler">瀵煎叆</el-button> + </template> + </avue-crud> </basic-container> </el-main> @@ -43,8 +38,189 @@ </template> <script> +import {gridLink} from "@/api/modeling/linkType/api"; +import { gridTemplate, saveTemplate, updateTemplate} from "@/api/queryTemplate/queryDefine"; +import {deleteLinkTemplate} from "@/api/queryTemplate/linkTypeQuery"; +import func from "@/util/func"; +import {dateFormat} from "@/util/date"; +import basicOption from "@/util/basic-option"; + export default { - name: "index" + name: "index", + data() { + return { + treeOption: { + height: 'auto', + defaultExpandedKeys: ['topNode'], + menu: false, + addBtn: false, + props: { + label: 'label', + value: 'oid', + children: 'children' + } + }, + nodeRow: {}, + treeData: [{ + label: '閾炬帴绫诲瀷', + oid: 'topNode', + children: [] + }], + templateForm: '', + templateData: [], + form: { + name: '' + }, + rules: { + name: [ + {required: true, message: '璇疯緭鍏ユ煡璇㈡ā鏉垮悕绉�', trigger: 'blur'} + ] + }, + title: '', + visible: false, + tableLoading: false, + crudData: [], + crudOption: { + ...basicOption, + addBtn: false, + editBtn: false, + delBtn: false, + selection: true, + menu: false, + height: "auto", + calcHeight: -40, + tip: false, + column: [{ + label: '鏌ヨ妯℃澘鍚嶇О', + prop: 'name' + }, { + label: '鍒涘缓浜�', + prop: 'creator' + }, { + label: '鍒涘缓鏃堕棿', + prop: 'createTime', + formatter:function (row, value) { + return dateFormat(new Date(value)) + } + }] + }, + selectionRow: [], + } + }, + created() { + this.getTreeList(); + }, + methods: { + //鏍戣〃鏌ヨ + getTreeList() { + const loading = this.$loading({}); + gridLink().then(res => { + const data = res.data.data.map(item => { + item.label=item.name; + return item; + }); + this.treeData[0].children = data; + loading.close(); + }) + }, + + // 鏍戠偣鍑� + nodeClick(row) { + this.nodeRow = row; + this.tableLoading = true; + this.getTemp(); + }, + getTemp() { + gridTemplate({btmName: this.nodeRow.label, linkFlag: true}).then(res => { + this.crudData = res.data.data; + this.tableLoading = false; + }) + }, + selectHandler(selection, row) { + + }, + changeTemp(data) { + this.$refs.queryCrud.clearSelection(); + if (data.value != '') { + let abNames = data.item.abNames.join(',').toLowerCase().split(',') + + } + }, + //鍒涘缓 + addHandler() { + if (func.isEmptyObject(this.nodeRow)) { + this.$message.error('璇烽�夋嫨瑕佹坊鍔犵殑鑺傜偣'); + return; + } + this.title = 'add'; + this.visible = true; + this.$nextTick(() => { + }); + }, + //淇敼 + editHandler() { + if (func.isEmptyObject(this.nodeRow)) { + this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�'); + return; + } + this.form.name = this.templateForm; + this.title = 'edit'; + this.visible = true; + this.$nextTick(() => { + }); + }, + // 鏂板缂栬緫淇濆瓨 + addDialogSavaHandler() { + this.$refs.form.validate((valid) => { + const saveFunction = this.title === 'add' ? saveTemplate : updateTemplate; + if (valid) { + saveFunction(this.form).then(res => { + if (res.data.code === 200) { + this.$message.success(res.data.obj); + this.addDialogClose(); + } + }) + } else { + return false; + } + }); + }, + // 鏂板缂栬緫瀵硅瘽妗嗗彇娑� + addDialogClose() { + this.form = { + name: '' + }; + this.$refs.form.clearValidate(); + this.visible = false; + }, + //鍒犻櫎 + delHandler() { + if (func.isEmptyObject(this.nodeRow)) { + this.$message.error('璇烽�夋嫨鏁版嵁'); + return; + } + this.$confirm('鎮ㄧ‘瀹氳鍒犻櫎鎵�閫夋嫨鐨勬暟鎹悧锛�', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + deleteLinkTemplate({ + name: this.templateForm, + btmName: this.nodeRow.label, + linkFlag: false + }).then(res => { + if (res.data.code === 200) { + this.$message.success(res.data.obj); + } + }) + }).catch(() => { + this.$message({ + type: 'info', + message: '宸插彇娑堝垹闄�' + }); + }); + } + } } </script> diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue index bb43485..7dd9032 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue @@ -24,6 +24,7 @@ <el-main> <basic-container> 妯℃澘鍒楄〃锛�<avue-select v-model="templateForm" placeholder="璇烽�夋嫨妯℃澘" type="tree" :dic="templateData" @change="changeTemp"></avue-select> + <h3>鏌ヨ灞炴��</h3> <avue-crud ref="queryCrud" :data="attrData" :option="attrOption" :table-loading="tableLoading" style="margin-top: 10px"> <template slot="menuLeft" slot-scope="scope"> @@ -124,7 +125,6 @@ menu:false, height: "auto", calcHeight: -40, - title:'鏌ヨ灞炴��', tip:false, column: [{ label: '瀛楁缂栫爜', diff --git a/Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue new file mode 100644 index 0000000..548091c --- /dev/null +++ b/Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue @@ -0,0 +1,456 @@ +<template> + <el-container> + <el-aside> + <basic-container> + <div style="max-height: calc(100vh - 170px);overflow: auto"> + <avue-tree :key="refresh" ref="tree" :data="treeData" :option="treeOption" @node-click="nodeClick"> + <span slot-scope="{ node, data }" class="el-tree-node__label"> + <span style="font-size: 15px"> + <i class="el-icon-s-promotion"></i> + {{ (node || {}).label }} + </span> + </span> + </avue-tree> + </div> + </basic-container> + </el-aside> + + <el-main> + <basic-container> + <el-form ref="form" :model="form" label-width="85px" style="height: 79vh"> + <span v-if="form.childType !== 0"> + <el-form-item label="妯″潡鍚嶏細"> + <el-input v-model="form.name" placeholder="璇疯緭鍏ユā鍧楀悕"></el-input> + </el-form-item> + <el-form-item label="妯″潡鍒悕锛�"> + <el-input v-model="form.alias" placeholder="妯″潡鍒悕鐢ㄦ潵璁板綍鏃ュ織浣跨敤"></el-input> + </el-form-item> + <el-form-item label="C/S锛�"> + <el-input v-model="form.pathC" :rows="3" placeholder="璇疯緭鍏/S璺緞" type="textarea"></el-input> + </el-form-item> + <el-form-item label="B/S锛�"> + <el-input v-model="form.path" :rows="3" placeholder="璇疯緭鍏/S璺緞" type="textarea"></el-input> + </el-form-item> + <el-form-item label=".NET锛�"> + <el-input v-model="form.resourceDotNet" :rows="3" placeholder="璇疯緭鍏�.NET" type="textarea"></el-input> + </el-form-item> + <el-form-item label="Mobile锛�"> + <el-input v-model="form.resourceMobile" :rows="3" placeholder="璇疯緭鍏obile" type="textarea"></el-input> + </el-form-item> + <el-form-item label="搴忓彿锛�"> + <el-input v-model="form.sort" placeholder="鏁板瓧锛屾弿杩拌妯″潡鍦ㄥ叾鐖舵ā鍧椾笅鐨勬樉绀洪『搴�"></el-input> + </el-form-item> + <el-form-item label="绠�鍥撅細"> + <el-input v-model="form.source"></el-input> + </el-form-item> + <el-form-item label="鎻忚堪锛�"> + <el-input v-model="form.remark" :rows="3" placeholder="璇疯緭鍏ユ弿杩�" type="textarea"></el-input> + </el-form-item> + <el-form-item label="鏄惁鏈夋晥锛�"> + <el-switch + v-model="form.isValid" + active-color="#13ce66" + inactive-color="#ff4949"> + </el-switch> + <el-link :underline="false" style="margin-left: 20px" type="danger">涓嶇敓鏁堬紙涓嶉�夋嫨锛夋椂锛岃妯″潡鍦ㄥ姛鑳芥ā鍧楁巿鏉冮噷涓嶆樉绀�</el-link> + </el-form-item> + </span> + <span v-if="form.childType === 0"> + <el-form-item label="鍚嶇О锛�"> + <el-input v-model="form.name" :disabled="form.childType === 0" placeholder="璇疯緭鍏ュ悕绉�"></el-input> + </el-form-item> + <el-form-item label="鏍囪瘑锛�"> + <el-input v-model="form.code" :disabled="form.childType === 0" placeholder="璇疯緭鍏ユ爣璇�"></el-input> + </el-form-item> + <el-form-item label="鍒悕锛�"> + <el-input v-model="form.alias" placeholder="璇疯緭鍏ュ埆鍚�"></el-input> + </el-form-item> + <el-form-item label="缂栧彿锛�"> + <el-input v-model="form.sort" :disabled="form.childType === 0" placeholder="璇疯緭鍏ョ紪鍙�"></el-input> + </el-form-item> + <el-form-item label="鎻忚堪锛�"> + <el-input v-model="form.remark" :disabled="form.childType === 0" placeholder="璇疯緭鍏ユ弿杩�"></el-input> + </el-form-item> + <el-form-item label="鏄惁鏈夋晥锛�"> + <el-switch + v-model="form.isValid" + active-color="#13ce66" + inactive-color="#ff4949"> + </el-switch> + + </el-form-item> + </span> + </el-form> + <div v-if="form.childType && form.childType !== 0" class="btnBox"> + <el-button v-if="!addStatus" :disabled="mangeShowBtn ? false : !childTypeBtn" icon="el-icon-plus" plain + size="small" + type="primary" @click="addClickHandler">澧炲姞 + </el-button> + <el-button v-if="addStatus" icon="el-icon-check" plain size="small" + type="success" @click="addSaveClickHandler">淇濆瓨 + </el-button> + <el-button v-if="!editStatus" :disabled="mangeShowBtn" icon="el-icon-edit" plain size="small" type="primary" + @click="editClickHandler">淇敼 + </el-button> + <el-button v-if="editStatus" icon="el-icon-check" plain size="small" + type="success" @click="editSaveClickHandler">淇濆瓨 + </el-button> + <el-button :disabled="mangeShowBtn" icon="el-icon-close" plain size="small" type="danger" + @click="delClickHandler">鍒犻櫎 + </el-button> + <el-button :disabled="mangeShowBtn ? true : childTypeBtn" icon="el-icon-circle-plus-outline" plain + size="small" + type="primary" @click="addMethodsClickHandler">澧炲姞鎿嶄綔绫诲瀷 + </el-button> + <el-button v-if="this.form.childType ? mangeShowBtn :true" icon="el-icon-circle-close" plain size="small" + type="danger" + @click="addClickHandler">鍒犻櫎闈炵郴缁熸ā鍧� + </el-button> + <el-button v-if="this.form.childType ? mangeShowBtn :true" icon="el-icon-circle-close" plain size="small" + type="danger" + @click="addClickHandler">鍒犻櫎涓氬姟妯″潡 + </el-button> + <el-button :disabled="!mangeShowBtn" icon="el-icon-upload2" plain size="small" type="primary" + @click="upLoadClickHandler">瀵煎叆 + </el-button> + <el-button :disabled="!mangeShowBtn" icon="el-icon-download" plain size="small" type="primary" + @click="exportClickHandler">瀵煎嚭 + </el-button> + <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="sqlClickExportClick">瀵煎嚭sql + </el-button> + </div> + <div v-if="form.childType === 0" class="btnBox"> + <el-button icon="el-icon-edit" plain size="small" type="primary">淇敼鍒悕 + </el-button> + <el-button icon="el-icon-close" plain size="small" type="danger">鍒犻櫎 + </el-button> + </div> + </basic-container> + </el-main> + <el-dialog + v-dialogDrag + :visible.sync="methodsVisble" + append-to-body="true" + class="avue-dialog" + title="鎿嶄綔鍒嗙被" + width="60%" + > + <avue-crud + ref="methodsCrud" + :data="methodsData" + :option="methodsOption" + :table-loading="methodsLoading" + @row-click="rowMethodsClickHandler" + @selection-change="selectMethodsChange"> + + </avue-crud> + <span slot="footer" class="dialog-footer"> + <el-button @click="methodsVisble = false">鍙� 娑�</el-button> + <el-button type="primary" @click="methodsSaveClickHandler">淇� 瀛�</el-button> + </span> + </el-dialog> + </el-container> +</template> + +<script> +//绠$悊鍔熻兘妯″潡 +import { + getSysModelTreeMenuByPID, + addModel, + updateModel, + delModule, + exportFunctionSql, + addOperationType +} from "@/api/systemModel/mangeModel/api" +import func from "@/util/func"; +import basicOption from "@/util/basic-option"; + +export default { + name: "index", + data() { + return { + lastIndex: null, + methodsList: [], + methodsData: [], + methodsOption: { + ...basicOption, + addBtn: false, + menu: false, + height: 500, + column: [ + { + label: '鎿嶄綔鍒嗙被', + prop: 'name', + sortable: true, + } + ] + }, + methodsLoading: false, + methodsVisble: false, + defalutName: ['name', 'alias', 'pathC', 'path', 'resourceDotNet', 'resourceMobile', 'sort', 'source', 'remark', 'code'], + refresh: Math.random(), + addStatus: false, + editStatus: false, + nodeRow: {}, + form: {}, + treeData: [], + treeOption: { + height: 'auto', + menu: false, + addBtn: false, + defaultExpandAll: false, + props: { + label: 'name', + value: 'id', + children: 'children', + }, + lazy: true, + treeLoad: (node, resolve) => { + const params = { + parentId: node.level === 0 ? "modelManagmentNode" : node.data.id, + modeType: node.level === 0 ? "firstNode" : node.data.modeType, + } + getSysModelTreeMenuByPID(params).then(res => { + resolve(res.data.data.map(item => { + return { + ...item, + id: item.id, + name: item.name, + leaf: !item.hasChildren + } + })) + }) + } + }, + } + }, + created() { + }, + computed: { + /** + * childType + * 涓�-1 鍏ㄩ儴鎸夐挳灞曠ず 绂佺敤淇敼 鍒犻櫎 澧炲姞鎿嶄綔绫诲瀷 + * 涓嶄负-1 闅愯棌 鍒犻櫎闈炵郴缁熸ā鍧� 鍒犻櫎涓氬姟妯″潡 + * 涓�1鏃� 绂佺敤鎿嶄綔绫诲瀷銆佸鍏ャ�佸鍑� + * 涓�2鏃� 绂佺敤澧炲姞 瀵煎叆 瀵煎嚭 + * mangeShowBtn 涓� true 璇存槑鏄《灞傝妭鐐� 鍏ㄩ儴鎸夐挳灞曠ず 绂佺敤淇敼 鍒犻櫎 澧炲姞鎿嶄綔绫诲瀷 + * @returns {Number} + */ + mangeShowBtn() { + return this.form.childType === -1; + }, + childTypeBtn() { + return this.form.childType === 1; + } + }, + methods: { + // 鏍戣鐐瑰嚮 + nodeClick(row) { + console.log(row.childType); + this.form = {...row}; + this.nodeRow = {...row}; + this.addStatus = false; + this.editStatus = false; + }, + + // 鏂板鎸夐挳 + addClickHandler() { + this.resetFormValue(); + this.addStatus = true; + this.editStatus = false; + }, + + // 娓呯┖琛ㄥ崟缁戝畾鍊� + resetFormValue() { + this.defalutName.forEach(key => { + this.form[key] = null; + }) + this.form.isValid = false; + }, + + // 鏂板淇濆瓨鎸夐挳 + addSaveClickHandler() { + if (!this.form.name) { + this.$message.error('妯″潡鍚嶄笉鑳戒负绌�'); + return + } + if (this.form.name.length > 128) { + this.$message.error('妯″潡鍚嶉暱搴﹁秴杩�128锛�'); + return + } + if (this.form.remark && this.form.remark.length > 255) { + this.$message.error('鎻忚堪闀垮害瓒呰繃255锛�'); + return + } + if (this.form.resourceDotNet && this.form.resourceDotNet.length > 255) { + this.$message.error('.NET鏍囪瘑闀垮害涓嶈兘255锛�'); + return + } + if (this.form.pathC && this.form.pathC.length > 255) { + this.$message.error('C/S鏍囪瘑闀垮害涓嶈兘255锛�'); + return + } + if (this.form.resourceMobile && this.form.resourceMobile.length > 255) { + this.$message.error('Mobile鏍囪瘑闀垮害涓嶈兘255锛�'); + return + } + this.form.parentId = this.form.id; + addModel(this.form).then(res => { + if (res.data.code === 200) { + this.$message.success(res.data.msg); + this.addStatus = false; + this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍� + } + }) + }, + + // 淇敼鎸夐挳 + editClickHandler() { + console.log(this.form); + this.editStatus = true; + this.addStatus = false; + }, + + // 淇敼淇濆瓨 + editSaveClickHandler() { + if (!this.form.name) { + this.$message.error('妯″潡鍚嶄笉鑳戒负绌�'); + return + } + if (this.form.name.length > 128) { + this.$message.error('妯″潡鍚嶉暱搴﹁秴杩�128锛�'); + return + } + if (this.form.remark && this.form.remark.length > 255) { + this.$message.error('鎻忚堪闀垮害瓒呰繃255锛�'); + return + } + if (this.form.resourceDotNet && this.form.resourceDotNet.length > 255) { + this.$message.error('.NET鏍囪瘑闀垮害涓嶈兘255锛�'); + return + } + if (this.form.pathC && this.form.pathC.length > 255) { + this.$message.error('C/S鏍囪瘑闀垮害涓嶈兘255锛�'); + return + } + if (this.form.resourceMobile && this.form.resourceMobile.length > 255) { + this.$message.error('Mobile鏍囪瘑闀垮害涓嶈兘255锛�'); + return + } + + updateModel(this.form).then(res => { + if (res.data.code === 200) { + this.$message.success(res.data.msg); + this.editStatus = false; + this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍� + } + }) + }, + + // 鍒犻櫎鎸夐挳 + delClickHandler() { + this.$confirm('鎮ㄧ‘瀹氳鍒犻櫎鎵�閫夋嫨鐨勬暟鎹悧锛�', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + delModule(this.form).then(res => { + console.log(res); + if (res.data.code === 200) { + this.$message.success(res.data.msg); + this.resetFormValue(); + this.addStatus = false; + this.editStatus = false; + this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍� + } + }) + }).catch(() => { + this.$message({ + type: 'info', + message: '宸插彇娑堝垹闄�' + }); + }); + }, + + // 瀵煎嚭sql + sqlClickExportClick() { + exportFunctionSql({isFunction: true}).then(res => { + func.downloadFileByBlobHandler(res); + this.$message.success('瀵煎嚭鎴愬姛'); + }).catch(err => { + this.$message.error(err); + }); + }, + + // 鎿嶄綔鍒嗙被澶氶�� + selectMethodsChange(list) { + this.methodsList = list; + }, + + // 澧炲姞鎿嶄綔绫诲瀷 + addMethodsClickHandler() { + this.methodsLoading = true; + getSysModelTreeMenuByPID({parentId: 'sysOptionNode'}).then(res => { + if (res.data.code === 200) { + this.methodsVisble = true; + const data = res.data.data[0].children; + this.methodsData = data; + this.methodsLoading = false; + } + }) + }, + + // 澧炲姞鎿嶄綔绫诲瀷淇濆瓨 + methodsSaveClickHandler() { + let list = this.methodsList.map(item => { + return { + funcId: this.nodeRow.id, + operId: item.id, + operName: item.name, + operIndentify: item.code, + operAlias: item.alias, + operDesc: item.remark + } + }) + addOperationType(list).then(res => { + console.log(res) + if (res.data.code === 200) { + this.methodsVisble = false; + this.$message.success(res.data.msg); + this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍� + this.resetFormValue(); + this.form.childType = null; + } + }) + }, + + // 鐐瑰嚮琛� + rowMethodsClickHandler(row) { + func.rowClickHandler( + row, + this.$refs.methodsCrud, + this.lastIndex, + (newIndex) => { + this.lastIndex = newIndex; + }, + () => { + this.methodsList = []; + } + ); + }, + } +} +</script> + +<style lang="scss" scoped> +::v-deep { + .el-form-item .el-select { + width: 100%; + } +} + +.btnBox { + display: flex; + justify-content: center; +} +</style> diff --git a/Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue new file mode 100644 index 0000000..8709445 --- /dev/null +++ b/Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue @@ -0,0 +1,456 @@ +<template> + <el-container> + <el-aside> + <basic-container> + <div style="max-height: calc(100vh - 170px);overflow: auto"> + <avue-tree :key="refresh" ref="tree" :data="treeData" :option="treeOption" @node-click="nodeClick"> + <span slot-scope="{ node, data }" class="el-tree-node__label"> + <span style="font-size: 15px"> + <i class="el-icon-s-promotion"></i> + {{ (node || {}).label }} + </span> + </span> + </avue-tree> + </div> + </basic-container> + </el-aside> + + <el-main> + <basic-container> + <el-form ref="form" :model="form" label-width="85px" style="height: 79vh"> + <span v-if="form.childType !== 0"> + <el-form-item label="妯″潡鍚嶏細"> + <el-input v-model="form.name" placeholder="璇疯緭鍏ユā鍧楀悕"></el-input> + </el-form-item> + <el-form-item label="妯″潡鍒悕锛�"> + <el-input v-model="form.alias" placeholder="妯″潡鍒悕鐢ㄦ潵璁板綍鏃ュ織浣跨敤"></el-input> + </el-form-item> + <el-form-item label="C/S锛�"> + <el-input v-model="form.pathC" :rows="3" placeholder="璇疯緭鍏/S璺緞" type="textarea"></el-input> + </el-form-item> + <el-form-item label="B/S锛�"> + <el-input v-model="form.path" :rows="3" placeholder="璇疯緭鍏/S璺緞" type="textarea"></el-input> + </el-form-item> + <el-form-item label=".NET锛�"> + <el-input v-model="form.resourceDotNet" :rows="3" placeholder="璇疯緭鍏�.NET" type="textarea"></el-input> + </el-form-item> + <el-form-item label="Mobile锛�"> + <el-input v-model="form.resourceMobile" :rows="3" placeholder="璇疯緭鍏obile" type="textarea"></el-input> + </el-form-item> + <el-form-item label="搴忓彿锛�"> + <el-input v-model="form.sort" placeholder="鏁板瓧锛屾弿杩拌妯″潡鍦ㄥ叾鐖舵ā鍧椾笅鐨勬樉绀洪『搴�"></el-input> + </el-form-item> + <el-form-item label="绠�鍥撅細"> + <el-input v-model="form.source"></el-input> + </el-form-item> + <el-form-item label="鎻忚堪锛�"> + <el-input v-model="form.remark" :rows="3" placeholder="璇疯緭鍏ユ弿杩�" type="textarea"></el-input> + </el-form-item> + <el-form-item label="鏄惁鏈夋晥锛�"> + <el-switch + v-model="form.isValid" + active-color="#13ce66" + inactive-color="#ff4949"> + </el-switch> + <el-link :underline="false" style="margin-left: 20px" type="danger">涓嶇敓鏁堬紙涓嶉�夋嫨锛夋椂锛岃妯″潡鍦ㄥ姛鑳芥ā鍧楁巿鏉冮噷涓嶆樉绀�</el-link> + </el-form-item> + </span> + <span v-if="form.childType === 0"> + <el-form-item label="鍚嶇О锛�"> + <el-input v-model="form.name" :disabled="form.childType === 0" placeholder="璇疯緭鍏ュ悕绉�"></el-input> + </el-form-item> + <el-form-item label="鏍囪瘑锛�"> + <el-input v-model="form.code" :disabled="form.childType === 0" placeholder="璇疯緭鍏ユ爣璇�"></el-input> + </el-form-item> + <el-form-item label="鍒悕锛�"> + <el-input v-model="form.alias" placeholder="璇疯緭鍏ュ埆鍚�"></el-input> + </el-form-item> + <el-form-item label="缂栧彿锛�"> + <el-input v-model="form.sort" :disabled="form.childType === 0" placeholder="璇疯緭鍏ョ紪鍙�"></el-input> + </el-form-item> + <el-form-item label="鎻忚堪锛�"> + <el-input v-model="form.remark" :disabled="form.childType === 0" placeholder="璇疯緭鍏ユ弿杩�"></el-input> + </el-form-item> + <el-form-item label="鏄惁鏈夋晥锛�"> + <el-switch + v-model="form.isValid" + active-color="#13ce66" + inactive-color="#ff4949"> + </el-switch> + + </el-form-item> + </span> + </el-form> + <div v-if="form.childType && form.childType !== 0" class="btnBox"> + <el-button v-if="!addStatus" :disabled="mangeShowBtn ? false : !childTypeBtn" icon="el-icon-plus" plain + size="small" + type="primary" @click="addClickHandler">澧炲姞 + </el-button> + <el-button v-if="addStatus" icon="el-icon-check" plain size="small" + type="success" @click="addSaveClickHandler">淇濆瓨 + </el-button> + <el-button v-if="!editStatus" :disabled="mangeShowBtn" icon="el-icon-edit" plain size="small" type="primary" + @click="editClickHandler">淇敼 + </el-button> + <el-button v-if="editStatus" icon="el-icon-check" plain size="small" + type="success" @click="editSaveClickHandler">淇濆瓨 + </el-button> + <el-button :disabled="mangeShowBtn" icon="el-icon-close" plain size="small" type="danger" + @click="delClickHandler">鍒犻櫎 + </el-button> + <el-button :disabled="mangeShowBtn ? true : childTypeBtn" icon="el-icon-circle-plus-outline" plain + size="small" + type="primary" @click="addMethodsClickHandler">澧炲姞鎿嶄綔绫诲瀷 + </el-button> + <el-button v-if="this.form.childType ? mangeShowBtn :true" icon="el-icon-circle-close" plain size="small" + type="danger" + @click="addClickHandler">鍒犻櫎闈炵郴缁熸ā鍧� + </el-button> + <el-button v-if="this.form.childType ? mangeShowBtn :true" icon="el-icon-circle-close" plain size="small" + type="danger" + @click="addClickHandler">鍒犻櫎涓氬姟妯″潡 + </el-button> + <el-button :disabled="!mangeShowBtn" icon="el-icon-upload2" plain size="small" type="primary" + @click="upLoadClickHandler">瀵煎叆 + </el-button> + <el-button :disabled="!mangeShowBtn" icon="el-icon-download" plain size="small" type="primary" + @click="exportClickHandler">瀵煎嚭 + </el-button> + <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="sqlClickExportClick">瀵煎嚭sql + </el-button> + </div> + <div v-if="form.childType === 0" class="btnBox"> + <el-button icon="el-icon-edit" plain size="small" type="primary">淇敼鍒悕 + </el-button> + <el-button icon="el-icon-close" plain size="small" type="danger">鍒犻櫎 + </el-button> + </div> + </basic-container> + </el-main> + <el-dialog + v-dialogDrag + :visible.sync="methodsVisble" + append-to-body="true" + class="avue-dialog" + title="鎿嶄綔鍒嗙被" + width="60%" + > + <avue-crud + ref="methodsCrud" + :data="methodsData" + :option="methodsOption" + :table-loading="methodsLoading" + @row-click="rowMethodsClickHandler" + @selection-change="selectMethodsChange"> + + </avue-crud> + <span slot="footer" class="dialog-footer"> + <el-button @click="methodsVisble = false">鍙� 娑�</el-button> + <el-button type="primary" @click="methodsSaveClickHandler">淇� 瀛�</el-button> + </span> + </el-dialog> + </el-container> +</template> + +<script> +//绠$悊鍔熻兘妯″潡 +import { + getSysModelTreeMenuByPID, + addModel, + updateModel, + delModule, + exportFunctionSql, + addOperationType +} from "@/api/systemModel/mangeModel/api" +import func from "@/util/func"; +import basicOption from "@/util/basic-option"; + +export default { + name: "index", + data() { + return { + lastIndex: null, + methodsList: [], + methodsData: [], + methodsOption: { + ...basicOption, + addBtn: false, + menu: false, + height: 500, + column: [ + { + label: '鎿嶄綔鍒嗙被', + prop: 'name', + sortable: true, + } + ] + }, + methodsLoading: false, + methodsVisble: false, + defalutName: ['name', 'alias', 'pathC', 'path', 'resourceDotNet', 'resourceMobile', 'sort', 'source', 'remark', 'code'], + refresh: Math.random(), + addStatus: false, + editStatus: false, + nodeRow: {}, + form: {}, + treeData: [], + treeOption: { + height: 'auto', + menu: false, + addBtn: false, + defaultExpandAll: false, + props: { + label: 'name', + value: 'id', + children: 'children', + }, + lazy: true, + treeLoad: (node, resolve) => { + const params = { + parentId: node.level === 0 ? "systemManagmentNode" : node.data.id, + modeType: node.level === 0 ? "firstNode" : node.data.modeType, + } + getSysModelTreeMenuByPID(params).then(res => { + resolve(res.data.data.map(item => { + return { + ...item, + id: item.id, + name: item.name, + leaf: !item.hasChildren + } + })) + }) + } + }, + } + }, + created() { + }, + computed: { + /** + * childType + * 涓�-1 鍏ㄩ儴鎸夐挳灞曠ず 绂佺敤淇敼 鍒犻櫎 澧炲姞鎿嶄綔绫诲瀷 + * 涓嶄负-1 闅愯棌 鍒犻櫎闈炵郴缁熸ā鍧� 鍒犻櫎涓氬姟妯″潡 + * 涓�1鏃� 绂佺敤鎿嶄綔绫诲瀷銆佸鍏ャ�佸鍑� + * 涓�2鏃� 绂佺敤澧炲姞 瀵煎叆 瀵煎嚭 + * mangeShowBtn 涓� true 璇存槑鏄《灞傝妭鐐� 鍏ㄩ儴鎸夐挳灞曠ず 绂佺敤淇敼 鍒犻櫎 澧炲姞鎿嶄綔绫诲瀷 + * @returns {Number} + */ + mangeShowBtn() { + return this.form.childType === -1; + }, + childTypeBtn() { + return this.form.childType === 1; + } + }, + methods: { + // 鏍戣鐐瑰嚮 + nodeClick(row) { + console.log(row.childType); + this.form = {...row}; + this.nodeRow = {...row}; + this.addStatus = false; + this.editStatus = false; + }, + + // 鏂板鎸夐挳 + addClickHandler() { + this.resetFormValue(); + this.addStatus = true; + this.editStatus = false; + }, + + // 娓呯┖琛ㄥ崟缁戝畾鍊� + resetFormValue() { + this.defalutName.forEach(key => { + this.form[key] = null; + }) + this.form.isValid = false; + }, + + // 鏂板淇濆瓨鎸夐挳 + addSaveClickHandler() { + if (!this.form.name) { + this.$message.error('妯″潡鍚嶄笉鑳戒负绌�'); + return + } + if (this.form.name.length > 128) { + this.$message.error('妯″潡鍚嶉暱搴﹁秴杩�128锛�'); + return + } + if (this.form.remark && this.form.remark.length > 255) { + this.$message.error('鎻忚堪闀垮害瓒呰繃255锛�'); + return + } + if (this.form.resourceDotNet && this.form.resourceDotNet.length > 255) { + this.$message.error('.NET鏍囪瘑闀垮害涓嶈兘255锛�'); + return + } + if (this.form.pathC && this.form.pathC.length > 255) { + this.$message.error('C/S鏍囪瘑闀垮害涓嶈兘255锛�'); + return + } + if (this.form.resourceMobile && this.form.resourceMobile.length > 255) { + this.$message.error('Mobile鏍囪瘑闀垮害涓嶈兘255锛�'); + return + } + this.form.parentId = this.form.id; + addModel(this.form).then(res => { + if (res.data.code === 200) { + this.$message.success(res.data.msg); + this.addStatus = false; + this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍� + } + }) + }, + + // 淇敼鎸夐挳 + editClickHandler() { + console.log(this.form); + this.editStatus = true; + this.addStatus = false; + }, + + // 淇敼淇濆瓨 + editSaveClickHandler() { + if (!this.form.name) { + this.$message.error('妯″潡鍚嶄笉鑳戒负绌�'); + return + } + if (this.form.name.length > 128) { + this.$message.error('妯″潡鍚嶉暱搴﹁秴杩�128锛�'); + return + } + if (this.form.remark && this.form.remark.length > 255) { + this.$message.error('鎻忚堪闀垮害瓒呰繃255锛�'); + return + } + if (this.form.resourceDotNet && this.form.resourceDotNet.length > 255) { + this.$message.error('.NET鏍囪瘑闀垮害涓嶈兘255锛�'); + return + } + if (this.form.pathC && this.form.pathC.length > 255) { + this.$message.error('C/S鏍囪瘑闀垮害涓嶈兘255锛�'); + return + } + if (this.form.resourceMobile && this.form.resourceMobile.length > 255) { + this.$message.error('Mobile鏍囪瘑闀垮害涓嶈兘255锛�'); + return + } + + updateModel(this.form).then(res => { + if (res.data.code === 200) { + this.$message.success(res.data.msg); + this.editStatus = false; + this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍� + } + }) + }, + + // 鍒犻櫎鎸夐挳 + delClickHandler() { + this.$confirm('鎮ㄧ‘瀹氳鍒犻櫎鎵�閫夋嫨鐨勬暟鎹悧锛�', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + delModule(this.form).then(res => { + console.log(res); + if (res.data.code === 200) { + this.$message.success(res.data.msg); + this.resetFormValue(); + this.addStatus = false; + this.editStatus = false; + this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍� + } + }) + }).catch(() => { + this.$message({ + type: 'info', + message: '宸插彇娑堝垹闄�' + }); + }); + }, + + // 瀵煎嚭sql + sqlClickExportClick() { + exportFunctionSql({isFunction: true}).then(res => { + func.downloadFileByBlobHandler(res); + this.$message.success('瀵煎嚭鎴愬姛'); + }).catch(err => { + this.$message.error(err); + }); + }, + + // 鎿嶄綔鍒嗙被澶氶�� + selectMethodsChange(list) { + this.methodsList = list; + }, + + // 澧炲姞鎿嶄綔绫诲瀷 + addMethodsClickHandler() { + this.methodsLoading = true; + getSysModelTreeMenuByPID({parentId: 'sysOptionNode'}).then(res => { + if (res.data.code === 200) { + this.methodsVisble = true; + const data = res.data.data[0].children; + this.methodsData = data; + this.methodsLoading = false; + } + }) + }, + + // 澧炲姞鎿嶄綔绫诲瀷淇濆瓨 + methodsSaveClickHandler() { + let list = this.methodsList.map(item => { + return { + funcId: this.nodeRow.id, + operId: item.id, + operName: item.name, + operIndentify: item.code, + operAlias: item.alias, + operDesc: item.remark + } + }) + addOperationType(list).then(res => { + console.log(res) + if (res.data.code === 200) { + this.methodsVisble = false; + this.$message.success(res.data.msg); + this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍� + this.resetFormValue(); + this.form.childType = null; + } + }) + }, + + // 鐐瑰嚮琛� + rowMethodsClickHandler(row) { + func.rowClickHandler( + row, + this.$refs.methodsCrud, + this.lastIndex, + (newIndex) => { + this.lastIndex = newIndex; + }, + () => { + this.methodsList = []; + } + ); + }, + } +} +</script> + +<style lang="scss" scoped> +::v-deep { + .el-form-item .el-select { + width: 100%; + } +} + +.btnBox { + display: flex; + justify-content: center; +} +</style> diff --git a/Source/plt-web/plt-web-ui/src/views/systemModel/operateType/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModel/operateType/index.vue new file mode 100644 index 0000000..281ec3b --- /dev/null +++ b/Source/plt-web/plt-web-ui/src/views/systemModel/operateType/index.vue @@ -0,0 +1,189 @@ +<template> + <el-container> + <el-aside> + <basic-container> + <div style="max-height: calc(100vh - 170px);overflow: auto"> + <avue-tree ref="tree" :data="treeData" :option="treeOption" @node-click="nodeClick"> + <span slot-scope="{ node, data }" class="el-tree-node__label"> + <span style="font-size: 15px"> + <i class="el-icon-s-promotion"></i> + {{ (node || {}).label }} + </span> + </span> + </avue-tree> + </div> + </basic-container> + </el-aside> + + <el-main> + <basic-container> + <el-form ref="form" :model="form" label-width="85px" style="height: 79vh"> + <el-form-item label="鍚嶇О锛�"> + <el-input v-model="form.name" placeholder="璇疯緭鍏ュ悕绉�"></el-input> + </el-form-item> + <el-form-item label="鏍囪瘑锛�"> + <el-input v-model="form.code" placeholder="璇疯緭鍏ユ爣璇�"></el-input> + </el-form-item> + <el-form-item label="鍒悕锛�"> + <el-input v-model="form.alias" placeholder="璇疯緭鍏ュ埆鍚�"></el-input> + </el-form-item> + <el-form-item label="缂栧彿锛�"> + <el-input v-model="form.sort" placeholder="璇疯緭鍏ョ紪鍙�"></el-input> + </el-form-item> + <el-form-item label="鎻忚堪锛�"> + <el-input v-model="form.remark" placeholder="璇疯緭鍏ユ弿杩�"></el-input> + </el-form-item> + </el-form> + <div class="btnBox"> + <el-button v-if="!addStatus" :disabled="mangeShowBtn ? false : !childTypeBtn" icon="el-icon-plus" plain + size="small" + type="primary" @click="addClickHandler">澧炲姞 + </el-button> + <el-button v-if="addStatus" icon="el-icon-check" plain size="small" + type="success" @click="addSaveClickHandler">淇濆瓨 + </el-button> + <el-button :disabled="mangeShowBtn" icon="el-icon-edit" plain size="small" type="primary" + @click="addClickHandler">淇敼 + </el-button> + <el-button :disabled="mangeShowBtn" icon="el-icon-close" plain size="small" type="danger" + @click="addClickHandler">鍒犻櫎 + </el-button> + <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadClickHandler">瀵煎叆sql + </el-button> + </div> + </basic-container> + </el-main> + </el-container> +</template> + +<script> +//绠$悊鍔熻兘妯″潡 +import {getSysModelTreeMenuByPID, addModel} from "@/api/systemModel/mangeModel/api" + +export default { + name: "index", + data() { + return { + addStatus: false, + nodeRow: {}, + form: {}, + treeData: [], + treeOption: { + height: 'auto', + menu: false, + addBtn: false, + defaultExpandAll: false, + props: { + label: 'name', + value: 'id', + children: 'children', + }, + lazy: true, + treeLoad: (node, resolve) => { + const params = { + parentId: node.level === 0 ? "operateNode" : node.data.id, + modeType: node.level === 0 ? "firstNode" : node.data.modeType, + } + getSysModelTreeMenuByPID(params).then(res => { + resolve(res.data.data.map(item => { + return { + ...item, + id: item.id, + name: item.name, + leaf: !item.hasChildren + } + })) + }) + } + }, + } + }, + created() { + }, + computed: { + /** + * childType + * 涓�-1 鍏ㄩ儴鎸夐挳灞曠ず 绂佺敤淇敼 鍒犻櫎 澧炲姞鎿嶄綔绫诲瀷 + * 涓嶄负-1 闅愯棌 鍒犻櫎闈炵郴缁熸ā鍧� 鍒犻櫎涓氬姟妯″潡 + * 涓�1鏃� 绂佺敤鎿嶄綔绫诲瀷銆佸鍏ャ�佸鍑� + * 涓�2鏃� 绂佺敤澧炲姞 瀵煎叆 瀵煎嚭 + * mangeShowBtn 涓� true 璇存槑鏄《灞傝妭鐐� 鍏ㄩ儴鎸夐挳灞曠ず 绂佺敤淇敼 鍒犻櫎 澧炲姞鎿嶄綔绫诲瀷 + * @returns {Number} + */ + mangeShowBtn() { + return this.form.childType === -1; + }, + childTypeBtn() { + return this.form.childType === 1; + } + }, + methods: { + // 鏍戣鐐瑰嚮 + nodeClick(row) { + console.log(row); + this.form = {...row}; + this.nodeRow = {...row}; + this.addStatus = false; + }, + + // 鏂板鎸夐挳 + addClickHandler() { + for (const key in this.form) { + if (this.form.hasOwnProperty(key)) { + this.form[key] = null; + } + } + this.addStatus = true; + }, + + // 淇濆瓨鎸夐挳 + addSaveClickHandler() { + console.log(this.form) + if (!this.form.name) { + this.$message.error('妯″潡鍚嶄笉鑳戒负绌�'); + return + } + if (this.form.name.length > 128) { + this.$message.error('妯″潡鍚嶉暱搴﹁秴杩�128锛�'); + return + } + if (this.form.remark && this.form.remark.length > 255) { + this.$message.error('鎻忚堪闀垮害瓒呰繃255锛�'); + return + } + if (this.form.resourceDotNet && this.form.resourceDotNet.length > 255) { + this.$message.error('.NET鏍囪瘑闀垮害涓嶈兘255锛�'); + return + } + if (this.form.pathc && this.form.pathc.length > 255) { + this.$message.error('C/S鏍囪瘑闀垮害涓嶈兘255锛�'); + return + } + if (this.form.resourceMobile && this.form.resourceMobile.length > 255) { + this.$message.error('Mobile鏍囪瘑闀垮害涓嶈兘255锛�'); + return + } + console.log(this.nodeRow); + this.form.parentId = this.nodeRow.id; + this.form.modeType = this.nodeRow.modeType; + addModel(this.form).then(res => { + console.log(res) + this.addStatus = false; + }) + } + } +} +</script> + +<style lang="scss" scoped> +::v-deep { + .el-form-item .el-select { + width: 100%; + } +} + +.btnBox { + display: flex; + justify-content: center; +} +</style> diff --git a/Source/plt-web/plt-web-ui/src/views/systemModule/systemConfig/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModel/systemConfig/index.vue similarity index 100% rename from Source/plt-web/plt-web-ui/src/views/systemModule/systemConfig/index.vue rename to Source/plt-web/plt-web-ui/src/views/systemModel/systemConfig/index.vue diff --git a/Source/plt-web/plt-web-ui/src/views/systemModule/systemMonitor/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModel/systemMonitor/index.vue similarity index 100% rename from Source/plt-web/plt-web-ui/src/views/systemModule/systemMonitor/index.vue rename to Source/plt-web/plt-web-ui/src/views/systemModel/systemMonitor/index.vue diff --git a/Source/plt-web/plt-web-ui/src/views/systemModule/businessModel/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModule/businessModel/index.vue deleted file mode 100644 index 54b19c1..0000000 --- a/Source/plt-web/plt-web-ui/src/views/systemModule/businessModel/index.vue +++ /dev/null @@ -1,13 +0,0 @@ -<template> - -</template> - -<script> -export default { - name: "index" -} -</script> - -<style scoped> - -</style> diff --git a/Source/plt-web/plt-web-ui/src/views/systemModule/mangeModel/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModule/mangeModel/index.vue deleted file mode 100644 index 82a0b37..0000000 --- a/Source/plt-web/plt-web-ui/src/views/systemModule/mangeModel/index.vue +++ /dev/null @@ -1,13 +0,0 @@ -<template> - -</template> - -<script> -export default { -name: "index" -} -</script> - -<style scoped> - -</style> diff --git a/Source/plt-web/plt-web-ui/src/views/systemModule/operateType/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModule/operateType/index.vue deleted file mode 100644 index 54b19c1..0000000 --- a/Source/plt-web/plt-web-ui/src/views/systemModule/operateType/index.vue +++ /dev/null @@ -1,13 +0,0 @@ -<template> - -</template> - -<script> -export default { - name: "index" -} -</script> - -<style scoped> - -</style> -- Gitblit v1.9.3