2023-09-12更新

master
RENCHAO 1 year ago
parent 997069ffac
commit f6c4b651ce

@ -69,6 +69,26 @@
<groupId>org.apache.zookeeper</groupId> <groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId> <artifactId>zookeeper</artifactId>
</exclusion> </exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.hive</groupId>
<artifactId>hive-llap-server</artifactId>
</exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
</dependencies> </dependencies>

@ -0,0 +1,5 @@
# 日志配置
logging:
level:
com.jiuyv.sptccc.agile: debug
org.springframework: warn

@ -17,13 +17,22 @@
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>
</dependency> </dependency>
<!--eureka-client-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.hive/hive-jdbc --> <!-- https://mvnrepository.com/artifact/org.apache.hive/hive-jdbc -->
<dependency> <dependency>
<groupId>org.apache.hive</groupId> <groupId>org.apache.hive</groupId>
<artifactId>hive-jdbc</artifactId> <artifactId>hive-jdbc</artifactId>
<version>3.1.2</version> <version>3.1.2</version>
<exclusions> <exclusions>
<exclusion>
<groupId>org.apache.hive</groupId>
<artifactId>hive-llap-server</artifactId>
</exclusion>
<exclusion> <exclusion>
<groupId>org.apache.hbase</groupId> <groupId>org.apache.hbase</groupId>
<artifactId>hbase-server</artifactId> <artifactId>hbase-server</artifactId>
@ -44,7 +53,6 @@
<groupId>org.apache.hive</groupId> <groupId>org.apache.hive</groupId>
<artifactId>hive-metastore</artifactId> <artifactId>hive-metastore</artifactId>
</exclusion> </exclusion>
<exclusion> <exclusion>
<groupId>org.mortbay.jetty</groupId> <groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId> <artifactId>jetty</artifactId>
@ -57,8 +65,49 @@
<groupId>org.apache.zookeeper</groupId> <groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId> <artifactId>zookeeper</artifactId>
</exclusion> </exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<!-- json logstash encoder -->
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
<version>6.4</version>
</dependency>
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.1.1.RELEASE</version>
</plugin>
</plugins>
</build>
</project> </project>

