Compare commits
60 Commits
f75bdf6d39
...
3afde75e85
Author | SHA1 | Date | |
---|---|---|---|
3afde75e85 | |||
7154edde7c | |||
f22f6b268a | |||
1c44e56b56 | |||
3f93afede3 | |||
8dd5f27d47 | |||
557452aedc | |||
46cfdc28a6 | |||
e450e280d4 | |||
8248fe942a | |||
a97d222486 | |||
f354d141f5 | |||
8902b2761b | |||
81d52412db | |||
9afe66b769 | |||
c2bc64fd36 | |||
e7e8ec49e2 | |||
05e131ecbe | |||
55cf233192 | |||
5822212970 | |||
e685197674 | |||
a81bdc330c | |||
8315b1f9b2 | |||
007953d129 | |||
f2802722c1 | |||
655af8eec1 | |||
5c0050fe13 | |||
c28c4c7789 | |||
608b1d1b41 | |||
12674fa58f | |||
db0ac8c960 | |||
946cf852d2 | |||
f4769057db | |||
33195638ca | |||
44acd8856a | |||
2d9178e4ae | |||
e142a2a624 | |||
a5fa62c5d0 | |||
8e5dc6e617 | |||
365815735e | |||
5f204c2b92 | |||
9af9fa474e | |||
9d59c95768 | |||
76c8573527 | |||
567c08269d | |||
8e72f3bccd | |||
9b57dbb772 | |||
555611ca96 | |||
1763154fa2 | |||
ddb57c8961 | |||
c6e2d0ba06 | |||
e676e98a6e | |||
72b935c4b3 | |||
e5e499c1ed | |||
02b2fc9ef2 | |||
1787838b3a | |||
6cda734793 | |||
841741523a | |||
387561d108 | |||
4828427d0d |
2
.gitignore
vendored
@ -722,3 +722,5 @@ local.properties
|
|||||||
# Typically, this file would be tracked if it contains build/dependency configurations:
|
# Typically, this file would be tracked if it contains build/dependency configurations:
|
||||||
#.project
|
#.project
|
||||||
|
|
||||||
|
target
|
||||||
|
target/*
|
||||||
|
@ -80,6 +80,12 @@
|
|||||||
<artifactId>javax.annotation-api</artifactId>
|
<artifactId>javax.annotation-api</artifactId>
|
||||||
<version>1.3.2</version>
|
<version>1.3.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
<version>8.0.32</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
<finalName>requirement</finalName>
|
<finalName>requirement</finalName>
|
||||||
|
@ -0,0 +1,83 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-02-04 10:52:31
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @LastEditTime: 2023-02-04 13:38:58
|
||||||
|
* @FilePath: /后端-需求/src/main/java/com/cpic/xim/data/RequirementStatus.java
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package com.cpic.xim.data;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
public final class RequirementStatus
|
||||||
|
{
|
||||||
|
public RequirementStatus()
|
||||||
|
{}
|
||||||
|
|
||||||
|
public int getStatus_code()
|
||||||
|
{
|
||||||
|
return status_code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus_code( int status_code )
|
||||||
|
{
|
||||||
|
this.status_code = status_code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus_name()
|
||||||
|
{
|
||||||
|
return status_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus_name( String status_name )
|
||||||
|
{
|
||||||
|
this.status_name = status_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode()
|
||||||
|
{
|
||||||
|
final int prime = 31;
|
||||||
|
int result = 1;
|
||||||
|
result = prime * result + status_code;
|
||||||
|
result = prime * result + ((status_name == null) ? 0 : status_name.hashCode());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals( Object obj )
|
||||||
|
{
|
||||||
|
if ( this == obj )
|
||||||
|
return true;
|
||||||
|
if ( obj == null )
|
||||||
|
return false;
|
||||||
|
if ( getClass() != obj.getClass() )
|
||||||
|
return false;
|
||||||
|
RequirementStatus other = (RequirementStatus) obj;
|
||||||
|
if ( status_code != other.status_code )
|
||||||
|
return false;
|
||||||
|
if ( status_name == null )
|
||||||
|
{
|
||||||
|
if ( other.status_name != null )
|
||||||
|
return false;
|
||||||
|
} else if ( !status_name.equals( other.status_name ) )
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return "RequirementStatus [status_code=" + status_code + ", status_name=" + status_name
|
||||||
|
+ "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonProperty( "status_code" )
|
||||||
|
private int status_code;
|
||||||
|
|
||||||
|
@JsonProperty( "status_name" )
|
||||||
|
private String status_name;
|
||||||
|
}
|
@ -0,0 +1,99 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-02-04 11:38:32
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @LastEditTime: 2023-02-17 10:52:40
|
||||||
|
* @FilePath: /后端-需求/src/main/java/com/cpic/xim/utils/db/RequirementDbOperation.java
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package com.cpic.xim.utils.db;
|
||||||
|
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.DriverManager;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.sql.Statement;
|
||||||
|
import java.util.Vector;
|
||||||
|
import com.cpic.xim.data.RequirementStatus;
|
||||||
|
|
||||||
|
public final class RequirementDbOperation
|
||||||
|
{
|
||||||
|
private static final String MYSQL_JDBC_CONNECT = "jdbc:mysql://10.39.0.85:3306";
|
||||||
|
private static final String MYSQL_CLASS_DRIVER = "com.mysql.cj.jdbc.Driver";
|
||||||
|
|
||||||
|
/*****************************************************
|
||||||
|
* 查询需求状态。
|
||||||
|
* @return Vector<RequirementStatus> 需求状态的集合
|
||||||
|
*****************************************************/
|
||||||
|
public static Vector<RequirementStatus> queryRequirementStatus()
|
||||||
|
throws ClassNotFoundException, SQLException
|
||||||
|
{
|
||||||
|
Vector<RequirementStatus> vStatus = new Vector<RequirementStatus>();
|
||||||
|
|
||||||
|
Class.forName( MYSQL_CLASS_DRIVER );
|
||||||
|
|
||||||
|
Connection conn = null;
|
||||||
|
Statement statement = null;
|
||||||
|
ResultSet results = null;
|
||||||
|
String querSQL = "select * from requirement.requirement_status";
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
conn = DriverManager.getConnection( MYSQL_JDBC_CONNECT, "cpicxim", "Cpic#1234" );
|
||||||
|
statement = conn.createStatement();
|
||||||
|
results = statement.executeQuery( querSQL );
|
||||||
|
|
||||||
|
while ( results.next())
|
||||||
|
{
|
||||||
|
RequirementStatus status = new RequirementStatus();
|
||||||
|
|
||||||
|
status.setStatus_code( results.getInt( "status_code" ) );
|
||||||
|
status.setStatus_name( results.getString( "status_name" ) );
|
||||||
|
|
||||||
|
vStatus.add( status );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
if ( results != null )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
results.close();
|
||||||
|
}
|
||||||
|
catch ( SQLException except )
|
||||||
|
{
|
||||||
|
except.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( statement != null )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
statement.close();
|
||||||
|
}
|
||||||
|
catch ( SQLException except )
|
||||||
|
{
|
||||||
|
except.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( conn != null )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
conn.close();
|
||||||
|
}
|
||||||
|
catch ( SQLException except )
|
||||||
|
{
|
||||||
|
except.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return vStatus;
|
||||||
|
}
|
||||||
|
}
|
@ -2,27 +2,25 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2023-01-29 13:59:37
|
* @Date: 2023-01-29 13:59:37
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-29 17:10:18
|
* @LastEditTime: 2023-02-04 14:40:07
|
||||||
* @FilePath: \requirement\src\main\java\com\cpic\xim\web\controllers\requirements\RequirementController.java
|
* @FilePath: /后端-需求/src/main/java/com/cpic/xim/web/controllers/requirements/RequirementController.java
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
package com.cpic.xim.web.controllers.requirements;
|
package com.cpic.xim.web.controllers.requirements;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.nio.channels.IllegalSelectorException;
|
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import javax.servlet.ServletContext;
|
import java.util.Vector;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import javax.servlet.http.HttpSession;
|
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import com.cpic.xim.web.controllers.requirements.param.*;
|
import com.cpic.xim.data.RequirementStatus;
|
||||||
import com.cpic.xim.web.controllers.requirements.response.*;
|
import com.cpic.xim.utils.db.RequirementDbOperation;
|
||||||
|
import com.cpic.xim.web.controllers.requirements.param.RequirementQueryParam;
|
||||||
|
import com.cpic.xim.web.controllers.requirements.response.QueryRequirementStatusResult;
|
||||||
|
import com.cpic.xim.web.controllers.requirements.response.RequirementQueryResult;
|
||||||
|
|
||||||
@SuppressWarnings( "unused" )
|
@SuppressWarnings( "unused" )
|
||||||
@Controller
|
@Controller
|
||||||
@ -39,4 +37,30 @@ public class RequirementController
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping( "/query_requirement_status.do" )
|
||||||
|
@ResponseBody
|
||||||
|
public QueryRequirementStatusResult queryRequirementStatus()
|
||||||
|
{
|
||||||
|
QueryRequirementStatusResult result = new QueryRequirementStatusResult();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Vector<RequirementStatus> status = RequirementDbOperation.queryRequirementStatus();
|
||||||
|
|
||||||
|
result.setSuccess( true );
|
||||||
|
result.setRequirementStatus( status );
|
||||||
|
}
|
||||||
|
catch ( ClassNotFoundException exception )
|
||||||
|
{
|
||||||
|
result.setSuccess( false );
|
||||||
|
result.setMessage( exception.getMessage() );
|
||||||
|
}
|
||||||
|
catch ( SQLException exception )
|
||||||
|
{
|
||||||
|
result.setSuccess( false );
|
||||||
|
result.setMessage( exception.getMessage() );
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,73 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-02-04 13:24:14
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @LastEditTime: 2023-02-04 13:38:03
|
||||||
|
* @FilePath: /后端-需求/src/main/java/com/cpic/xim/web/controllers/requirements/response/QueryRequirementStatusResult.java
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package com.cpic.xim.web.controllers.requirements.response;
|
||||||
|
|
||||||
|
import com.cpic.xim.data.RequirementStatus;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import java.util.Vector;
|
||||||
|
|
||||||
|
public class QueryRequirementStatusResult
|
||||||
|
{
|
||||||
|
public QueryRequirementStatusResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
public String getMessage()
|
||||||
|
{
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessage( String message )
|
||||||
|
{
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSuccess()
|
||||||
|
{
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSuccess( boolean success )
|
||||||
|
{
|
||||||
|
this.success = success;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getReturnCode()
|
||||||
|
{
|
||||||
|
return returnCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReturnCode( int returnCode )
|
||||||
|
{
|
||||||
|
this.returnCode = returnCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vector<RequirementStatus> getRequirementStatus()
|
||||||
|
{
|
||||||
|
return requirementStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRequirementStatus( Vector<RequirementStatus> requirement_status )
|
||||||
|
{
|
||||||
|
this.requirementStatus = requirement_status;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonProperty( "message" )
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
@JsonProperty( "success" )
|
||||||
|
private boolean success;
|
||||||
|
|
||||||
|
@JsonProperty( "return_code" )
|
||||||
|
private int returnCode;
|
||||||
|
|
||||||
|
@JsonProperty( "requirement_status" )
|
||||||
|
private Vector<RequirementStatus> requirementStatus;
|
||||||
|
}
|
@ -2,8 +2,8 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2023-01-29 10:39:41
|
* @Date: 2023-01-29 10:39:41
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-29 10:39:44
|
* @LastEditTime: 2023-02-04 17:12:05
|
||||||
* @FilePath: \requirement\src\main\java\com\cpic\xim\web\filters\cros\CrosFilter.java
|
* @FilePath: /后端-需求/src/main/java/com/cpic/xim/web/filters/cros/CrosFilter.java
|
||||||
* @Description: 过滤器,用于对CROS访问进行响应。允许任何来源的访问。
|
* @Description: 过滤器,用于对CROS访问进行响应。允许任何来源的访问。
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
@ -33,7 +33,7 @@ public class CrosFilter implements Filter
|
|||||||
response.setHeader( "Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE" );
|
response.setHeader( "Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE" );
|
||||||
response.setHeader( "Access-Control-Max-Age", "0" );
|
response.setHeader( "Access-Control-Max-Age", "0" );
|
||||||
response.setHeader( "Access-Control-Allow-Headers",
|
response.setHeader( "Access-Control-Allow-Headers",
|
||||||
"Origin, No-Cache, X-Requested-With, If-Modified-Since, Pragma, Last-Modified, Cache-Control, Expires, Content-Type, X-E4M-With,userId,token" );
|
"Origin, No-Cache, X-Requested-With, If-Modified-Since, Pragma, Last-Modified, Cache-Control, Expires, Content-Type, X-E4M-With,userId,token,username" );
|
||||||
response.setHeader( "Access-Control-Allow-Credentials", "true" );
|
response.setHeader( "Access-Control-Allow-Credentials", "true" );
|
||||||
response.setHeader( "XDomainRequestAllowed", "1" );
|
response.setHeader( "XDomainRequestAllowed", "1" );
|
||||||
response.setHeader( "XDomainRequestAllowed", "1" );
|
response.setHeader( "XDomainRequestAllowed", "1" );
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2023-01-29 10:50:49
|
* @Date: 2023-01-29 10:50:49
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-29 10:55:27
|
* @LastEditTime: 2023-02-04 18:05:18
|
||||||
* @FilePath: \requirement\src\main\java\com\cpic\xim\web\filters\token\TokenFilter.java
|
* @FilePath: /后端-需求/src/main/java/com/cpic/xim/web/filters/token/TokenFilter.java
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
@ -11,6 +11,7 @@
|
|||||||
package com.cpic.xim.web.filters.token;
|
package com.cpic.xim.web.filters.token;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.Enumeration;
|
||||||
import javax.servlet.Filter;
|
import javax.servlet.Filter;
|
||||||
import javax.servlet.FilterChain;
|
import javax.servlet.FilterChain;
|
||||||
import javax.servlet.ServletException;
|
import javax.servlet.ServletException;
|
||||||
@ -22,6 +23,8 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
@SuppressWarnings( "unused" )
|
@SuppressWarnings( "unused" )
|
||||||
public class TokenFilter implements Filter
|
public class TokenFilter implements Filter
|
||||||
{
|
{
|
||||||
|
private static final String FILTE_METHODS = "POST,GET";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doFilter( ServletRequest req, ServletResponse resp, FilterChain chain )
|
public void doFilter( ServletRequest req, ServletResponse resp, FilterChain chain )
|
||||||
throws ServletException, IOException
|
throws ServletException, IOException
|
||||||
@ -29,8 +32,14 @@ public class TokenFilter implements Filter
|
|||||||
HttpServletRequest request = (HttpServletRequest) req;
|
HttpServletRequest request = (HttpServletRequest) req;
|
||||||
HttpServletResponse response = (HttpServletResponse) resp;
|
HttpServletResponse response = (HttpServletResponse) resp;
|
||||||
|
|
||||||
// 获取请求中的token字符串
|
String method = request.getMethod().toUpperCase();
|
||||||
String token = request.getHeader( "Token" );
|
|
||||||
|
// 只处理POST和GET
|
||||||
|
if ( FILTE_METHODS.indexOf( method ) != -1 )
|
||||||
|
{
|
||||||
|
// 检查token
|
||||||
|
String token = request.getHeader( "token" );
|
||||||
|
}
|
||||||
|
|
||||||
chain.doFilter( request, response );
|
chain.doFilter( request, response );
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
com\cpic\xim\web\controllers\requirements\response\RequirementQueryResult.class
|
com\cpic\xim\data\RequirementStatus.class
|
||||||
com\cpic\xim\web\filters\token\TokenFilter.class
|
|
||||||
com\cpic\xim\web\controllers\requirements\param\RequirementQueryParam.class
|
com\cpic\xim\web\controllers\requirements\param\RequirementQueryParam.class
|
||||||
com\cpic\xim\web\filters\cros\CrosFilter.class
|
com\cpic\xim\web\filters\cros\CrosFilter.class
|
||||||
|
com\cpic\xim\utils\db\RequirementDbOperation.class
|
||||||
|
com\cpic\xim\web\controllers\requirements\response\QueryRequirementStatusResult.class
|
||||||
|
com\cpic\xim\web\controllers\requirements\response\RequirementQueryResult.class
|
||||||
|
com\cpic\xim\web\filters\token\TokenFilter.class
|
||||||
com\cpic\xim\web\controllers\requirements\RequirementController.class
|
com\cpic\xim\web\controllers\requirements\RequirementController.class
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
D:\develop\cpicxim\it-console\code\java\requirement\src\main\java\com\cpic\xim\web\controllers\requirements\RequirementController.java
|
D:\develop\cpicxim\it-console\code\java\后端-需求\src\main\java\com\cpic\xim\data\RequirementStatus.java
|
||||||
D:\develop\cpicxim\it-console\code\java\requirement\src\main\java\com\cpic\xim\web\filters\cros\CrosFilter.java
|
D:\develop\cpicxim\it-console\code\java\后端-需求\src\main\java\com\cpic\xim\web\controllers\requirements\response\RequirementQueryResult.java
|
||||||
D:\develop\cpicxim\it-console\code\java\requirement\src\main\java\com\cpic\xim\web\controllers\requirements\param\RequirementQueryParam.java
|
D:\develop\cpicxim\it-console\code\java\后端-需求\src\main\java\com\cpic\xim\web\controllers\requirements\param\RequirementQueryParam.java
|
||||||
D:\develop\cpicxim\it-console\code\java\requirement\src\main\java\com\cpic\xim\web\controllers\requirements\response\RequirementQueryResult.java
|
D:\develop\cpicxim\it-console\code\java\后端-需求\src\main\java\com\cpic\xim\web\controllers\requirements\response\QueryRequirementStatusResult.java
|
||||||
D:\develop\cpicxim\it-console\code\java\requirement\src\main\java\com\cpic\xim\web\filters\token\TokenFilter.java
|
D:\develop\cpicxim\it-console\code\java\后端-需求\src\main\java\com\cpic\xim\web\filters\cros\CrosFilter.java
|
||||||
|
D:\develop\cpicxim\it-console\code\java\后端-需求\src\main\java\com\cpic\xim\web\filters\token\TokenFilter.java
|
||||||
|
D:\develop\cpicxim\it-console\code\java\后端-需求\src\main\java\com\cpic\xim\web\controllers\requirements\RequirementController.java
|
||||||
|
D:\develop\cpicxim\it-console\code\java\后端-需求\src\main\java\com\cpic\xim\utils\db\RequirementDbOperation.java
|
||||||
|
4
code/ts/pako/.eslintignore
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
node_modules
|
||||||
|
dist
|
||||||
|
target
|
||||||
|
tsconfig.json
|
60
code/ts/pako/.eslintrc.js
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-02-09 15:26:18
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @LastEditTime: 2023-02-10 10:25:42
|
||||||
|
* @FilePath: /后端辅助工具/.eslintrc.js
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
env: {
|
||||||
|
browser: true,
|
||||||
|
es2021: true,
|
||||||
|
node: true,
|
||||||
|
},
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: "latest",
|
||||||
|
sourceType: "module",
|
||||||
|
// project: ["./tsconfig.json",],
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
"@typescript-eslint",
|
||||||
|
],
|
||||||
|
extends: [
|
||||||
|
// "standard-with-typescript",
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/eslint-recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
"no-console": "warn",
|
||||||
|
"quote-props": ["warn", "as-needed",],
|
||||||
|
quotes: ["warn", "double", { allowTemplateLiterals: true, },],
|
||||||
|
indent: ["warn", 4,],
|
||||||
|
"no-unused-vars": "off",
|
||||||
|
semi: ["error", "always",], // 控制行尾部分号
|
||||||
|
"comma-dangle": ["error", {
|
||||||
|
arrays: "always",
|
||||||
|
objects: "always",
|
||||||
|
imports: "never",
|
||||||
|
exports: "never",
|
||||||
|
functions: "never",
|
||||||
|
},], // 数组和对象键值对最后一个逗号
|
||||||
|
"comma-style": ["error", "last",], // 逗号在行位
|
||||||
|
"array-bracket-spacing": ["error", "never",],
|
||||||
|
"no-undef-init": "error",
|
||||||
|
"no-invalid-this": "error",
|
||||||
|
"no-use-before-define": "error",
|
||||||
|
"no-shadow-restricted-names": "error", // 禁止对一些关键字或者保留字进行赋值操作,比如NaN、Infinity、undefined、eval、arguments等
|
||||||
|
// "comma-spacing": ["error", { "before": false, "after": true, },],
|
||||||
|
"brace-style": ["error", "allman", { allowSingleLine: true, },],
|
||||||
|
"prefer-const": "warn",
|
||||||
|
"@typescript-eslint/no-extra-semi": "off",
|
||||||
|
"@typescript-eslint/no-inferrable-types": "off",
|
||||||
|
},
|
||||||
|
};
|
21
code/ts/pako/package-lock.json
generated
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"name": "pako",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {
|
||||||
|
"": {
|
||||||
|
"name": "pako",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"pako": "^2.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/pako": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/pako/-/pako-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
19
code/ts/pako/package.json
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"name": "pako",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "node index.js"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"pako"
|
||||||
|
],
|
||||||
|
"type": "module",
|
||||||
|
"author": "Kane",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"pako": "^2.1.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
22
code/ts/pako/src/index.js
Normal file
37
code/ts/pako/src/utils/StringConverter.js
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-02-13 14:54:46
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @LastEditTime: 2023-02-13 14:55:19
|
||||||
|
* @FilePath: /pako/src/utils/StringConverter.js
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
function Uint8ArrayToString(fileData)
|
||||||
|
{
|
||||||
|
var dataString = "";
|
||||||
|
for (var i = 0; i < fileData.length; i++)
|
||||||
|
{
|
||||||
|
dataString += String.fromCharCode(fileData[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return dataString;
|
||||||
|
}
|
||||||
|
|
||||||
|
function stringToUint8Array(str)
|
||||||
|
{
|
||||||
|
var arr = [];
|
||||||
|
|
||||||
|
for (var i = 0, j = str.length; i < j; ++i)
|
||||||
|
{
|
||||||
|
arr.push(str.charCodeAt(i));
|
||||||
|
}
|
||||||
|
|
||||||
|
var tmpUint8Array = new Uint8Array(arr);
|
||||||
|
|
||||||
|
return tmpUint8Array;
|
||||||
|
}
|
||||||
|
|
||||||
|
export { Uint8ArrayToString, stringToUint8Array };
|
4
code/ts/后端辅助工具/.eslintignore
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
node_modules
|
||||||
|
dist
|
||||||
|
target
|
||||||
|
tsconfig.json
|
61
code/ts/后端辅助工具/.eslintrc.js
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-02-09 15:26:18
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @LastEditTime: 2023-02-18 23:36:07
|
||||||
|
* @FilePath: /后端辅助工具/.eslintrc.js
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
env: {
|
||||||
|
browser: true,
|
||||||
|
es2021: true,
|
||||||
|
node: true,
|
||||||
|
},
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: "latest",
|
||||||
|
sourceType: "module",
|
||||||
|
// project: ["./tsconfig.json",],
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
"@typescript-eslint",
|
||||||
|
],
|
||||||
|
extends: [
|
||||||
|
// "standard-with-typescript",
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/eslint-recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
"no-console": "off",
|
||||||
|
"quote-props": ["warn", "as-needed",],
|
||||||
|
quotes: ["warn", "double", { allowTemplateLiterals: true, },],
|
||||||
|
indent: ["warn", 4,],
|
||||||
|
"no-unused-vars": "off",
|
||||||
|
semi: ["error", "always",], // 控制行尾部分号
|
||||||
|
"comma-dangle": ["error", {
|
||||||
|
arrays: "always",
|
||||||
|
objects: "always",
|
||||||
|
imports: "never",
|
||||||
|
exports: "never",
|
||||||
|
functions: "never",
|
||||||
|
},], // 数组和对象键值对最后一个逗号
|
||||||
|
"comma-style": ["error", "last",], // 逗号在行位
|
||||||
|
"array-bracket-spacing": ["error", "never",],
|
||||||
|
"no-undef-init": "error",
|
||||||
|
"no-invalid-this": "error",
|
||||||
|
"no-use-before-define": "error",
|
||||||
|
"no-shadow-restricted-names": "error", // 禁止对一些关键字或者保留字进行赋值操作,比如NaN、Infinity、undefined、eval、arguments等
|
||||||
|
// "comma-spacing": ["error", { "before": false, "after": true, },],
|
||||||
|
"brace-style": ["error", "allman", { allowSingleLine: true, },],
|
||||||
|
"prefer-const": "warn",
|
||||||
|
"@typescript-eslint/no-extra-semi": "off",
|
||||||
|
"@typescript-eslint/no-inferrable-types": "off",
|
||||||
|
"@typescript-eslint/no-unused-vars": "off",
|
||||||
|
},
|
||||||
|
};
|
20
code/ts/后端辅助工具/.vscode/launch.json
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
// 使用 IntelliSense 了解相关属性。
|
||||||
|
// 悬停以查看现有属性的描述。
|
||||||
|
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"type": "pwa-node",
|
||||||
|
"request": "launch",
|
||||||
|
"name": "Launch Program",
|
||||||
|
"skipFiles": [
|
||||||
|
"<node_internals>/**"
|
||||||
|
],
|
||||||
|
"program": "${file}",
|
||||||
|
"outFiles": [
|
||||||
|
"${workspaceFolder}/**/*.js"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
3
code/ts/后端辅助工具/.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"typescript.tsdk": "node_modules/typescript/lib"
|
||||||
|
}
|
14
code/ts/后端辅助工具/.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"type": "typescript",
|
||||||
|
"tsconfig": "tsconfig.json",
|
||||||
|
"problemMatcher": [
|
||||||
|
"$tsc"
|
||||||
|
],
|
||||||
|
"group": "build",
|
||||||
|
"label": "tsc: build - tsconfig.json"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
1559
code/ts/后端辅助工具/package-lock.json
generated
Normal file
11
code/ts/后端辅助工具/package.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"devDependencies": {
|
||||||
|
"@typescript-eslint/eslint-plugin": "^5.51.0",
|
||||||
|
"@typescript-eslint/parser": "^5.51.0",
|
||||||
|
"eslint": "^8.33.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"axios": "^1.3.2",
|
||||||
|
"pako": "^2.1.0"
|
||||||
|
}
|
||||||
|
}
|
41
code/ts/后端辅助工具/src/DataType/Class.ts
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-02-17 22:35:49
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @LastEditTime: 2023-02-19 21:38:18
|
||||||
|
* @FilePath: /后端辅助工具/src/DataType/Class.ts
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
class CpicximStuff
|
||||||
|
{
|
||||||
|
constructor(
|
||||||
|
private _stuffName: string,
|
||||||
|
private _stuffCode: string,
|
||||||
|
private _p13UID: string
|
||||||
|
) { }
|
||||||
|
|
||||||
|
get stuffName(): string
|
||||||
|
{
|
||||||
|
return this._stuffName;
|
||||||
|
}
|
||||||
|
|
||||||
|
set stuffName(stuffName: string)
|
||||||
|
{
|
||||||
|
this._stuffName = stuffName;
|
||||||
|
}
|
||||||
|
|
||||||
|
get stuffCode(): string
|
||||||
|
{
|
||||||
|
return this._stuffCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
set stuffCode(code: string)
|
||||||
|
{
|
||||||
|
this._stuffCode = code;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export { CpicximStuff };
|
73
code/ts/后端辅助工具/src/DataType/DataType.ts
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-02-10 15:08:53
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @LastEditTime: 2023-02-13 10:04:33
|
||||||
|
* @FilePath: /后端辅助工具/src/DataType/DataType.ts
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
/*eslint no-unused-vars: "off" */
|
||||||
|
/*eslint @typescript-eslint/no-unused-vars: "off" */
|
||||||
|
|
||||||
|
|
||||||
|
//Tuple
|
||||||
|
function dataTypes()
|
||||||
|
{
|
||||||
|
const tu: readonly [number, number, number] = [1, 1, 2,];
|
||||||
|
|
||||||
|
const toArray: [number, number, string] = [1, 2, "3",];
|
||||||
|
const v1: (number | string)[] = toArray;
|
||||||
|
|
||||||
|
const s1 = "string";
|
||||||
|
|
||||||
|
console.log(typeof s1);
|
||||||
|
|
||||||
|
|
||||||
|
let point: {
|
||||||
|
x: number,
|
||||||
|
y: number,
|
||||||
|
};
|
||||||
|
point = { x: 0, y: 0, };
|
||||||
|
|
||||||
|
function addOne(x: number, y: number = 1): number
|
||||||
|
{
|
||||||
|
return x + y;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(addOne(1));
|
||||||
|
|
||||||
|
function allParams(x: number, y: number): void
|
||||||
|
{
|
||||||
|
const z = x + y;
|
||||||
|
}
|
||||||
|
|
||||||
|
//剩余参数,数组形式
|
||||||
|
function overplusArgusWithArray(x: number, ...argus: number[]): number
|
||||||
|
{
|
||||||
|
return argus.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
function overplusArugsWithTuple(x: number, ...argus: [number, number, string]): number
|
||||||
|
{
|
||||||
|
|
||||||
|
console.log(`元组形式的参数表${argus},剩余参数的数量${argus.length}。`);
|
||||||
|
console.log(argus[2]);
|
||||||
|
|
||||||
|
return argus.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
overplusArugsWithTuple(1, 2, 3, "test");
|
||||||
|
|
||||||
|
console.log(overplusArgusWithArray(1, 2, 3, 4, 5, 6, 7, 8, 9, 10));
|
||||||
|
|
||||||
|
//测试null
|
||||||
|
const nulltest: null = null;
|
||||||
|
let var_2: { x: string; } = { x: "test", };
|
||||||
|
|
||||||
|
// var_2 = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export default dataTypes;
|
30
code/ts/后端辅助工具/src/DataType/Function.ts
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-02-13 23:08:34
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @LastEditTime: 2023-02-16 22:43:22
|
||||||
|
* @FilePath: /后端辅助工具/src/DataType/Function.ts
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
function f(x: number, y: number): number
|
||||||
|
{
|
||||||
|
return x + y;
|
||||||
|
}
|
||||||
|
|
||||||
|
f.version = "1.0.0";
|
||||||
|
|
||||||
|
const func: {
|
||||||
|
(x: number, y: number): void,
|
||||||
|
version: string,
|
||||||
|
} = f;
|
||||||
|
|
||||||
|
function func_this_void(this: void, arg1: number): number
|
||||||
|
{
|
||||||
|
return arg1;
|
||||||
|
}
|
||||||
|
|
||||||
|
let constructor: {
|
||||||
|
new(x: string, y: string): object;
|
||||||
|
};
|
24
code/ts/后端辅助工具/src/DataType/Interface.ts
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-02-14 22:24:26
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @LastEditTime: 2023-02-21 23:31:40
|
||||||
|
* @FilePath: /后端辅助工具/src/DataType/Interface.ts
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
interface document
|
||||||
|
{
|
||||||
|
getElementById(id: string): HTMLElement | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface CpicStuff
|
||||||
|
{
|
||||||
|
stuffName: string;
|
||||||
|
stuffCode: string;
|
||||||
|
p13uid: string;
|
||||||
|
password: string;
|
||||||
|
|
||||||
|
}
|
23
code/ts/后端辅助工具/src/DataType/Template.ts
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-02-21 17:39:01
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @LastEditTime: 2023-02-22 14:08:48
|
||||||
|
* @FilePath: /后端辅助工具/src/DataType/Template.ts
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
interface Point
|
||||||
|
{
|
||||||
|
x: number;
|
||||||
|
y: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
function radius<TPoint>(x: TPoint): TPoint
|
||||||
|
{
|
||||||
|
const result: TPoint = x;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
11
code/ts/后端辅助工具/src/axios/AxiosTest.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-02-13 15:46:17
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @LastEditTime: 2023-02-13 23:34:55
|
||||||
|
* @FilePath: /后端辅助工具/src/axios/AxiosTest.ts
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
import axios from "axios";
|
19
code/ts/后端辅助工具/src/axios/request.ts
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-02-13 15:53:45
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @LastEditTime: 2023-02-13 22:41:50
|
||||||
|
* @FilePath: /后端辅助工具/src/axios/request.ts
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
import axios, {AxiosInstance, AxiosRequestConfig, AxiosResponse} from 'axios';
|
||||||
|
|
||||||
|
// const service = axios.create({
|
||||||
|
// baseURL: "",
|
||||||
|
// timeout: 10000,
|
||||||
|
// timeoutErrorMessage: "请求超时!",
|
||||||
|
// });
|
||||||
|
|
||||||
|
|
27
code/ts/后端辅助工具/src/gzip/PakoTest.ts
Normal file
21
code/ts/后端辅助工具/src/main.ts
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-02-09 22:14:30
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @LastEditTime: 2023-02-21 23:32:00
|
||||||
|
* @FilePath: /后端辅助工具/src/main.ts
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import dataTypes from "./DataType/DataType";
|
||||||
|
import { pakoTest } from "./gzip/PakoTest";
|
||||||
|
|
||||||
|
const greetings = "hello, this is kane's typescript!";
|
||||||
|
|
||||||
|
console.log(greetings);
|
||||||
|
console.log("all");
|
||||||
|
|
||||||
|
//dataTypes();
|
||||||
|
pakoTest();
|
38
code/ts/后端辅助工具/src/utils/StringConvert.ts
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-02-13 14:54:46
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @LastEditTime: 2023-02-13 14:55:19
|
||||||
|
* @FilePath: /pako/src/utils/StringConverter.js
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
function Uint8ArrayToString(fileData: Uint8Array): string
|
||||||
|
{
|
||||||
|
let dataString: string = "";
|
||||||
|
|
||||||
|
for (let i = 0; i < fileData.length; i++)
|
||||||
|
{
|
||||||
|
dataString += String.fromCharCode(fileData[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return dataString;
|
||||||
|
}
|
||||||
|
|
||||||
|
function stringToUint8Array(str: string): Uint8Array
|
||||||
|
{
|
||||||
|
const arr: number[] = [];
|
||||||
|
|
||||||
|
for (let i = 0, j = str.length; i < j; ++i)
|
||||||
|
{
|
||||||
|
arr.push(str.charCodeAt(i));
|
||||||
|
}
|
||||||
|
|
||||||
|
const tmpUint8Array: Uint8Array = new Uint8Array(arr);
|
||||||
|
|
||||||
|
return tmpUint8Array;
|
||||||
|
}
|
||||||
|
|
||||||
|
export { Uint8ArrayToString, stringToUint8Array };
|
40
code/ts/后端辅助工具/tsconfig.json
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-02-09 15:24:20
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @LastEditTime: 2023-02-17 23:15:11
|
||||||
|
* @FilePath: /后端辅助工具/tsconfig.json
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "./target",
|
||||||
|
"strict": false,
|
||||||
|
"strictNullChecks": true,
|
||||||
|
"strictPropertyInitialization": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"allowJs": true,
|
||||||
|
"checkJs": true,
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"module": "CommonJS",
|
||||||
|
"target": "ES2015"
|
||||||
|
},
|
||||||
|
// "files": [
|
||||||
|
// "./src/main.ts",
|
||||||
|
// ],
|
||||||
|
"include": [
|
||||||
|
"./src/**/*",
|
||||||
|
// "./src/*.ts",
|
||||||
|
// "src/main.ts",
|
||||||
|
// ".eslintrc.js",
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"./target",
|
||||||
|
"node_modules",
|
||||||
|
"bower_componets",
|
||||||
|
"jspm_packages",
|
||||||
|
],
|
||||||
|
// "outFile": "./target/mian.js",
|
||||||
|
}
|
@ -1,2 +0,0 @@
|
|||||||
VUE_APP_API_URL_LOGIN = "http://222.76.244.118:11001/admin-system/account/p13_account_check"
|
|
||||||
VUR_APPP_API_URL_UPLOAD_FILE= "http://222.76.244.118:11001/admin-system/file/file-upload.do"
|
|
@ -1,27 +0,0 @@
|
|||||||
/*
|
|
||||||
* @Author: Kane
|
|
||||||
* @Date: 2022-12-14 15:12:46
|
|
||||||
* @LastEditors: Kane
|
|
||||||
* @LastEditTime: 2022-12-14 15:20:20
|
|
||||||
* @FilePath: \admin_system\.eslintrc.js
|
|
||||||
* @Description:
|
|
||||||
*
|
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
|
||||||
*/
|
|
||||||
module.exports = {
|
|
||||||
root: true,
|
|
||||||
env: {
|
|
||||||
node: true
|
|
||||||
},
|
|
||||||
'extends': [
|
|
||||||
'plugin:vue/vue3-essential',
|
|
||||||
'eslint:recommended'
|
|
||||||
],
|
|
||||||
parserOptions: {
|
|
||||||
parser: '@babel/eslint-parser'
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
|
||||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,36 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "CPIC-IT-Console",
|
|
||||||
"version": "0.1.0",
|
|
||||||
"private": true,
|
|
||||||
"scripts": {
|
|
||||||
"serve": "vue-cli-service serve",
|
|
||||||
"build": "vue-cli-service build",
|
|
||||||
"lint": "vue-cli-service lint"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@element-plus/icons-vue": "^2.0.10",
|
|
||||||
"axios": "^1.2.1",
|
|
||||||
"core-js": "^3.8.3",
|
|
||||||
"element-plus": "^2.2.26",
|
|
||||||
"sass": "^1.56.2",
|
|
||||||
"sass-loader": "^13.2.0",
|
|
||||||
"scss": "^0.2.4",
|
|
||||||
"scss-loader": "^0.0.1",
|
|
||||||
"vue": "^3.2.13",
|
|
||||||
"vue-router": "^4.0.3",
|
|
||||||
"vuex": "^4.0.0"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@babel/core": "^7.12.16",
|
|
||||||
"@babel/eslint-parser": "^7.12.16",
|
|
||||||
"@vue/cli-plugin-babel": "~5.0.0",
|
|
||||||
"@vue/cli-plugin-eslint": "~5.0.0",
|
|
||||||
"@vue/cli-plugin-router": "~5.0.0",
|
|
||||||
"@vue/cli-plugin-vuex": "~5.0.0",
|
|
||||||
"@vue/cli-service": "~5.0.0",
|
|
||||||
"eslint": "^7.32.0",
|
|
||||||
"eslint-plugin-vue": "^8.0.3",
|
|
||||||
"svg-sprite-loader": "^2.1.0",
|
|
||||||
"vue-cli-plugin-element-plus": "~0.0.13"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,41 +0,0 @@
|
|||||||
<!--
|
|
||||||
* @Author: Kane
|
|
||||||
* @Date: 2023-01-25 23:16:29
|
|
||||||
* @LastEditors: Kane
|
|
||||||
* @LastEditTime: 2023-01-25 23:19:00
|
|
||||||
* @FilePath: \admin_system\src\views\requirement\RequirementEditing.vue
|
|
||||||
* @Description:
|
|
||||||
*
|
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
|
||||||
-->
|
|
||||||
<!--
|
|
||||||
* @Author: Kane
|
|
||||||
* @Date: 2023-01-25 23:13:47
|
|
||||||
* @LastEditors: Kane
|
|
||||||
* @LastEditTime: 2023-01-25 23:15:21
|
|
||||||
* @FilePath: \admin_system\src\views\requirement\RequirementManager.vue
|
|
||||||
* @Description:
|
|
||||||
*
|
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
|
||||||
-->
|
|
||||||
<template>
|
|
||||||
需求编辑页面
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: "requirement-editing",
|
|
||||||
data()
|
|
||||||
{
|
|
||||||
return {};
|
|
||||||
},
|
|
||||||
mounted()
|
|
||||||
{
|
|
||||||
console.log("接收的参数:", this.$route.query);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
@ -1,441 +0,0 @@
|
|||||||
<!--
|
|
||||||
* @Author: Kane
|
|
||||||
* @Date: 2023-01-25 23:13:47
|
|
||||||
* @LastEditors: Kane
|
|
||||||
* @LastEditTime: 2023-02-02 11:07:17
|
|
||||||
* @FilePath: \IT工具综合平台\src\views\requirement\RequirementManager.vue
|
|
||||||
* @Description:
|
|
||||||
*
|
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
|
||||||
-->
|
|
||||||
<template>
|
|
||||||
|
|
||||||
<div class="requirement_wrapper">
|
|
||||||
<!-- 查询框 -->
|
|
||||||
<div class="search-box">
|
|
||||||
<el-row :gutter="10">
|
|
||||||
<el-col :span="2">
|
|
||||||
<span>标题:</span>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="16">
|
|
||||||
<el-input v-model.trim.lazy="this.query_param.title"></el-input>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="10">
|
|
||||||
<el-col :span="2">
|
|
||||||
<span>需求编号:</span>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-input v-model.trim.lazy="query_param.serial_no" placeholder="请输入末尾三位数字"></el-input>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2">
|
|
||||||
<span>申请人:</span>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-input v-model.trim.lazy="query_param.request_people"></el-input>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2">
|
|
||||||
<span>状态:</span>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4">
|
|
||||||
<!-- <el-input v-model="query_param.status"></el-input> -->
|
|
||||||
<el-select multiple collapse-tags collapse-tags-tooltip v-model.trim.lazy="query_param.status">
|
|
||||||
<el-option v-for="option in requirement_status" :value="option" :key="option"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6"></el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="10">
|
|
||||||
<el-col :span="2">
|
|
||||||
<span>提交日期:</span>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-date-picker v-model="query_param.commit_start_date" style="width:100%;"></el-date-picker>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2">
|
|
||||||
<span>至:</span>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-date-picker v-model="query_param.commit_end_date" style="width:100%;"></el-date-picker>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<div class="button-wrapper-right">
|
|
||||||
<el-button type="primary" icon="search">查询</el-button>
|
|
||||||
<el-button icon="Refresh">重置</el-button>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6"></el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
<!-- 工具栏 -->
|
|
||||||
<div class="tool-button-wrapper">
|
|
||||||
<el-row :gutter="10">
|
|
||||||
<el-col :span="4">
|
|
||||||
<div class="button-wrapper-left">
|
|
||||||
<el-button type="success" icon="DocumentAdd" plain @click="addNewRequirement()">新增</el-button>
|
|
||||||
<el-button type="warning" icon="document" plain>导出</el-button>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="20">
|
|
||||||
<div class="table-display-wrapper">
|
|
||||||
<span>结果筛选:</span>
|
|
||||||
<div class="result-filter-wrapper">
|
|
||||||
<el-checkbox-button label="已完成" checked></el-checkbox-button>
|
|
||||||
<el-checkbox-button label="已取消" checked></el-checkbox-button>
|
|
||||||
<el-checkbox-button label="被退回" checked></el-checkbox-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
<!-- 需求列表 -->
|
|
||||||
<el-table :data="tableData" border stripe style="width:100%;" :height="tableHeight">
|
|
||||||
<el-table-column type="selection" align="center"></el-table-column>
|
|
||||||
<el-table-column label="需求编号" align="center" width="160">
|
|
||||||
<template #default="requirement">
|
|
||||||
<span @click="dialogRequirementDetailVisible = true;" class="requirement-serial">{{
|
|
||||||
requirement.row.serial_no
|
|
||||||
}}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="标题" prop="title" min-width="200" align="center">
|
|
||||||
<template #default="requirement">
|
|
||||||
<span class="requirement-title">{{ requirement.row.title }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="申请人" prop="request_people" align="center" width="100"></el-table-column>
|
|
||||||
<el-table-column label="状态" prop="status" align="center" width="100"></el-table-column>
|
|
||||||
<el-table-column label="提交日期" prop="submit_date" align="center" width="130"></el-table-column>
|
|
||||||
<el-table-column label="操作" align="center" fixed="right" width="200">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-button type="warning" icon="edit" @click="editRequirement(scope.row.serial_no)">编辑</el-button>
|
|
||||||
<el-button type="danger" icon="delete">删除</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<div class="pagination_wrapper">
|
|
||||||
<el-pagination class="pull_left" @current-change="onCurrentPageIndexChange"
|
|
||||||
@size-change="onTablePageSizeChange" size="small" background v-model="this.table_current_page"
|
|
||||||
:page-size="this.table_page_size" :page-sizes="[10, 20, 50, 100]"
|
|
||||||
layout="total, sizes, prev, pager, next, jumper" :total="requirement_data.length">
|
|
||||||
</el-pagination>
|
|
||||||
</div>
|
|
||||||
<!-- 需求详细信息对话框 -->
|
|
||||||
<el-dialog title="详情" class="requirement-detail-dialog" v-model="dialogRequirementDetailVisible" width="900px"
|
|
||||||
:close-on-click-modal="true" :close-on-press-escape="false" :show-close="true" :center="false">
|
|
||||||
<el-tabs v-model="activeTabName">
|
|
||||||
<el-tab-pane name="requirement-detail" label="基本信息">
|
|
||||||
<el-scrollbar height="400px">
|
|
||||||
<div class="requirement-detail-wrapper">
|
|
||||||
<el-row :gutter="10">
|
|
||||||
<el-col :span="2">
|
|
||||||
<span>标题</span>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="22">
|
|
||||||
<el-input readonly></el-input>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="10">
|
|
||||||
<el-col :span="2">
|
|
||||||
<span>需求编号</span>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-input v-model="query_param.serial_no" readonly></el-input>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2">
|
|
||||||
<span>需求分类</span>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-input readonly v-model="query_param.request_people"></el-input>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2">
|
|
||||||
<span>状态</span>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-input readonly v-model="query_param.status"></el-input>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="10">
|
|
||||||
<el-col :span="2">
|
|
||||||
<span>联系人</span>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-input readonly v-model="query_param.status"></el-input>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2">
|
|
||||||
<span>联系方式</span>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-input readonly v-model="query_param.status"></el-input>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2">
|
|
||||||
<span>提交日期</span>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-input readonly v-model="query_param.status"></el-input>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</el-scrollbar>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane name="requirement-content" label="需求描述">
|
|
||||||
<el-scrollbar height="400px"></el-scrollbar>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane name="issue-date" label="排期">
|
|
||||||
<el-scrollbar height="400px">
|
|
||||||
<el-table style="width:100%;height:400px;" border stripe>
|
|
||||||
<el-table-column label="系统" align="center" min-width="200"></el-table-column>
|
|
||||||
<el-table-column label="功能" align="center" min-width="200"></el-table-column>
|
|
||||||
<el-table-column label="首次排期" align="center" width="150"></el-table-column>
|
|
||||||
<el-table-column label="最新排期" align="center" width="150"></el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</el-scrollbar>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane name="comment" label="备注">
|
|
||||||
<el-scrollbar height="400px">
|
|
||||||
<p>hello world</p>
|
|
||||||
<p><span style="font-size: 24px;">ejfalsjfoewafsdjfdsfewo;sd;fk</span></p>
|
|
||||||
<ol>
|
|
||||||
<li><span style="color: rgb(225, 60, 57); font-size: 24px;">12344</span></li>
|
|
||||||
<li><span style="font-size: 24px;">33445</span></li>
|
|
||||||
</ol>
|
|
||||||
<p><br></p>
|
|
||||||
</el-scrollbar>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
<!-- <template #footer>
|
|
||||||
<div class="dialogFooter">
|
|
||||||
<el-button type="primary" @click="dialogRequirementDetailVisible = false;">关闭</el-button>
|
|
||||||
</div>
|
|
||||||
</template> -->
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { requirementTestData } from '@/test/data/TestData';
|
|
||||||
import router from "@/router/index";
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "requirement-manager",
|
|
||||||
data()
|
|
||||||
{
|
|
||||||
return {
|
|
||||||
requirement_data: requirementTestData, //需求数据,当前值是测试数据
|
|
||||||
table_current_page: 1,//分页组件当前的页面索引
|
|
||||||
table_page_size: 10,
|
|
||||||
query_param: {
|
|
||||||
title: "",
|
|
||||||
serial_no: "",
|
|
||||||
request_people: "",
|
|
||||||
commit_start_date: "",
|
|
||||||
commit_end_date: "",
|
|
||||||
status: "",
|
|
||||||
},
|
|
||||||
requirement_status: [
|
|
||||||
"未提交", "部门审核", "需求分析", "技术开发", "待发布", "已发布", "被退回",
|
|
||||||
],
|
|
||||||
dialogRequirementDetailVisible: false, //需求详情对话框是否显示
|
|
||||||
activeTabName: "requirement-detail",
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
//计算表格的高度
|
|
||||||
tableHeight()
|
|
||||||
{
|
|
||||||
return 10 * 50 + 40;
|
|
||||||
},
|
|
||||||
tableData()
|
|
||||||
{
|
|
||||||
const startIndex = this.table_page_size * (this.table_current_page - 1);
|
|
||||||
const endIndex = (this.table_page_size * this.table_current_page);// < this.requirement_data.length ? (this.table_page_size * this.table_current_page) : this.requirement_data.length;
|
|
||||||
|
|
||||||
return this.requirement_data.slice(startIndex, endIndex);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
onTablePageSizeChange(pageSize)
|
|
||||||
{
|
|
||||||
console.log("选择的pageSize", pageSize);
|
|
||||||
this.table_page_size = pageSize;
|
|
||||||
},
|
|
||||||
//用户变更当前页时消息处理函数
|
|
||||||
onCurrentPageIndexChange(pageIndex)
|
|
||||||
{
|
|
||||||
this.table_current_page = pageIndex;
|
|
||||||
},
|
|
||||||
addNewRequirement()
|
|
||||||
{
|
|
||||||
//console.log("router", this.$route);
|
|
||||||
router.push({
|
|
||||||
name: "RequirementEditing",
|
|
||||||
query: {
|
|
||||||
serial: "new",
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
editRequirement(requirement_serial)
|
|
||||||
{
|
|
||||||
window.localStorage.setItem("requirement_serial", requirement_serial);
|
|
||||||
|
|
||||||
router.push({
|
|
||||||
name: "RequirementEditing",
|
|
||||||
query: {
|
|
||||||
serial: requirement_serial,
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
},
|
|
||||||
},
|
|
||||||
//声明周期
|
|
||||||
created()
|
|
||||||
{
|
|
||||||
this.query_param.commit_end_date = new Date(Date.now());
|
|
||||||
this.query_param.commit_start_date = new Date();
|
|
||||||
|
|
||||||
this.query_param.commit_start_date.setMonth(this.query_param.commit_end_date.getMonth() - 1);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
/* 整个页面的外壳 ******************************/
|
|
||||||
.requirement_wrapper {
|
|
||||||
padding: 15px 10px;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 5px;
|
|
||||||
box-shadow: 0px 0px 20px -10px rgb(14 18 22 / 25%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.requirement_wrapper:hover {
|
|
||||||
box-shadow: 0px 0px 20px -10px rgb(14 18 22 / 40%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.requirement_wrapper>*+* {
|
|
||||||
margin-top: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* 查询框 **********************************/
|
|
||||||
.search-box {
|
|
||||||
padding: 0 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-box span {
|
|
||||||
font-weight: normal;
|
|
||||||
display: block;
|
|
||||||
text-align: right;
|
|
||||||
font-size: 15px;
|
|
||||||
color: #5f5f5f;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-box>.el-row {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-box .el-row+.el-row {
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 查询结果筛选框 */
|
|
||||||
.tool-button-wrapper {
|
|
||||||
padding: 0px 15px;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tool-button-wrapper>.el-row {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tool-button-wrapper span {
|
|
||||||
font-weight: small;
|
|
||||||
display: block;
|
|
||||||
text-align: right;
|
|
||||||
font-size: 15px;
|
|
||||||
color: #5f5f5f;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tool-button-wrapper .el-checkbox {
|
|
||||||
font-size: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-display-wrapper {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button-wrapper-right {
|
|
||||||
display: flex;
|
|
||||||
justify-content: right;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button-wrapper-left {
|
|
||||||
display: flex;
|
|
||||||
justify-content: left;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.result-filter-wrapper {
|
|
||||||
padding: 0 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 需求列表 */
|
|
||||||
.requirement-title {
|
|
||||||
display: block;
|
|
||||||
text-align: left;
|
|
||||||
width: 100%;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.requirement-serial {
|
|
||||||
width: 100%;
|
|
||||||
text-align: center;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***分页组件 *************/
|
|
||||||
.pagination_wrapper {
|
|
||||||
padding-right: 15px;
|
|
||||||
display: flex;
|
|
||||||
justify-content: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*需求详情对话框 */
|
|
||||||
.requirement-detail-dialog {
|
|
||||||
width: 400px;
|
|
||||||
height: 600px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.requirement-detail-dialog .el-row {
|
|
||||||
display: flex;
|
|
||||||
justify-content: left;
|
|
||||||
align-items: center;
|
|
||||||
/* margin-top: 10px; */
|
|
||||||
}
|
|
||||||
|
|
||||||
.requirement-detail-dialog .el-row+.el-row {
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.requirement-detail-wrapper {
|
|
||||||
padding: 0px 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.requirement-detail-wrapper span {
|
|
||||||
display: block;
|
|
||||||
text-align: right;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<style>
|
|
||||||
.requirement-detail-dialog .el-dialog__body {
|
|
||||||
padding: 0px 15px 15px 15px !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,51 +0,0 @@
|
|||||||
/*
|
|
||||||
* @Author: Kane
|
|
||||||
* @Date: 2022-12-17 11:08:18
|
|
||||||
* @LastEditors: Kane
|
|
||||||
* @LastEditTime: 2023-01-07 12:08:14
|
|
||||||
* @FilePath: \admin_system\vue.config.js
|
|
||||||
* @Description:
|
|
||||||
*
|
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
|
||||||
*/
|
|
||||||
// const { defineConfig } = require('@vue/cli-service');
|
|
||||||
// module.exports = defineConfig(
|
|
||||||
// {
|
|
||||||
// transpileDependencies: true,
|
|
||||||
// devServer: {
|
|
||||||
// open: true,
|
|
||||||
// host: "localhost",
|
|
||||||
// port: 8000,
|
|
||||||
// },
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
module.exports = {
|
|
||||||
transpileDependencies: true,
|
|
||||||
devServer: {
|
|
||||||
open: true,
|
|
||||||
host: "localhost",
|
|
||||||
port: 8000,
|
|
||||||
},
|
|
||||||
chainWebpack: (config) =>
|
|
||||||
{
|
|
||||||
// svg 图标解析
|
|
||||||
const svgRule = config.module.rule("svg"); //默认规则赋给 subRule 变量
|
|
||||||
svgRule.uses.clear(); // 清除已有的所有规则。
|
|
||||||
svgRule // 添加要替换的规则
|
|
||||||
.use("svg-sprite-loader")
|
|
||||||
.loader("svg-sprite-loader")
|
|
||||||
.options({
|
|
||||||
symbolId: "icon-[name]",
|
|
||||||
include: ["./src/components/svg/icons"] // 特别注意的目录路径
|
|
||||||
});
|
|
||||||
// 配置base64转换规则
|
|
||||||
// config.module
|
|
||||||
// .rule('images')
|
|
||||||
// .use('url-loader')
|
|
||||||
// .loader('url-loader')
|
|
||||||
// .tap(options => Object.assign(options, { limit: 1 }));
|
|
||||||
|
|
||||||
// 载入项目分析工具
|
|
||||||
// config.plugin('webpack-bundle-analyzer').use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin)
|
|
||||||
},
|
|
||||||
};
|
|
3
code/web/it-console/.env.development
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
VUE_APP_API_URL_LOGIN = "http://222.76.244.118:11001/admin-system/account/p13_account_check"
|
||||||
|
VUE_APP_API_URL_UPLOAD_FILE= "http://222.76.244.118:11001/admin-system/file/file-upload.do"
|
||||||
|
VUE_APP_API_URL_REQUIREMENT_STATUS= "http://222.76.244.118:11001/requirement/query_requirement_status.do"
|
44
code/web/it-console/.eslintrc.js
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2022-12-14 15:12:46
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @LastEditTime: 2023-02-14 23:10:53
|
||||||
|
* @FilePath: /IT工具综合平台/.eslintrc.js
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
env: {
|
||||||
|
node: true,
|
||||||
|
},
|
||||||
|
'extends': [
|
||||||
|
'plugin:vue/vue3-essential',
|
||||||
|
'eslint:recommended',
|
||||||
|
],
|
||||||
|
parserOptions: {
|
||||||
|
parser: '@babel/eslint-parser',
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||||
|
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||||
|
"no-unused-vars": "warn",
|
||||||
|
"semi": ["error", "always",],//控制行尾部分号
|
||||||
|
"comma-dangle": ["warn", {
|
||||||
|
"arrays": "always",
|
||||||
|
"objects": "always",
|
||||||
|
"imports": "never",
|
||||||
|
"exports": "never",
|
||||||
|
"functions": "never",
|
||||||
|
},],//数组和对象键值对最后一个逗号
|
||||||
|
"comma-style": ["error", "last",], //逗号在行位
|
||||||
|
"array-bracket-spacing": ["error", "never",],
|
||||||
|
"no-undef-init": "error",
|
||||||
|
"no-invalid-this": "error",
|
||||||
|
"no-use-before-define": "error",
|
||||||
|
"no-shadow-restricted-names": "error", //禁止对一些关键字或者保留字进行赋值操作,比如NaN、Infinity、undefined、eval、arguments等
|
||||||
|
// "comma-spacing": ["error", { "before": false, "after": true, },],
|
||||||
|
"brace-style": ["error", "allman", { "allowSingleLine": true, },],
|
||||||
|
},
|
||||||
|
};
|
44
code/web/it-console/index.html
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2022-12-17 11:08:18
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @LastEditTime: 2023-02-23 00:40:59
|
||||||
|
* @FilePath: /it-console-toVite/index.html
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
-->
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-cn">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
||||||
|
<link rel="icon" href="public/favicon.ico" />
|
||||||
|
<title>王炜的工具箱</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<noscript>
|
||||||
|
<strong
|
||||||
|
>We're sorry but <%= title %> doesn't work properly without
|
||||||
|
JavaScript enabled. Please enable it to continue.</strong
|
||||||
|
>
|
||||||
|
</noscript>
|
||||||
|
<div id="app" v-cloak></div>
|
||||||
|
<!-- built files will be auto injected -->
|
||||||
|
<script type="module" src="/src/main.js"></script>
|
||||||
|
</body>
|
||||||
|
<style>
|
||||||
|
.v-cloak {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
max-height: 100vh;
|
||||||
|
min-width: 1280px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</html>
|
||||||
|
|
52
code/web/it-console/package.json
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
"name": "CPIC-IT-Console",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"serve": "vue-cli-service serve",
|
||||||
|
"build": "vue-cli-service build",
|
||||||
|
"lint": "vue-cli-service lint",
|
||||||
|
"serve-vite": "vite",
|
||||||
|
"build-vite": "vite build",
|
||||||
|
"preview-vite": "vite preview"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@element-plus/icons-vue": "^2.0.10",
|
||||||
|
"@vitejs/plugin-vue": "^4.0.0",
|
||||||
|
"@wangeditor/editor": "^5.1.23",
|
||||||
|
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||||
|
"axios": "^1.2.1",
|
||||||
|
"core-js": "^3.8.3",
|
||||||
|
"element-plus": "^2.2.26",
|
||||||
|
"sass": "^1.56.2",
|
||||||
|
"scss": "^0.2.4",
|
||||||
|
"scss-loader": "^0.0.1",
|
||||||
|
"vite": "^4.1.4",
|
||||||
|
"vue": "^3.2.13",
|
||||||
|
"vue-router": "^4.0.3",
|
||||||
|
"vuex": "^4.0.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@babel/core": "^7.12.16",
|
||||||
|
"@babel/eslint-parser": "^7.12.16",
|
||||||
|
"@vue/cli-plugin-babel": "~5.0.0",
|
||||||
|
"@vue/cli-plugin-eslint": "~5.0.0",
|
||||||
|
"@vue/cli-plugin-router": "~5.0.0",
|
||||||
|
"@vue/cli-plugin-vuex": "~5.0.0",
|
||||||
|
"@vue/cli-service": "~5.0.0",
|
||||||
|
"eslint": "^7.32.0",
|
||||||
|
"eslint-plugin-vue": "^8.0.3",
|
||||||
|
"node-sass": "^8.0.0",
|
||||||
|
"sass-loader": "^13.2.0",
|
||||||
|
"svg-sprite-loader": "^2.1.0",
|
||||||
|
"vue-cli-plugin-element-plus": "~0.0.13",
|
||||||
|
"@vue/compiler-sfc": "^3.2.26",
|
||||||
|
"@vitejs/plugin-vue": "^2.0.1",
|
||||||
|
"@vitejs/plugin-vue-jsx": "^1.3.2",
|
||||||
|
"vite-plugin-env-compatible": "^1.1.1",
|
||||||
|
"vite-plugin-html": "3.2.0",
|
||||||
|
"vite": "^2.7.2",
|
||||||
|
"@originjs/vite-plugin-require-context": "1.0.9",
|
||||||
|
"@originjs/vite-plugin-commonjs": "^1.0.1"
|
||||||
|
}
|
||||||
|
}
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
@ -2,8 +2,8 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2022-12-17 11:08:18
|
* @Date: 2022-12-17 11:08:18
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-29 09:46:42
|
* @LastEditTime: 2023-02-23 00:44:29
|
||||||
* @FilePath: \IT工具综合平台\public\index.html
|
* @FilePath: /it-console-toVite/public/index.html
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
@ -14,7 +14,7 @@
|
|||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
||||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
|
<link rel="icon" href="favicon.ico" />
|
||||||
<title>王炜的工具箱</title>
|
<title>王炜的工具箱</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@ -25,9 +25,10 @@
|
|||||||
continue.</strong
|
continue.</strong
|
||||||
>
|
>
|
||||||
</noscript>
|
</noscript>
|
||||||
<div id="app" v-cloak></div>
|
<div id="app"></div>
|
||||||
<!-- built files will be auto injected -->
|
<!-- built files will be auto injected -->
|
||||||
</body>
|
</body>
|
||||||
|
<script type="module" src="../src/main.js"></script>
|
||||||
<style>
|
<style>
|
||||||
.v-cloak {
|
.v-cloak {
|
||||||
display: none;
|
display: none;
|
@ -2,8 +2,8 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2022-12-14 15:12:46
|
* @Date: 2022-12-14 15:12:46
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-19 14:26:17
|
* @LastEditTime: 2023-02-15 09:34:25
|
||||||
* @FilePath: \admin_system\src\App.vue
|
* @FilePath: /IT工具综合平台/src/App.vue
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
@ -20,10 +20,11 @@ import zhCn from "element-plus/lib/locale/lang/zh-cn";
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "App",
|
name: "App",
|
||||||
data() {
|
setup()
|
||||||
return {
|
{
|
||||||
locale: zhCn, //语言属性
|
const locale = zhCn;
|
||||||
};
|
|
||||||
|
return { locale, };
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
// HelloWorld,
|
// HelloWorld,
|
||||||
@ -32,4 +33,5 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
</style>
|
</style>
|
BIN
code/web/it-console/src/assets/fonts/FZSJ-RUGAQSAY.TTF
Normal file
BIN
code/web/it-console/src/assets/img/cropped-1600-900-36302.jpg
Normal file
After Width: | Height: | Size: 773 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
BIN
code/web/it-console/src/assets/skull.png
Normal file
After Width: | Height: | Size: 195 KiB |
@ -2,8 +2,8 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2023-01-06 20:33:57
|
* @Date: 2023-01-06 20:33:57
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-07 17:10:07
|
* @LastEditTime: 2023-02-22 17:10:18
|
||||||
* @FilePath: \admin_system\src\components\svg\SvgIcon.vue
|
* @FilePath: /IT工具综合平台/src/components/svg/SvgIcon.vue
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
@ -18,10 +18,10 @@ export default {
|
|||||||
data()
|
data()
|
||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
iconName: ""
|
iconName: "",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: ["icon"],
|
props: ["icon",],
|
||||||
created()
|
created()
|
||||||
{
|
{
|
||||||
console.log("svg");
|
console.log("svg");
|
||||||
@ -31,6 +31,4 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped></style>
|
||||||
|
|
||||||
</style>
|
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 753 B After Width: | Height: | Size: 753 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 928 B After Width: | Height: | Size: 928 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 937 B After Width: | Height: | Size: 937 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
@ -2,14 +2,14 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2023-01-04 11:05:44
|
* @Date: 2023-01-04 11:05:44
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-28 23:35:47
|
* @LastEditTime: 2023-02-06 09:26:48
|
||||||
* @FilePath: \admin_system\src\layout\Index.vue
|
* @FilePath: /IT工具综合平台/src/layout/Index.vue
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-container id="layout-container">
|
<el-container id="layout-container" v-loading="ui.ageVisible" element-loading-text="载入应用数据…">
|
||||||
<el-header id="layout-header">
|
<el-header id="layout-header">
|
||||||
<LayoutHeader />
|
<LayoutHeader />
|
||||||
</el-header>
|
</el-header>
|
||||||
@ -28,28 +28,62 @@
|
|||||||
import LayoutAside from "./components/Aside.vue";
|
import LayoutAside from "./components/Aside.vue";
|
||||||
import LayoutHeader from "./components/Header.vue";
|
import LayoutHeader from "./components/Header.vue";
|
||||||
import LayoutMain from "./components/Main.vue";
|
import LayoutMain from "./components/Main.vue";
|
||||||
|
import { useStore } from "vuex";
|
||||||
|
import { onMounted, computed, reactive } from "vue";
|
||||||
|
// import { query_requirement_status } from "@/utils/api/requirement/requirement.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "layoutPage",
|
name: "layoutPage",
|
||||||
|
setup()
|
||||||
|
{
|
||||||
|
const store = useStore();
|
||||||
|
|
||||||
|
const ui = reactive(
|
||||||
|
{
|
||||||
|
pageVisible: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const asideWidth = computed(() =>
|
||||||
|
{
|
||||||
|
const collapse = store.state.app.asideBarCollapse;
|
||||||
|
|
||||||
|
return collapse === true ? "65px" : "180px";
|
||||||
|
});
|
||||||
|
|
||||||
|
onMounted(() =>
|
||||||
|
{
|
||||||
|
//加载数据
|
||||||
|
// query_requirement_status()
|
||||||
|
// .then((response) =>
|
||||||
|
// {
|
||||||
|
// // debugger;
|
||||||
|
// const data = response.data;
|
||||||
|
// console.log(data);
|
||||||
|
// })
|
||||||
|
// .catch((error) =>
|
||||||
|
// {
|
||||||
|
// // debugger;
|
||||||
|
// console.log(error);
|
||||||
|
// });
|
||||||
|
});
|
||||||
|
|
||||||
|
return {
|
||||||
|
ui,
|
||||||
|
asideWidth,
|
||||||
|
};
|
||||||
|
},
|
||||||
components: {
|
components: {
|
||||||
LayoutAside,
|
LayoutAside,
|
||||||
LayoutHeader,
|
LayoutHeader,
|
||||||
LayoutMain,
|
LayoutMain,
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
asideWidth()
|
|
||||||
{
|
|
||||||
const collapse = this.$store.state.app.asideBarCollapse;
|
|
||||||
|
|
||||||
return collapse === true ? "65px" : "180px";
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
#layout-container {
|
#layout-container {
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
|
/* width: 100vw; */
|
||||||
max-height: 100vh;
|
max-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,10 +97,9 @@ export default {
|
|||||||
/* width: 175px; */
|
/* width: 175px; */
|
||||||
background-color: #2f4156;
|
background-color: #2f4156;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
/* height: calc(100vh - 50px);
|
height: calc(100vh - 50px);
|
||||||
max-height: calc(100vh - 50px);
|
max-height: calc(100vh - 50px);
|
||||||
min-height: calc(100vh - 50px); */
|
min-height: calc(100vh - 50px);
|
||||||
height: 100%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#layout-header {
|
#layout-header {
|
@ -2,8 +2,8 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2023-01-04 11:30:33
|
* @Date: 2023-01-04 11:30:33
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-28 16:01:49
|
* @LastEditTime: 2023-02-06 09:28:16
|
||||||
* @FilePath: \admin_system\src\layout\components\Aside.vue
|
* @FilePath: /IT工具综合平台/src/layout/components/Aside.vue
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved. 223142 2f4156
|
* Copyright (c) ${2022} by Kane, All Rights Reserved. 223142 2f4156
|
||||||
@ -12,7 +12,7 @@
|
|||||||
<el-scrollbar class="wrapper">
|
<el-scrollbar class="wrapper">
|
||||||
<el-menu id="side-bar" router :default-active="currentPath" background-color="#2f4156" text-color="#fff"
|
<el-menu id="side-bar" router :default-active="currentPath" background-color="#2f4156" text-color="#fff"
|
||||||
active-text-color="#ffd04b" :collapse="asideCollapse">
|
active-text-color="#ffd04b" :collapse="asideCollapse">
|
||||||
<template v-for="route in this.routers" :key="route.path">
|
<template v-for="route in routes" :key="route.path">
|
||||||
<template v-if="!route.hidden">
|
<template v-if="!route.hidden">
|
||||||
<template v-if="hasOnlyChild(route.children)">
|
<template v-if="hasOnlyChild(route.children)">
|
||||||
<!-- 当只有一个子路由时,直接渲染子路由 -->
|
<!-- 当只有一个子路由时,直接渲染子路由 -->
|
||||||
@ -46,19 +46,20 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { computed } from "vue";
|
||||||
|
import { useStore } from "vuex";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "LayoutAside",
|
name: "LayoutAside",
|
||||||
data()
|
setup()
|
||||||
{
|
{
|
||||||
return {
|
const router = useRouter();//路由
|
||||||
routers: null,
|
const routes = router.getRoutes();//路由数组
|
||||||
};
|
const store = useStore();
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
//用于判断一个路由是否只有一项子路由
|
//用于判断一个路由是否只有一项子路由
|
||||||
hasOnlyChild: function (children)
|
const hasOnlyChild = (children) =>
|
||||||
{
|
{
|
||||||
//防御验证
|
//防御验证
|
||||||
if (!children)
|
if (!children)
|
||||||
@ -78,27 +79,31 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
},
|
};
|
||||||
|
|
||||||
},
|
//计算变量
|
||||||
computed: {
|
|
||||||
//获取当前的路由
|
//获取当前的路由
|
||||||
currentPath()
|
const currentPath = computed(() =>
|
||||||
{
|
{
|
||||||
let path = useRoute().path;
|
let path = useRoute().path;
|
||||||
|
|
||||||
return path;
|
return path;
|
||||||
},
|
});
|
||||||
|
|
||||||
//获取导航栏是否折叠的标志
|
//获取导航栏是否折叠的标志
|
||||||
asideCollapse()
|
const asideCollapse = computed(() =>
|
||||||
{
|
{
|
||||||
return this.$store.state.app.asideBarCollapse;
|
return store.state.app.ui.asideBarCollapse;
|
||||||
}
|
});
|
||||||
|
|
||||||
|
return {
|
||||||
|
router,
|
||||||
|
routes,
|
||||||
|
hasOnlyChild,
|
||||||
|
currentPath,
|
||||||
|
asideCollapse,
|
||||||
|
};
|
||||||
},
|
},
|
||||||
created()
|
|
||||||
{
|
|
||||||
this.routers = useRouter().options.routes;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -120,11 +125,21 @@ export default {
|
|||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.is-active {
|
.el-menu-item {
|
||||||
background-color: #ffffff4f !important;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.el-sub-menu {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 顺序必须在上面两个之后*/
|
||||||
|
.is-active {
|
||||||
|
background-color: #ffffff4f !important;
|
||||||
|
/* font-weight: 1000; */
|
||||||
|
/* font-size: 15px; */
|
||||||
|
color: #ffd04b;
|
||||||
|
}
|
||||||
|
|
||||||
/* .is-opened {
|
/* .is-opened {
|
||||||
border-left: 5px solid #1d74b2;
|
border-left: 5px solid #1d74b2;
|
||||||
@ -146,5 +161,6 @@ export default {
|
|||||||
|
|
||||||
.wrapper {
|
.wrapper {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
/* min-height: 400px; */
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -2,8 +2,8 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2023-01-04 11:39:04
|
* @Date: 2023-01-04 11:39:04
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-19 14:53:38
|
* @LastEditTime: 2023-02-04 01:09:49
|
||||||
* @FilePath: \admin_system\src\layout\components\Header.vue
|
* @FilePath: \IT工具综合平台\src\layout\components\Header.vue
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
@ -16,13 +16,8 @@
|
|||||||
<div>3.6.7 x64 Build 202208301257</div>
|
<div>3.6.7 x64 Build 202208301257</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="buttons_div">
|
<div class="buttons_div">
|
||||||
<User
|
<User style="width: 25px; height; 25px; margin-right: 8px; cursor:pointer;" />
|
||||||
style="width: 25px; height; 25px; margin-right: 8px; cursor:pointer;"
|
<SwitchButton style="width: 25px; height; 25px; margin-right: 8px; cursor:pointer;" @click="logout" />
|
||||||
/>
|
|
||||||
<SwitchButton
|
|
||||||
style="width: 25px; height; 25px; margin-right: 8px; cursor:pointer;"
|
|
||||||
@click="logout"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -33,22 +28,26 @@ import { Logout } from "../../utils/api/info/account";
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "AppBanner",
|
name: "AppBanner",
|
||||||
data() {
|
data()
|
||||||
|
{
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
// created() {
|
// created() {
|
||||||
// console.log("banner请求数据!");
|
// console.log("banner请求数据!");
|
||||||
// },
|
// },
|
||||||
mounted() {
|
mounted()
|
||||||
|
{
|
||||||
//console.log("banner请求数据!");
|
//console.log("banner请求数据!");
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
logout() {
|
logout()
|
||||||
|
{
|
||||||
this.$confirm("是否退出系统?", "请确认", {
|
this.$confirm("是否退出系统?", "请确认", {
|
||||||
confirmButtonText: "是",
|
confirmButtonText: "是",
|
||||||
cancelButtonText: "否",
|
cancelButtonText: "否",
|
||||||
type: "warning",
|
type: "warning",
|
||||||
}).then(() => {
|
}).then(() =>
|
||||||
|
{
|
||||||
Logout();
|
Logout();
|
||||||
});
|
});
|
||||||
},
|
},
|
91
code/web/it-console/src/layout/components/Header.vue
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-01-04 11:39:04
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @LastEditTime: 2023-02-22 18:33:11
|
||||||
|
* @FilePath: /IT工具综合平台/src/layout/components/Header.vue
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div class="app_banner no_select">
|
||||||
|
<span class="company_name">CPIC</span>
|
||||||
|
<div class="version_div">
|
||||||
|
<div>测试版</div>
|
||||||
|
<div>3.6.7 x64 Build 202208301257</div>
|
||||||
|
</div>
|
||||||
|
<div class="buttons_div">
|
||||||
|
<User style="width: 25px; height; 25px; margin-right: 8px; cursor:pointer;" />
|
||||||
|
<SwitchButton style="width: 25px; height; 25px; margin-right: 8px; cursor:pointer;" @click="logout" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { ElMessageBox } from "element-plus";
|
||||||
|
import { Logout } from "../../utils/api/info/account";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "AppBanner",
|
||||||
|
setup()
|
||||||
|
{
|
||||||
|
const logout = () =>
|
||||||
|
{
|
||||||
|
ElMessageBox.confirm("是否退出系统?", "请确认", {
|
||||||
|
confirmButtonText: "是",
|
||||||
|
cancelButtonText: "否",
|
||||||
|
type: "warning",
|
||||||
|
}).then(() =>
|
||||||
|
{
|
||||||
|
Logout();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
return { logout, };
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.app_banner {
|
||||||
|
background-color: var(--banner-background-color);
|
||||||
|
color: #fff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: left;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0px 15px 0px 15px;
|
||||||
|
height: 100%;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no_select {
|
||||||
|
-webkit-touch-callout: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
/*火狐*/
|
||||||
|
-webkit-user-select: none;
|
||||||
|
/*webkit浏览器*/
|
||||||
|
-ms-user-select: none;
|
||||||
|
/*IE10*/
|
||||||
|
-khtml-user-select: none;
|
||||||
|
/*早期浏览器*/
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app_banner>*+* {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.company_name {
|
||||||
|
font-size: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.version_div {
|
||||||
|
font-size: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.buttons_div {
|
||||||
|
margin-left: auto;
|
||||||
|
padding-top: 5px;
|
||||||
|
/* border: 1px solid salmon; */
|
||||||
|
}
|
||||||
|
</style>
|
@ -2,8 +2,8 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2023-01-04 11:40:03
|
* @Date: 2023-01-04 11:40:03
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-26 12:34:20
|
* @LastEditTime: 2023-02-07 10:47:57
|
||||||
* @FilePath: \admin_system\src\layout\components\Main.vue
|
* @FilePath: /IT工具综合平台/src/layout/components/Main.vue
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "LayoutMain"
|
name: "LayoutMain",
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -31,6 +31,6 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.view-wrapper {
|
.view-wrapper {
|
||||||
padding: 15px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -2,8 +2,8 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2022-12-14 15:12:46
|
* @Date: 2022-12-14 15:12:46
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-30 21:43:21
|
* @LastEditTime: 2023-02-17 13:11:43
|
||||||
* @FilePath: \IT工具综合平台\src\main.js
|
* @FilePath: /IT工具综合平台/src/main.js
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
@ -25,13 +25,13 @@ import("element-plus/dist/index.css");
|
|||||||
|
|
||||||
import ElementPlus from "element-plus";
|
import ElementPlus from "element-plus";
|
||||||
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
|
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
|
||||||
import SvgIcon from "./components/svg/SvgIcon";
|
//import SvgIcon from "./components/svg/SvgIcon";
|
||||||
|
|
||||||
const app = createApp(App);
|
const app = createApp(App);
|
||||||
|
|
||||||
app.component("SvgIcon", SvgIcon);
|
//app.component("SvgIcon", SvgIcon);
|
||||||
|
|
||||||
for (const [key, component] of Object.entries(ElementPlusIconsVue))
|
for (const [key, component,] of Object.entries(ElementPlusIconsVue))
|
||||||
{
|
{
|
||||||
app.component(key, component);
|
app.component(key, component);
|
||||||
}
|
}
|
@ -2,8 +2,8 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2022-12-14 15:12:46
|
* @Date: 2022-12-14 15:12:46
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-30 22:43:16
|
* @LastEditTime: 2023-02-21 13:09:15
|
||||||
* @FilePath: \IT工具综合平台\src\router\index.js
|
* @FilePath: /IT工具综合平台/src/router/index.js
|
||||||
* @Description: 定义应用路由配置
|
* @Description: 定义应用路由配置
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
@ -18,6 +18,12 @@ const routes = [
|
|||||||
redirect: "Login", //默认路由指向登录页面
|
redirect: "Login", //默认路由指向登录页面
|
||||||
hidden: true,
|
hidden: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/error-page",
|
||||||
|
name: "ErrorPage",
|
||||||
|
hidden: true,
|
||||||
|
component: () => import("@/views/ErrorPage.vue"),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "/login",
|
path: "/login",
|
||||||
name: "Login",
|
name: "Login",
|
||||||
@ -29,7 +35,7 @@ const routes = [
|
|||||||
name: "Home",
|
name: "Home",
|
||||||
hidden: true,
|
hidden: true,
|
||||||
meta: {
|
meta: {
|
||||||
title: "控制台"
|
title: "控制台",
|
||||||
},
|
},
|
||||||
component: () => import("../layout/Index.vue"),
|
component: () => import("../layout/Index.vue"),
|
||||||
},
|
},
|
||||||
@ -85,49 +91,52 @@ const routes = [
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{//信息管理
|
{
|
||||||
path: "/news",
|
//信息查询
|
||||||
name: "News",
|
path: "/query_info",
|
||||||
|
name: "QueryInfo",
|
||||||
meta: {
|
meta: {
|
||||||
title: "信息管理",
|
title: "信息查询",
|
||||||
icon: "edit",
|
icon: "search",
|
||||||
|
},
|
||||||
|
component: () => import("@/layout/Index.vue"),
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: "/query_stuff",
|
||||||
|
name: "QueryStuff",
|
||||||
|
meta: {
|
||||||
|
title: "人员信息",
|
||||||
|
icon: "user",
|
||||||
|
},
|
||||||
|
component: () => import("@/views/info/StaffInfo.vue"),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{//权限管理
|
||||||
|
path: "/privilege",
|
||||||
|
name: "Privilege",
|
||||||
|
meta: {
|
||||||
|
title: "权限管理",
|
||||||
|
icon: "User",
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "/staffInfo",
|
path: "/user-manager",
|
||||||
name: "StaffInfo",
|
name: "UserManager",
|
||||||
meta: {
|
meta: {
|
||||||
title: "人员信息",
|
title: "用户管理",
|
||||||
icon: "edit",
|
icon: "User",
|
||||||
},
|
},
|
||||||
component: () => import("../views/info/StaffInfo.vue"),
|
component: () => import("../views/privilege/StaffInfo.vue"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/editStuffInfo",
|
path: "/privilege-manager",
|
||||||
name: "EditStaffInfo",
|
name: "PrivilegeManager",
|
||||||
hidden: true,
|
|
||||||
meta: {
|
meta: {
|
||||||
title: "编辑人员信息",
|
title: "权限管理",
|
||||||
},
|
|
||||||
component: () => import("../views/info/EditStaffInfo.vue"),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "/newsIndex",
|
|
||||||
name: "NewsIndex",
|
|
||||||
meta: {
|
|
||||||
title: "信息列表",
|
|
||||||
icon: "edit",
|
icon: "edit",
|
||||||
},
|
},
|
||||||
component: () => import("../views/news/News.vue"),
|
component: () => import("../views/privilege/PrivilegeManager.vue"),
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "/newsedit",
|
|
||||||
name: "NewsEdit",
|
|
||||||
meta: {
|
|
||||||
title: "信息编辑",
|
|
||||||
icon: "edit",
|
|
||||||
},
|
|
||||||
component: () => import("../views/news/NewsEdit.vue"),
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
component: () => import("../layout/Index.vue"),
|
component: () => import("../layout/Index.vue"),
|
||||||
@ -137,7 +146,7 @@ const routes = [
|
|||||||
name: "NetworkManager",
|
name: "NetworkManager",
|
||||||
meta: {
|
meta: {
|
||||||
title: "网络管理",
|
title: "网络管理",
|
||||||
icon: "User",
|
icon: "switch",
|
||||||
},
|
},
|
||||||
component: () => import("../layout/Index.vue"),
|
component: () => import("../layout/Index.vue"),
|
||||||
children: [
|
children: [
|
||||||
@ -164,14 +173,14 @@ const routes = [
|
|||||||
icon: "switch",
|
icon: "switch",
|
||||||
},
|
},
|
||||||
component: () => import("../views/network/switch/SwitchManager.vue"),
|
component: () => import("../views/network/switch/SwitchManager.vue"),
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHashHistory(),
|
history: createWebHashHistory(),
|
||||||
routes
|
routes,
|
||||||
});
|
});
|
||||||
|
|
||||||
//前置路由守卫
|
//前置路由守卫
|
@ -2,19 +2,21 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2022-12-14 15:12:46
|
* @Date: 2022-12-14 15:12:46
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-11 14:20:04
|
* @LastEditTime: 2023-02-04 15:59:09
|
||||||
* @FilePath: \admin_system\src\store\index.js
|
* @FilePath: /IT工具综合平台/src/store/index.js
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
import { createStore } from 'vuex';
|
import { createStore } from 'vuex';
|
||||||
import app from "./modules/app";
|
import app from "./modules/app";
|
||||||
|
import requirement from "./modules/requirement";
|
||||||
|
|
||||||
const store = createStore({
|
const store = createStore({
|
||||||
modules: {
|
modules: {
|
||||||
app,
|
app,
|
||||||
}
|
requirement,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export default store;
|
export default store;
|
@ -2,16 +2,19 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2023-01-07 22:25:43
|
* @Date: 2023-01-07 22:25:43
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-01-11 09:44:46
|
* @LastEditTime: 2023-02-14 23:10:22
|
||||||
* @FilePath: \admin_system\src\store\modules\app.js
|
* @FilePath: /IT工具综合平台/src/store/modules/app.js
|
||||||
* @Description: vuex中存放全局数据的模块
|
* @Description: vuex中存放全局数据的模块
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
const state = {
|
const state = {
|
||||||
count: 1001,
|
count: 1001,
|
||||||
asideBarCollapse: false, //侧边栏折叠标志位
|
|
||||||
userInfo: null, //用户信息和token
|
userInfo: null, //用户信息和token
|
||||||
|
ui:{ //ui相关的数据
|
||||||
|
asideBarCollapse: false, //侧边栏折叠标志位
|
||||||
|
|
||||||
|
},
|
||||||
};
|
};
|
||||||
const getters = {};
|
const getters = {};
|
||||||
const mutations = {
|
const mutations = {
|
||||||
@ -26,7 +29,7 @@ const mutations = {
|
|||||||
SET_USERINFO(state, userInfo)
|
SET_USERINFO(state, userInfo)
|
||||||
{
|
{
|
||||||
state.userInfo = userInfo;
|
state.userInfo = userInfo;
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
const actions = {};
|
const actions = {};
|
||||||
|
|
24
code/web/it-console/src/store/modules/requirement.js
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-02-04 15:55:16
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @LastEditTime: 2023-02-04 16:00:54
|
||||||
|
* @FilePath: /IT工具综合平台/src/store/modules/requirement.js
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
const state = {
|
||||||
|
status: {},//包含全部需求状态的数组
|
||||||
|
status_update_time: new Date(),
|
||||||
|
ui: {
|
||||||
|
selected_status: [], //已选择的需求状态
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
namespaced: true,
|
||||||
|
state,
|
||||||
|
};
|
||||||
|
|
73
code/web/it-console/src/utils/api/LocalStorage.js
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2023-02-06 14:12:11
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @LastEditTime: 2023-02-08 10:46:41
|
||||||
|
* @FilePath: /IT工具综合平台/src/utils/api/LocalStorage.js
|
||||||
|
* @Description: 初始化localStorage中保存的值。
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
//常量
|
||||||
|
const REQUIREMRNT_UI = `requirement_ui`;
|
||||||
|
|
||||||
|
//需求管理模块
|
||||||
|
function loadRequirementUI()
|
||||||
|
{
|
||||||
|
// debugger;
|
||||||
|
|
||||||
|
let requirementUI = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
requirementUI = JSON.parse(window.localStorage.getItem(REQUIREMRNT_UI));
|
||||||
|
}
|
||||||
|
catch (error)
|
||||||
|
{
|
||||||
|
console.log(`转换requirement-ui失败:${error}。`);
|
||||||
|
requirementUI = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
//如果之前不存在,json转换结果也会是null
|
||||||
|
if (requirementUI === null)
|
||||||
|
{
|
||||||
|
requirementUI = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
if (requirementUI.selected_status === undefined)
|
||||||
|
{
|
||||||
|
requirementUI.selected_status = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (requirementUI.title === undefined)
|
||||||
|
{
|
||||||
|
requirementUI.title = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (requirementUI.serial_no === undefined)
|
||||||
|
{
|
||||||
|
requirementUI.serial_no = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (requirementUI.request_people === undefined)
|
||||||
|
{
|
||||||
|
requirementUI.request_people = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (requirementUI.commit_start_date === undefined)
|
||||||
|
{
|
||||||
|
requirementUI.commit_start_date = new Date();
|
||||||
|
requirementUI.commit_start_date.setMonth(0);
|
||||||
|
requirementUI.commit_start_date.setDate(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (requirementUI.commit_end_date === undefined)
|
||||||
|
{
|
||||||
|
requirementUI.commit_end_date = new Date();
|
||||||
|
}
|
||||||
|
|
||||||
|
return requirementUI;
|
||||||
|
}
|
||||||
|
|
||||||
|
export { loadRequirementUI };
|