@ -0,0 +1,50 @@
package com.jiuyv.sptcc.agile.batch;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
@EnableDiscoveryClient
@SpringBootApplication
public class BatchDwsApplication {
public static void main(String[] args) {
SpringApplication.run(BatchDwsApplication.class, args);
// HiveServer2的JDBC连接URL
String hiveServerURL = "jdbc:hive2://172.16.12.101:10000/hive;socketTimeout=12000;";
String hiveUser = "flink";
String hivePassword = "flink";
try {
// 加载Hive JDBC驱动程序
Class.forName("org.apache.hive.jdbc.HiveDriver");
// 连接到HiveServer2
Connection connection = DriverManager.getConnection(hiveServerURL, hiveUser, hivePassword);
// 执行Hive查询
String sql = "select * from student2";
PreparedStatement statement = connection.prepareStatement(sql);
ResultSet resultSet = statement.executeQuery();
// 处理查询结果
while (resultSet.next()) {
System.out.println(resultSet.getInt("id"));
System.out.println(resultSet.getString("name"));
}
// 关闭资源
resultSet.close();
statement.close();
connection.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}

@ -0,0 +1,24 @@
server:
port: 8081
spring:
application:
name: agile-batch-dws
# 日志配置
logging:
level:
com.jiuyv.sptccc.agile: debug
org.springframework: warn
eureka:
instance:
prefer-ip-address: true
client:
#是否将自己注册进EurekaServer默认为true。
register-with-eureka: true
#是否从EurekaServer抓取已有的注册信息默认为true。集群必须设置为true才能使用负载均衡
fetchRegistry: true
service-url:
defaultZone: http://172.16.12.107:8761/eureka/

@ -0,0 +1,134 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<!-- LOG目录 -->
<property name="LOG_HOME" value="logs"/>
<!-- JSON_LOG目录 -->
<property name="JSON_LOG_HOME" value="logs/jsonlog"/>
<!-- spring.application.name 作为参数 -->
<springProperty scope="context" name="APP_NAME" source="spring.application.name"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<target>System.out</target>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
<charset>UTF-8</charset>
</encoder>
</appender>
<!-- 按天压缩日志 -->
<appender name="ZIP_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_HOME}/${APP_NAME}.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/${APP_NAME}.log.%d{yyyy-MM-dd}.%i.log.zip</FileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 100MB -->
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>UTF-8</charset>
</encoder>
</appender>
<!-- 不压缩日志,保留7天 -->
<appender name="DEFAULT_INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/${APP_NAME}.log.%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<maxHistory>7</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 100MB -->
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>UTF-8</charset>
</encoder>
</appender>
<!-- LOGSTASH,输出seuleth项,保留7天 -->
<appender name="LOGSTASH" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${JSON_LOG_HOME}/${APP_NAME}.json.%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<maxHistory>7</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 100MB -->
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder">
<providers>
<pattern>
<pattern>
{
"timestamp": "%d{yyyy-MM-dd HH:mm:ss.SSS}",
"severity": "%level",
"service": "${APP_NAME:-}",
"trace": "%X{X-B3-TraceId:-}",
"span": "%X{X-B3-SpanId:-}",
"parent": "%X{X-B3-ParentSpanId:-}",
"exportable": "%X{X-Span-Export:-}",
"pid": "${PID:-}",
"thread": "%thread",
"class": "%logger{40}",
"rest": "%message"
}
</pattern>
</pattern>
</providers>
</encoder>
</appender>
<!-- 按天压缩Json日志 -->
<appender name="JSON_ZIP_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${JSON_LOG_HOME}/${APP_NAME}.json.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${JSON_LOG_HOME}/${APP_NAME}.log.%d{yyyy-MM-dd}.%i.json.log.zip</FileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 100MB -->
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder">
<providers>
<pattern>
<pattern>
{
"timestamp": "%d{yyyy-MM-dd HH:mm:ss.SSS}",
"severity": "%level",
"service": "${APP_NAME:-}",
"trace": "%X{X-B3-TraceId:-}",
"span": "%X{X-B3-SpanId:-}",
"parent": "%X{X-B3-ParentSpanId:-}",
"exportable": "%X{X-Span-Export:-}",
"pid": "${PID:-}",
"thread": "%thread",
"class": "%logger{40}",
"rest": "%message"
}
</pattern>
</pattern>
</providers>
</encoder>
</appender>
<appender name="STDERR" class="ch.qos.logback.core.ConsoleAppender">
<target>System.err</target>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<logger name="org.apache.http" level="error"/>
<root>
<level value="INFO"/>
<appender-ref ref="STDOUT"/>
<appender-ref ref="ZIP_FILE"/>
<appender-ref ref="DEFAULT_INFO_FILE"/>
<appender-ref ref="LOGSTASH"/>
<appender-ref ref="JSON_ZIP_FILE"/>
</root>
</configuration>

@ -22,6 +22,7 @@
<dependency> <dependency>
<groupId>org.mybatis.spring.boot</groupId> <groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId> <artifactId>mybatis-spring-boot-starter</artifactId>
<version>${mybatis-spring-boot.version}</version>
</dependency> </dependency>
<dependency> <dependency>

@ -3,6 +3,12 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.7</version>
<relativePath/>
</parent>
<groupId>com.jiuyv.sptcc.agile.batch</groupId> <groupId>com.jiuyv.sptcc.agile.batch</groupId>
<artifactId>agile-bacth</artifactId> <artifactId>agile-bacth</artifactId>
@ -23,9 +29,9 @@
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version> <maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
<maven.clean.version>3.1.0</maven.clean.version> <maven.clean.version>3.1.0</maven.clean.version>
<maven.resource.version>3.1.0</maven.resource.version> <maven.resource.version>3.1.0</maven.resource.version>
<spring.boot.version>2.6.7</spring.boot.version>
<hive.version>3.1.0</hive.version> <hive.version>3.1.0</hive.version>
<spring-cloud.version>2021.0.5</spring-cloud.version> <spring-cloud.version>2021.0.5</spring-cloud.version>
<mybatis-spring-boot.version>2.2.2</mybatis-spring-boot.version>
</properties> </properties>
@ -38,20 +44,6 @@
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>
<!-- SpringBoot的依赖配置 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.2.2</version>
</dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
@ -84,38 +76,7 @@
<updatePolicy>always</updatePolicy> <updatePolicy>always</updatePolicy>
</snapshots> </snapshots>
</repository> </repository>
<repository>
<id>jboss</id>
<name>jboss</name>
<url>http://repository.jboss.org/maven2/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>geotools</id>
<name>geotools</name>
<url>http://maven.geotools.fr/repository/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>jahia</id>
<name>jahia</name>
<url>http://maven.jahia.org/maven2/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>vars</id>
<name>vars</name>
<url>http://vars.sourceforge.net/maven2/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories> </repositories>
<pluginRepositories> <pluginRepositories>
<pluginRepository> <pluginRepository>

@ -64,6 +64,11 @@ public class PortalContentDTO implements Serializable {
*/ */
private String subtitle; private String subtitle;
/**
*
*/
private String imgUrl;
public void setContentId(Long contentId) public void setContentId(Long contentId)
{ {
this.contentId = contentId; this.contentId = contentId;
@ -204,4 +209,12 @@ public class PortalContentDTO implements Serializable {
public void setSubtitle(String subtitle) { public void setSubtitle(String subtitle) {
this.subtitle = subtitle; this.subtitle = subtitle;
} }
public String getImgUrl() {
return imgUrl;
}
public void setImgUrl(String imgUrl) {
this.imgUrl = imgUrl;
}
} }

@ -1 +1 @@
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>agile-portal-front</title><script defer="defer" src="static/js/chunk-vendors.af0892ba.js"></script><script defer="defer" src="static/js/app.df40209d.js"></script><link href="static/css/chunk-vendors.c5484ce7.css" rel="stylesheet"><link href="static/css/app.f161dd37.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but agile-portal-front doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html> <!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>agile-portal-front</title><script defer="defer" src="static/js/chunk-vendors.af0892ba.js"></script><script defer="defer" src="static/js/app.3b781528.js"></script><link href="static/css/chunk-vendors.c5484ce7.css" rel="stylesheet"><link href="static/css/app.38dbf364.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but agile-portal-front doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -61,6 +61,11 @@ public class TblPortalContent extends BaseEntity
*/ */
private String subtitle; private String subtitle;
/**
*
*/
private String imgUrl;
public void setContentId(Long contentId) public void setContentId(Long contentId)
{ {
this.contentId = contentId; this.contentId = contentId;
@ -193,4 +198,12 @@ public class TblPortalContent extends BaseEntity
public void setSubtitle(String subtitle) { public void setSubtitle(String subtitle) {
this.subtitle = subtitle; this.subtitle = subtitle;
} }
public String getImgUrl() {
return imgUrl;
}
public void setImgUrl(String imgUrl) {
this.imgUrl = imgUrl;
}
} }

@ -41,10 +41,10 @@ public class PortalContentServiceImpl implements IPortalContentService {
if (list instanceof Page) { if (list instanceof Page) {
Page<TblPortalContent> page = new Page<>(); Page<TblPortalContent> page = new Page<>();
page.setTotal(((Page<TblPortalContent>) list).getTotal()); page.setTotal(((Page<TblPortalContent>) list).getTotal());
page.addAll(list.stream().peek(this::handleUrl).collect(Collectors.toList())); page.addAll(handleListUrl(list));
return page; return page;
} }
return list.stream().peek(this::handleUrl).collect(Collectors.toList()); return handleListUrl(list);
} }
/** /**
@ -57,7 +57,9 @@ public class PortalContentServiceImpl implements IPortalContentService {
if (info == null) { if (info == null) {
throw new ServiceException("未查询到该条内容"); throw new ServiceException("未查询到该条内容");
} }
return handleUrl(info); info.setImgUrl(handleUrl(info.getImgUrl()));
info.setContentText(handleUrl(info.getContentText()));
return info;
} }
@Override @Override
@ -65,23 +67,34 @@ public class PortalContentServiceImpl implements IPortalContentService {
return fileService.getImage(FilenameUtils.getBaseName(imageName)); return fileService.getImage(FilenameUtils.getBaseName(imageName));
} }
/**
* Listurl
*
*/
private List<TblPortalContent> handleListUrl(List<TblPortalContent> list) {
return list.stream().peek(content -> {
content.setImgUrl(handleUrl(content.getImgUrl()));
content.setContentText(handleUrl(content.getContentText()));
}).collect(Collectors.toList());
}
/** /**
* url * url
* *
*/ */
private TblPortalContent handleUrl(TblPortalContent content) { private String handleUrl(String text) {
String text = content.getContentText(); if (text == null) {
if (text != null) { return null;
Matcher matcher = IMG_P.matcher(text); }
StringBuffer result = new StringBuffer(); Matcher matcher = IMG_P.matcher(text);
while (matcher.find()) { StringBuffer result = new StringBuffer();
String[] split = matcher.group().split("/"); while (matcher.find()) {
String uri = "content/images/" + split[split.length - 1]; String[] split = matcher.group().split("/");
matcher.appendReplacement(result, uri); String uri = "content/images/" + split[split.length - 1];
} matcher.appendReplacement(result, uri);
matcher.appendTail(result);
content.setContentText(result.toString());
} }
return content; matcher.appendTail(result);
return result.toString();
} }
} }

@ -21,8 +21,10 @@
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="updateByName" column="update_by_name" /> <result property="updateByName" column="update_by_name" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="sort" column="sort" />
<result property="showIndex" column="show_index" /> <result property="showIndex" column="show_index" />
<result property="subtitle" column="subtitle" /> <result property="subtitle" column="subtitle" />
<result property="imgUrl" column="img_url" />
</resultMap> </resultMap>
<sql id="selectTblPortalContentVo"> <sql id="selectTblPortalContentVo">
@ -42,8 +44,10 @@
update_by, update_by,
update_by_name, update_by_name,
update_time, update_time,
sort,
show_index, show_index,
subtitle subtitle,
img_url
from tbl_portal_content from tbl_portal_content
</sql> </sql>
@ -52,6 +56,7 @@
where data_status = '00' where data_status = '00'
and bus_status = '2' and bus_status = '2'
and show_type = #{showType} and show_type = #{showType}
order by sort asc, content_id desc
</select> </select>
<select id="selectInfoByContentId" resultMap="TblPortalContentResult"> <select id="selectInfoByContentId" resultMap="TblPortalContentResult">

@ -1 +1 @@
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>agile-portal-front</title><script defer="defer" src="static/js/chunk-vendors.af0892ba.js"></script><script defer="defer" src="static/js/app.df40209d.js"></script><link href="static/css/chunk-vendors.c5484ce7.css" rel="stylesheet"><link href="static/css/app.f161dd37.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but agile-portal-front doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html> <!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>agile-portal-front</title><script defer="defer" src="static/js/chunk-vendors.af0892ba.js"></script><script defer="defer" src="static/js/app.3b781528.js"></script><link href="static/css/chunk-vendors.c5484ce7.css" rel="stylesheet"><link href="static/css/app.38dbf364.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but agile-portal-front doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -6,7 +6,7 @@
<el-carousel height="35px" direction="vertical" :autoplay="true"> <el-carousel height="35px" direction="vertical" :autoplay="true">
<el-carousel-item v-for="item in listNews" :key="item.contentId"> <el-carousel-item v-for="item in listNews" :key="item.contentId">
<router-link :to="{ name: 'NewsDetail', params: { contentId: item.contentId } }" class="news-link"> <router-link :to="{ name: 'NewsDetail', params: { contentId: item.contentId } }" class="news-link">
<span>{{ item.contentTitle }} </span><b>{{ item.updateTime.slice(0, 9) }}</b> <span>{{ item.contentTitle }} </span><b>{{ item.updateTime.slice(0, 10) }}</b>
</router-link> </router-link>
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
@ -28,6 +28,14 @@ export default {
</script> </script>
<!-- Add "scoped" attribute to limit CSS to this component only --> <!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss">
.el-carousel__indicators--vertical {
right: 0;
top: 50%;
transform: translateY(-50%);
display: none;
}
</style>
<style scoped lang="scss"> <style scoped lang="scss">
.home-news { .home-news {
@ -82,6 +90,8 @@ export default {
} }
} }
.el-carousel--vertical { .el-carousel--vertical {
width: 100%; width: 100%;
height: 35px; height: 35px;

@ -4,7 +4,7 @@
<div class="left-box"> <div class="left-box">
<div class="logo-link"> <div class="logo-link">
<img src="@/assets/images/jiushi-logo.png" alt="久事logo"> <img src="@/assets/images/jiushi-logo.png" alt="久事logo">
<span class="title">大数据敏捷服务平台</span> <span class="title">久事大数据开放平台</span>
</div> </div>
<div class="links"> <div class="links">
<span class="title">服务热线电话</span> <span class="title">服务热线电话</span>

@ -2,7 +2,7 @@
<div class="top-nav" :class="topbg == '1' ? 'topbg' : ''" id="container"> <div class="top-nav" :class="topbg == '1' ? 'topbg' : ''" id="container">
<div class="containers"> <div class="containers">
<div class="logo"><router-link to="/"><img src="@/assets/images/jiushi-logo.png" alt="久事logo"><span <div class="logo"><router-link to="/"><img src="@/assets/images/jiushi-logo.png" alt="久事logo"><span
class="title">大数据敏捷服务平台</span></router-link> class="title">久事大数据开放平台</span></router-link>
</div> </div>
<div class="left-box" v-if="isShowMenu"> <div class="left-box" v-if="isShowMenu">
<div class="router-list"> <div class="router-list">
@ -75,7 +75,6 @@ export default {
// }, // },
topNavbg(val) { topNavbg(val) {
debugger
this.topbg = val this.topbg = val
}, },
logout() { logout() {

@ -2,7 +2,7 @@
* @Author: 1036896656@qq.com 1036896656@qq.com * @Author: 1036896656@qq.com 1036896656@qq.com
* @Date: 2023-08-04 11:13:12 * @Date: 2023-08-04 11:13:12
* @LastEditors: 1036896656@qq.com 1036896656@qq.com * @LastEditors: 1036896656@qq.com 1036896656@qq.com
* @LastEditTime: 2023-08-28 16:39:13 * @LastEditTime: 2023-09-11 13:37:13
* @FilePath: \agile-portal-ui\src\permission.js * @FilePath: \agile-portal-ui\src\permission.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
@ -17,7 +17,9 @@ NProgress.configure({ showSpinner: false }); // NProgress Configuration
const whiteList = [ const whiteList = [
"Index", "Index",
"products",
"DataProducts", "DataProducts",
"ProductsDetail",
"DataServiceGuide", "DataServiceGuide",
"ApiList", "ApiList",
"DataLaboratory", "DataLaboratory",

@ -3,6 +3,7 @@ import VueRouter from 'vue-router'
import ParentView from '@/components/ParentView' import ParentView from '@/components/ParentView'
import HomeView from '@/views/HomeView.vue' import HomeView from '@/views/HomeView.vue'
import DataProducts from '@/views/DataProducts.vue' import DataProducts from '@/views/DataProducts.vue'
import ProductsDetail from '@/views/ProductsDetail.vue'
import DataServiceGuide from '@/views/DataServiceGuide.vue' import DataServiceGuide from '@/views/DataServiceGuide.vue'
import introduce from '@/views/introduce.vue' import introduce from '@/views/introduce.vue'
import DataLaboratory from '@/views/DataLaboratory.vue' import DataLaboratory from '@/views/DataLaboratory.vue'
@ -133,12 +134,35 @@ const routes = [
hidden: false, hidden: false,
meta: { title: '首页' } meta: { title: '首页' }
}, },
// {
// path: 'products',
// component: DataProducts,
// name: 'DataProducts',
// hidden: false,
// meta: { title: '数据产品' }
// },
{ {
path: 'products', path: 'products',
component: DataProducts, component: ParentView,
name: 'DataProducts', redirect: 'products/productsList',
hidden: false, hidden: false,
meta: { title: '数据产品' } meta: { title: '数据产品' },
children: [
{
path: 'productsList',
component: DataProducts,
name: 'DataProducts',
hidden: false,
meta: { title: '数据产品' },
},
{
path: 'detail/:contentId(\\d+)',
component: ProductsDetail,
name: 'ProductsDetail',
hidden: false,
meta: { title: '产品详情' }
},
]
}, },
{ {
path: 'news', path: 'news',

@ -2,7 +2,7 @@
* @Author: 1036896656@qq.com 1036896656@qq.com * @Author: 1036896656@qq.com 1036896656@qq.com
* @Date: 2023-08-04 11:13:12 * @Date: 2023-08-04 11:13:12
* @LastEditors: 1036896656@qq.com 1036896656@qq.com * @LastEditors: 1036896656@qq.com 1036896656@qq.com
* @LastEditTime: 2023-09-07 18:05:29 * @LastEditTime: 2023-09-11 16:23:56
* @FilePath: \agile-portal-ui\src\views\DataProducts.vue * @FilePath: \agile-portal-ui\src\views\DataProducts.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
@ -15,15 +15,16 @@
</div> </div>
</div> </div>
<div class="inner-container"> <div class="inner-container">
<el-carousel :interval="5000" type="card" height="500px"> <el-carousel :interval="5000" type="card" height="360px">
<el-carousel-item v-for="item in carouselItems" :key="item.index"> <el-carousel-item v-for="item in carouselItems" :key="item.index">
<div class="medium"> <div class="medium">
<img :src="item.contentText" alt="" style="width: 100%;height: 100%;"> <router-link :to="{ name: 'ProductsDetail', params: { contentId: item.contentId } }" class="news-link">
<img :src="item.imgUrl" alt="" style="width: 100%;height: 100%;">
<div class="wrapper"> <div class="wrapper">
<h3 class="title">{{ item.contentTitle }}</h3> <span class="title">{{ item.contentTitle }}</span>
<p class="text">{{ item.subtitle }}</p> </div>
</div> </router-link>
</div> </div>
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
@ -50,9 +51,9 @@ export default {
getBanner() { getBanner() {
this.carouselItems = null this.carouselItems = null
dataProduct().then(res => { dataProduct().then(res => {
this.carouselItems = res.data this.carouselItems = res.data.slice(0, 5)
for (let i = 0; i < this.carouselItems.length; i++) { for (let i = 0; i < this.carouselItems.length; i++) {
this.carouselItems[i].contentText = process.env.VUE_APP_BASE_API + this.carouselItems[i].contentText this.carouselItems[i].imgUrl = process.env.VUE_APP_BASE_API + this.carouselItems[i].imgUrl
} }
@ -77,30 +78,22 @@ export default {
height: 100%; height: 100%;
.wrapper { .wrapper {
position: absolute; width: 100%;
top: 300px; height: 40px;
background: #E21512;
position: absolute;
z-index: 99;
display: none;
text-align: center; text-align: center;
height: 200px; color: #fff;
width: 90%; line-height: 40px;
padding: 0 5%; bottom: 0;
overflow: hidden; font-size: 20px;
background: rgba(255,255,255,0.16); font-weight: bold;
}
.title {
font-size: 18px;
text-align: center;
color: #fff;
line-height: 45px;
font-weight: 600;
border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}
.text {
font-size: 16px;
color: rgba(226, 226, 226, 0.79);
line-height: 30px;
}
&:hover .wrapper {
display: block;
} }
} }
</style> </style>

@ -4,7 +4,7 @@
<div class="swiper"> <div class="swiper">
<div class="swiper-wrapper"> <div class="swiper-wrapper">
<div class="swiper-slide" v-for="item in listBanner" :key="item.index"> <div class="swiper-slide" v-for="item in listBanner" :key="item.index">
<img :src="item.contentText" alt=""> <img :src="item.imgUrl" alt="">
<div class="slogan"> <div class="slogan">
<div class="wrapper"> <div class="wrapper">
<h3 class="title">{{ item.contentTitle }}</h3> <h3 class="title">{{ item.contentTitle }}</h3>
@ -20,7 +20,7 @@
<div class="home-content"> <div class="home-content">
<h2 class="title">大数据敏捷服务平台<span style="color:#EF4636 ;">为您提供</span></h2> <h2 class="title">久事大数据开放平台<span style="color:#EF4636 ;">为您提供</span></h2>
<div class="products-intr"> <div class="products-intr">
<ul> <ul>
<li> <li>
@ -28,7 +28,7 @@
<img src="@/assets/images/index-product-pic1.jpg" alt=""> <img src="@/assets/images/index-product-pic1.jpg" alt="">
<div class="text"> <div class="text">
<h3>数据产品</h3> <h3>数据产品</h3>
<div class="summary">Data Products数据产品是指把数据作为服务的产品使之成为数据服务</div> <div class="summary">已形成久事客流宝久事乘车宝等系列产品并上海数据交易所成功挂牌地面公交刷卡客流到站预报等数据可直接进行交易</div>
</div> </div>
</router-link> </router-link>
<span class="hovershow">数据产品</span> <span class="hovershow">数据产品</span>
@ -38,7 +38,7 @@
<img src="@/assets/images/index-product-pic2.jpg" alt=""> <img src="@/assets/images/index-product-pic2.jpg" alt="">
<div class="text"> <div class="text">
<h3>数据服务</h3> <h3>数据服务</h3>
<div class="summary">数据服务旨在为企业提供全面的数据服务及共享能力帮助企业统一管理面向内外部的API服务</div> <div class="summary">提供数据分析指标加工报告撰写等服务<br>提供API接口列表及接入指引</div>
</div> </div>
</router-link> </router-link>
<span class="hovershow">服务介绍</span> <span class="hovershow">服务介绍</span>
@ -48,7 +48,8 @@
<img src="@/assets/images/index-product-pic3.jpg" alt=""> <img src="@/assets/images/index-product-pic3.jpg" alt="">
<div class="text"> <div class="text">
<h3>数据实验室</h3> <h3>数据实验室</h3>
<div class="summary">面向企业科研机构提供数据资源数据分析工具和环境繁荣数字经济新模式新业态</div> <div class="summary">
为有交通卡细颗粒度数据如交易数据使用需求的用户提供一个安全独立便捷的环境用户可以在该环境中进行数据分析数据建模并导出分析成果数据进而解决明细数据不能出去但可以使用的问题</div>
</div> </div>
</router-link> </router-link>
<span class="hovershow">数据实验室</span> <span class="hovershow">数据实验室</span>
@ -57,7 +58,7 @@
</div> </div>
</div> </div>
<div class="case-content"> <div class="case-content">
<h2 class="title">产品服务<span style="color:#EF4636 ;">应用场景</span></h2> <h2 class="title">应用场景<span style="color:#EF4636 ;">数据产品</span></h2>
<div class="case-list"> <div class="case-list">
<div class="tab-title"> <div class="tab-title">
<ul> <ul>
@ -114,10 +115,10 @@ export default {
getBanner() { getBanner() {
this.listBanner = null this.listBanner = null
listBanner().then(res => { listBanner().then(res => {
this.listBanner = res.data this.listBanner = res.data.slice(0, 3)
this.initSwiper(); this.initSwiper();
for (let i = 0; i < this.listBanner.length; i++) { for (let i = 0; i < this.listBanner.length; i++) {
this.listBanner[i].contentText = process.env.VUE_APP_BASE_API + this.listBanner[i].contentText this.listBanner[i].imgUrl = process.env.VUE_APP_BASE_API + this.listBanner[i].imgUrl
} }
@ -135,12 +136,12 @@ export default {
}, },
getNewsList() { getNewsList() {
listNews().then(res => { listNews().then(res => {
this.listNews = res.rows this.listNews = res.rows.slice(0, 5)
}) })
}, },
getscenesList() { getscenesList() {
scenesList().then(res => { scenesList().then(res => {
this.sceneContent = res.data this.sceneContent = res.data.slice(0, 3)
}) })
}, },
@ -166,15 +167,16 @@ export default {
.slogan { .slogan {
position: relative; position: relative;
width: 100%; width: 1200px;
height: 100%; height: 100%;
left: 50%;
margin-left: -600px;
.wrapper { .wrapper {
padding-top: 110px; padding-top: 260px;
width: 1200px; width: 600px;
margin: 0 auto;
box-sizing: border-box; box-sizing: border-box;
padding-left: 140px; padding-left: 40px;
color: #fff; color: #fff;
.title { .title {
@ -203,6 +205,7 @@ export default {
} }
.home-banner { .home-banner {
width: 100%; width: 100%;
height: 700px; height: 700px;
@ -250,13 +253,15 @@ export default {
li { li {
width: 385px; width: 385px;
height: 306px; height: 350px;
margin-bottom: 76px; margin-bottom: 76px;
background: #fff; background: #fff;
transition: .3s ease-in-out; transition: 0.3s ease-in-out;
box-shadow: 0 12px 48px rgba(0, 0, 0, .05); box-shadow: 0 12px 48px rgba(0, 0, 0, 0.05);
transition-property: box-shadow transform; transition-property: box-shadow transform;
transition-duration: .25s, 1s; transition-duration: 0.25s, 1s;
padding-bottom: 20px;
position: relative;
&:hover { &:hover {
transform: translate(0, -10px); transform: translate(0, -10px);
@ -267,13 +272,13 @@ export default {
width: 100%; width: 100%;
height: 30px; height: 30px;
background: #E21512; background: #E21512;
position: relative; position: absolute;
z-index: 99; z-index: 99;
display: none; display: none;
text-align: center; text-align: center;
color: #fff; color: #fff;
line-height: 30px; line-height: 30px;
top: -20px; bottom: 0;
} }
&:hover span { &:hover span {

@ -1,31 +1,33 @@
<template> <template>
<div class="news-list-container container"> <div class="container">
<div class="wrapper"> <div class="news-list-container ">
<el-breadcrumb separator-class="el-icon-arrow-right"> <div class="wrapper">
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item> <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item>新闻中心</el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
</el-breadcrumb> <el-breadcrumb-item>新闻中心</el-breadcrumb-item>
<div class="content"> </el-breadcrumb>
<div class="titile">新闻中心</div> <div class="content">
<div class="list"> <div class="titile">新闻中心</div>
<ul v-if="listNews.length > 0"> <div class="list">
<li v-for="item in listNews" :key="item.contentId"><router-link <ul v-if="listNews.length > 0">
:to="{ name: 'NewsDetail', params: { contentId: item.contentId } }" class="news-link"><span>{{ <li v-for="item in listNews" :key="item.contentId"><router-link
item.contentTitle }}</span><b>{{ :to="{ name: 'NewsDetail', params: { contentId: item.contentId } }" class="news-link"><span>{{
item.contentTitle }}</span><b>{{
item.updateTime.slice(0, 9) }}</b></router-link></li> item.updateTime.slice(0, 9) }}</b></router-link></li>
</ul> </ul>
<ul v-else> <ul v-else>
<el-empty :image="empty" :image-size="400"></el-empty> <el-empty :image="empty" :image-size="400"></el-empty>
</ul> </ul>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" @pagination="getList" /> :limit.sync="queryParams.pageSize" @pagination="getList" />
</div>
</div> </div>
</div> </div>
</div>
</div>
</div> </div>
</template> </template>
@ -73,7 +75,7 @@ export default {
overflow: hidden; overflow: hidden;
.el-breadcrumb { .el-breadcrumb {
margin: 0 0 40px 0; margin: 0 0 20px 0;
} }
} }

@ -1,21 +1,22 @@
<template> <template>
<div class="news-detail-container container"> <div class="container">
<div class="wrapper"> <div class="news-detail-container container">
<el-breadcrumb separator-class="el-icon-arrow-right"> <div class="wrapper">
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item> <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/news/list' }">新闻中心</el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
<el-breadcrumb-item>详情</el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/news/list' }">新闻中心</el-breadcrumb-item>
</el-breadcrumb> <el-breadcrumb-item>详情</el-breadcrumb-item>
<div class="content"> </el-breadcrumb>
<div class="news-title">{{ detail.contentTitle }}</div> <div class="content">
<div class="news-upadate-time">{{ detail.updateTime }}</div> <div class="news-title">{{ detail.contentTitle }}</div>
<div v-html="detail.contentText" class="news-detail"> <div class="news-upadate-time">{{ detail.updateTime }}</div>
<div v-html="detail.contentText" class="news-detail">
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
@ -44,7 +45,34 @@ export default {
} }
} }
</script> </script>
<style lang="scss">
.news-detail {
color: #333;
padding: 40px 20px;
font-size: 14px;
line-height: 21px;
box-sizing: border-box;
p {
text-indent: 2em;
margin: 0;
line-height: 35px;
font-size: 16px;
img {
margin: 0 auto;
}
a {
color: #1890ff;
}
}
p.ql-align-center {
text-align: center;
}
}
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
.news-detail-container { .news-detail-container {
background: #F9F9F9; background: #F9F9F9;
@ -56,7 +84,7 @@ export default {
overflow: hidden; overflow: hidden;
.el-breadcrumb { .el-breadcrumb {
margin: 0 0 70px 0; margin: 0 0 20px 0;
} }
} }
@ -73,14 +101,14 @@ export default {
text-align: center; text-align: center;
height: 60px; height: 60px;
line-height: 60px; line-height: 60px;
font-size: 20px; font-size: 28px;
color: #000; color: #000;
} }
.news-upadate-time { .news-upadate-time {
font-size: 14px; font-size: 14px;
line-height: 14px; line-height: 14px;
padding: 40px 0; padding: 20px 0;
text-align: center; text-align: center;
color: #666; color: #666;
border-bottom: 1px solid #D8D8D8; border-bottom: 1px solid #D8D8D8;

@ -0,0 +1,122 @@
<template>
<div class="container">
<div class="news-detail-container container">
<div class="wrapper">
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
<el-breadcrumb-item :to="{ path: '/products' }">数据产品</el-breadcrumb-item>
<el-breadcrumb-item>详情</el-breadcrumb-item>
</el-breadcrumb>
<div class="content">
<div class="news-title">{{ detail.contentTitle }}</div>
<div class="news-upadate-time">{{ detail.updateTime }}</div>
<div v-html="detail.contentText" class="news-detail">
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { contentInfo } from "@/api/homeView";
export default {
name: "NewsDetail",
data() {
return {
detail: {}
}
},
computed: {
},
created() {
var id = this.$route.params.contentId
this.getDetail(id)
},
methods: {
getDetail(id) {
contentInfo(id).then(res => {
this.detail = res.data
})
}
}
}
</script>
<style lang="scss">
.news-detail {
color: #333;
padding: 40px 20px;
font-size: 14px;
line-height: 21px;
box-sizing: border-box;
p {
text-indent: 2em;
margin: 0;
line-height: 35px;
font-size: 16px;
img {
margin: 0 auto;
}
}
p.ql-align-center {
text-align: center;
}
}
</style>
<style lang="scss" scoped>
.news-detail-container {
background: #F9F9F9;
padding: 40px 0;
.wrapper {
width: 1200px;
margin: 0 auto;
overflow: hidden;
.el-breadcrumb {
margin: 0 0 20px 0;
}
}
.content {
width: 1110px;
padding: 40px 68px;
box-sizing: border-box;
min-height: 400px;
margin: 0 auto;
background: #fff;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .06);
.news-title {
text-align: center;
height: 60px;
line-height: 60px;
font-size: 28px;
color: #000;
}
.news-upadate-time {
font-size: 14px;
line-height: 14px;
padding: 20px 0;
text-align: center;
color: #666;
border-bottom: 1px solid #D8D8D8;
}
.news-detail {
color: #333;
padding: 40px 20px;
font-size: 14px;
line-height: 21px;
box-sizing: border-box;
}
}
}
</style>

@ -2,7 +2,7 @@
<div class="login-container"> <div class="login-container">
<div class="login-top"> <div class="login-top">
<div class="logo"><router-link to="/"><img src="@/assets/images/jiushi-logo.png" alt="久事logo"><span <div class="logo"><router-link to="/"><img src="@/assets/images/jiushi-logo.png" alt="久事logo"><span
class="title">大数据敏捷服务平台</span></router-link> class="title">久事大数据开放平台</span></router-link>
</div> </div>
</div> </div>
<div class="left-pic"> <div class="left-pic">

Loading…
Cancel
Save