Commit 4cbecf10 authored by tanyang's avatar tanyang

Merge branch 'master' into V20230915

# Conflicts:
#	dsk-operate-ui/.env.production
#	dsk-operate-ui/src/views/custom/customList/index.vue
#	pom.xml
parents 2a473681 14dd60c8
...@@ -61,6 +61,11 @@ ...@@ -61,6 +61,11 @@
<artifactId>dsk-biz-api</artifactId> <artifactId>dsk-biz-api</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.dsk</groupId>
<artifactId>dsk-biz-bi</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId> <artifactId>spring-boot-starter-test</artifactId>
...@@ -84,6 +89,7 @@ ...@@ -84,6 +89,7 @@
<!-- <version>${与你的agent探针版本保持一致}</version>--> <!-- <version>${与你的agent探针版本保持一致}</version>-->
<!-- </dependency>--> <!-- </dependency>-->
</dependencies> </dependencies>
<build> <build>
......
...@@ -140,7 +140,7 @@ security: ...@@ -140,7 +140,7 @@ security:
- /*/api-docs - /*/api-docs
- /*/api-docs/** - /*/api-docs/**
# actuator 监控配置 # actuator 监控配置
- /actuator - /api/**
- /actuator/** - /actuator/**
...@@ -300,3 +300,25 @@ management: ...@@ -300,3 +300,25 @@ management:
show-details: ALWAYS show-details: ALWAYS
logfile: logfile:
external-file: ./logs/sys-console.log external-file: ./logs/sys-console.log
gv:
img-path: D:\dsk\dsk-operate-sys\
#spring:
# datasource:
# type: com.alibaba.druid.pool.DruidDataSource
# druid:
# driver-class-name: com.mysql.cj.jdbc.Driver
# username: ${MYSQL_USER:root}
# password: ${MYSQL_PWD:root}
# url: jdbc:mysql://${MYSQL_HOST:pigx-mysql}:${MYSQL_PORT:3306}/${MYSQL_DB:pigxx_report}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true
# jpa:
# database-platform:
# org.hibernate.dialect.MySQL8Dialectsecurity:
# oauth2:
# client:
# ignore-urls:
# - /
# - /api/project/getData
# - /static/**
# - /api/project/get-file/*
# # 文件上传路径
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>dsk-module</artifactId>
<groupId>com.dsk</groupId>
<version>4.8.0</version>
</parent>
<groupId>com.dsk</groupId>
<artifactId>dsk-biz-bi</artifactId>
<name>dsk-biz-bi</name>
<description>BI数字大屏</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.dsk</groupId>
<artifactId>dsk-common</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<!-- ORM -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>${mybatis-plus.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<!-- hutool-core -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-core</artifactId>
</dependency>
<!-- hutool-core -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-json</artifactId>
</dependency>
<!-- hutool-http -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-http</artifactId>
</dependency>
<!-- hutool-extra -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-extra</artifactId>
</dependency>
<!--数据库-->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
</dependencies>
<!-- <build>-->
<!-- <plugins>-->
<!-- <plugin>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
<!-- <configuration>-->
<!-- <image>-->
<!-- <builder>paketobuildpacks/builder-jammy-base:latest</builder>-->
<!-- </image>-->
<!-- </configuration>-->
<!-- </plugin>-->
<!-- </plugins>-->
<!-- </build>-->
</project>
package com.dsk.biz.goview.common.base;
import cn.hutool.core.util.StrUtil;
import com.dsk.biz.goview.common.bean.AjaxResult;
import com.dsk.biz.goview.common.domain.ResultTable;
import org.springframework.beans.propertyeditors.CustomDateEditor;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* web层通用数据处理
*
* @author fuce
* @ClassName: BaseController
* @date 2018年8月18日
*/
public class BaseController {
/**
* 将前台传递过来的日期格式的字符串,自动转化为Date类型
*/
@InitBinder
public void initBinder(WebDataBinder binder) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
dateFormat.setLenient(false);
binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));
}
/**
* 响应返回结果
* @param rows 影响行数
* @return 操作结果
*/
protected AjaxResult toAjax(int rows) {
return rows > 0 ? success() : error();
}
/**
* 返回成功
*/
public AjaxResult success() {
return AjaxResult.success();
}
/**
* 返回失败消息
*/
public AjaxResult error() {
return AjaxResult.error();
}
/**
* 返回成功消息
*/
public AjaxResult success(String message) {
return AjaxResult.success(message);
}
/**
* 返回失败消息
*/
public AjaxResult error(String message) {
return AjaxResult.error(message);
}
/**
* 返回错误码消息
*/
public AjaxResult error(int code, String message) {
return AjaxResult.error(code, message);
}
/**
* 返回object数据
*/
public AjaxResult retobject(int code, Object data) {
return AjaxResult.successData(code, data);
}
/**
* 页面跳转
*/
public String redirect(String url) {
return StrUtil.format("redirect:{}", url);
}
/**
* Describe: 返回数据表格数据 分页 Param data Return 表格分页数据
*/
protected static ResultTable pageTable(Object data, long count) {
return ResultTable.pageTable(count, data);
}
/**
* Describe: 返回数据表格数据 Param data Return 表格分页数据
*/
protected static ResultTable dataTable(Object data) {
return ResultTable.dataTable(data);
}
/**
* Describe: 返回树状表格数据 分页 Param data Return 表格分页数据
*/
protected static ResultTable treeTable(Object data) {
return ResultTable.dataTable(data);
}
}
package com.dsk.biz.goview.common.base;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 抽象类BaseService
*
* @ClassName: BaseService
* @Description: Service实现这个
* @author fuce
* @date 2018年6月3日
*
*/
public interface BaseService<T, T2> {
int deleteByPrimaryKey(String id);
int insertSelective(T record);
T selectByPrimaryKey(String id);
int updateByPrimaryKeySelective(T record);
int updateByExampleSelective(@Param("record") T record, @Param("example") T2 example);
int updateByExample(@Param("record") T record, @Param("example") T2 example);
List<T> selectByExample(T2 example);
long countByExample(T2 example);
int deleteByExample(T2 example);
}
package com.dsk.biz.goview.common.bean;
import java.util.HashMap;
/**
* @ClassName: AjaxResult
* @Description: ajax操作消息提醒
* @author fuce
* @date 2018年8月18日
*
*/
public class AjaxResult extends HashMap<String, Object> {
private static final long serialVersionUID = 1L;
/**
* 初始化一个新创建的 Message 对象
*/
public AjaxResult() {
}
/**
* 返回错误消息
* @return 错误消息
*/
public static AjaxResult error() {
return error(500, "操作失败");
}
/**
* 返回错误消息
* @param msg 内容
* @return 错误消息
*/
public static AjaxResult error(String msg) {
return error(500, msg);
}
/**
* 返回错误消息
* @param code 错误码
* @param msg 内容
* @return 错误消息
*/
public static AjaxResult error(int code, String msg) {
AjaxResult json = new AjaxResult();
json.put("code", code);
json.put("msg", msg);
return json;
}
/**
* 返回成功消息
* @param msg 内容
* @return 成功消息
*/
public static AjaxResult success(String msg) {
AjaxResult json = new AjaxResult();
json.put("msg", msg);
json.put("code", 200);
return json;
}
/**
* 返回成功消息
* @param msg 内容
* @return 成功消息
*/
public static AjaxResult successNullData(String msg) {
AjaxResult json = new AjaxResult();
json.put("msg", msg);
json.put("data", null);
json.put("code", 200);
return json;
}
/**
* 返回成功消息
* @return 成功消息
*/
public static AjaxResult success() {
return AjaxResult.success("操作成功");
}
public static AjaxResult successData(int code, Object value) {
AjaxResult json = new AjaxResult();
json.put("code", code);
json.put("data", value);
return json;
}
/**
* 返回成功消息
* @param key 键值
* @param value 内容
* @return 成功消息
*/
@Override
public AjaxResult put(String key, Object value) {
super.put(key, value);
return this;
}
}
package com.dsk.biz.goview.common.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.io.Serializable;
import java.time.LocalDateTime;
@Data
@Entity
public class GoviewProject implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@TableId(type = IdType.ASSIGN_UUID)
private String id;
private String projectName;
private Integer state;
private LocalDateTime createTime;
private String createUserId;
private Integer isDelete;
private String indexImage;
private String remarks;
private Long tenantId;
@Transient
@TableField(exist = false)
private String content;
}
package com.dsk.biz.goview.common.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;
@Data
@Entity
public class GoviewProjectData implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@TableId(type = IdType.ASSIGN_UUID)
private String id;
private String projectId;
private LocalDateTime createTime;
private String createUserId;
private Long tenantId;
@Lob
@Basic(fetch = FetchType.LAZY)
@Column(columnDefinition = "TEXT")
private String content;
}
package com.dsk.biz.goview.common.domain;
import java.util.Map;
public class MagicHttp {
/**
* 请求url
*/
private String url;
/**
* 请求类型 get post
*/
private String requestType;
private Map<String, String> head;
private String body;
private Integer timeout;
private Map<String, Object> form;
private String cookie;
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getRequestType() {
return requestType;
}
public void setRequestType(String requestType) {
this.requestType = requestType;
}
public Map<String, String> getHead() {
return head;
}
public void setHead(Map<String, String> head) {
this.head = head;
}
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
public String getCookie() {
return cookie;
}
public void setCookie(String cookie) {
this.cookie = cookie;
}
public Integer getTimeout() {
return timeout;
}
public void setTimeout(Integer timeout) {
this.timeout = timeout;
}
public Map<String, Object> getForm() {
return form;
}
public void setForm(Map<String, Object> form) {
this.form = form;
}
}
package com.dsk.biz.goview.common.domain;
public class ResultTable {
/**
* 状态码
*/
private Integer code;
/**
* 提示消息
*/
private String msg;
/**
* 消息总量
*/
private Long count;
/**
* 数据对象
*/
private Object data;
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public Long getCount() {
return count;
}
public void setCount(Long count) {
this.count = count;
}
public Object getData() {
return data;
}
public void setData(Object data) {
this.data = data;
}
/**
* 构 建
*/
public static ResultTable pageTable(long count, Object data) {
ResultTable resultTable = new ResultTable();
resultTable.setData(data);
resultTable.setCode(0);
resultTable.setCount(count);
if (data != null) {
resultTable.setMsg("获取成功");
}
else {
resultTable.setMsg("获取失败");
}
return resultTable;
}
public static ResultTable dataTable(Object data) {
ResultTable resultTable = new ResultTable();
resultTable.setData(data);
resultTable.setCode(0);
if (data != null) {
resultTable.setMsg("获取成功");
}
else {
resultTable.setMsg("获取失败");
}
return resultTable;
}
}
package com.dsk.biz.goview.common.domain;
/**
* boostrap table post 参数
*
* @author fc
*
*/
public class Tablepar {
private int page;// 页码
private int limit;// 数量
private String orderByColumn;// 排序字段
private String isAsc;// 排序字符 asc desc
private String searchText;// 列表table里面的搜索
public int getPage() {
return page;
}
public void setPage(int page) {
this.page = page;
}
public int getLimit() {
return limit;
}
public void setLimit(int limit) {
this.limit = limit;
}
public String getOrderByColumn() {
return orderByColumn;
}
public void setOrderByColumn(String orderByColumn) {
this.orderByColumn = orderByColumn;
}
public String getIsAsc() {
return isAsc;
}
public void setIsAsc(String isAsc) {
this.isAsc = isAsc;
}
public String getSearchText() {
return searchText;
}
public void setSearchText(String searchText) {
this.searchText = searchText;
}
}
///*
// * Copyright (c) 2018-2025, lengleng All rights reserved.
// *
// * Redistribution and use in source and binary forms, with or without
// * modification, are permitted provided that the following conditions are met:
// *
// * Redistributions of source code must retain the above copyright notice,
// * this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// * notice, this list of conditions and the following disclaimer in the
// * documentation and/or other materials provided with the distribution.
// * Neither the name of the pig4cloud.com developer nor the names of its
// * contributors may be used to endorse or promote products derived from
// * this software without specific prior written permission.
// * Author: lengleng (wangiegie@gmail.com)
// */
//
//package com.dsk.biz.goview.config;
//
//import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler;
//import lombok.RequiredArgsConstructor;
//import lombok.extern.slf4j.Slf4j;
//import net.sf.jsqlparser.expression.Expression;
//import net.sf.jsqlparser.expression.LongValue;
//import net.sf.jsqlparser.expression.NullValue;
//
///**
// * @author lengleng
// * @date 2018-12-26
// * <p>
// * 租户维护处理器
// */
//@Slf4j
//@RequiredArgsConstructor
//public class DataVTenantHandler implements TenantLineHandler {
//
// /**
// * 获取租户 ID 值表达式,只支持单个 ID 值
// * <p>
// * @return 租户 ID 值表达式
// */
// @Override
// public Expression getTenantId() {
// Long tenantId = TenantContextHolder.getTenantId();
// log.debug("当前租户为 >> {}", tenantId);
//
// if (tenantId == null) {
// return new NullValue();
// }
// return new LongValue(tenantId);
// }
//
//}
package com.dsk.biz.goview.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
/**
* @author lengleng
* @date 2022/5/2
* <p>
* 数据大屏配置
*/
@Data
//@ConfigurationProperties("gv")
@Component
@ConfigurationProperties(prefix = "gv")
public class GoviewProperties {
/**
* 服务 http://IP:port
*/
private String host = "";
/**
* 路由前缀
*/
private String gatewayPrefix = "/api/gv";
/**
* 图片存放路径
*/
private String imgPath;
/**
* 项目 license
*/
private String license;
/**
* 是否开启检查更新
*/
private boolean checkUpdate = true;
}
///*
// * Copyright (c) 2020 pig4cloud Authors. All Rights Reserved.
// *
// * Licensed under the Apache License, Version 2.0 (the "License");
// * you may not use this file except in compliance with the License.
// * You may obtain a copy of the License at
// *
// * http://www.apache.org/licenses/LICENSE-2.0
// *
// * Unless required by applicable law or agreed to in writing, software
// * distributed under the License is distributed on an "AS IS" BASIS,
// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// * See the License for the specific language governing permissions and
// * limitations under the License.
// */
//
//package com.dsk.biz.goview.config;
//
//import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
//import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
//import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerInterceptor;
//import org.mybatis.spring.annotation.MapperScan;
//import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
//import org.springframework.boot.autoconfigure.domain.EntityScan;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
///**
// * @author lengleng
// * @date 2020-03-14
// * <p>
// * mybatis plus 统一配置
// */
//@Configuration(proxyBeanMethods = false)
//@MapperScan(basePackages = "io.springboot.plugin.goview.mapper")
//@EntityScan(basePackages = "io.springboot.plugin.goview.common.domain")
//public class MybatisAutoConfiguration {
//
// @Bean
// public TenantContextHolderFilter tenantContextHolderFilter() {
// return new TenantContextHolderFilter();
// }
//
// /**
// * 分页插件, 对于单一数据库类型来说,都建议配置该值,避免每次分页都去抓取数据库类型
// */
// @Bean
// @ConditionalOnMissingBean
// public MybatisPlusInterceptor mybatisPlusInterceptor() {
// MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
// interceptor.addInnerInterceptor(new TenantLineInnerInterceptor(new DataVTenantHandler()));
// interceptor.addInnerInterceptor(new PaginationInnerInterceptor());
// return interceptor;
// }
//
//}
package com.dsk.biz.goview.config;
import org.springframework.beans.factory.config.YamlPropertiesFactoryBean;
import org.springframework.core.env.PropertiesPropertySource;
import org.springframework.core.env.PropertySource;
import org.springframework.core.io.support.EncodedResource;
import org.springframework.core.io.support.PropertySourceFactory;
import org.springframework.lang.Nullable;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;
/**
* @author lengleng
* @date 2023/4/5
*/
public class YamlPropertySourceFactory implements PropertySourceFactory {
@Override
public PropertySource<?> createPropertySource(@Nullable String name, EncodedResource resource) throws IOException {
Properties propertiesFromYaml = loadYamlIntoProperties(resource);
String sourceName = name != null ? name : resource.getResource().getFilename();
return new PropertiesPropertySource(sourceName, propertiesFromYaml);
}
private Properties loadYamlIntoProperties(EncodedResource resource) throws FileNotFoundException {
try {
YamlPropertiesFactoryBean factory = new YamlPropertiesFactoryBean();
factory.setResources(resource.getResource());
factory.afterPropertiesSet();
return factory.getObject();
}
catch (IllegalStateException e) {
Throwable cause = e.getCause();
if (cause instanceof FileNotFoundException)
throw (FileNotFoundException) e.getCause();
throw e;
}
}
}
package com.dsk.biz.goview.controller;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.plugins.IgnoreStrategy;
import com.baomidou.mybatisplus.core.plugins.InterceptorIgnoreHelper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dsk.biz.goview.common.base.BaseController;
import com.dsk.biz.goview.common.bean.AjaxResult;
import com.dsk.biz.goview.common.domain.*;
import com.dsk.biz.goview.config.GoviewProperties;
import com.dsk.biz.goview.mapper.GoviewProjectDataMapper;
import com.dsk.biz.goview.mapper.GoviewProjectMapper;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.ContentDisposition;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.ui.ModelMap;
import org.springframework.util.FileCopyUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 项目表Controller
*
* @author fuce
* @ClassName: GoviewProjectController
* @date 2022-05-18 21:43:25
*/
@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/goview/project")
public class GoViewProjectAPIController extends BaseController {
private final GoviewProjectDataMapper projectDataMapper;
private final GoviewProjectMapper projectMapper;
private final GoviewProperties goviewProperties;
@GetMapping("/list")
public ResultTable list(Tablepar tablepar, GoviewProject goviewProject) {
Page page = new Page(tablepar.getPage(), tablepar.getLimit());
Page result = projectMapper.selectPage(page, Wrappers.query(goviewProject));
ResultTable resultTable = pageTable(result.getRecords(), result.getTotal());
resultTable.setCode(200);
return resultTable;
}
/**
* 新增保存
* @param
* @return
*/
@PostMapping("/create")
public AjaxResult add(@RequestBody GoviewProject goviewProject) {
projectMapper.insert(goviewProject);
return AjaxResult.successData(200, goviewProject).put("msg", "创建成功");
}
/**
* 项目表删除
* @param ids
* @return
*/
@DeleteMapping("/delete")
public AjaxResult delete(String ids) {
projectMapper.deleteById(ids);
return success();
}
@PostMapping("/edit")
public AjaxResult editSave(@RequestBody GoviewProject goviewProject) {
projectMapper.updateById(goviewProject);
return success();
}
@PostMapping("/rename")
public AjaxResult rename(@RequestBody GoviewProject goviewProject) {
projectMapper.updateById(goviewProject);
return success();
}
// 发布/取消项目状态
@PutMapping("/publish")
@ResponseBody
public AjaxResult updateVisible(@RequestBody GoviewProject goviewProject) {
projectMapper.updateById(goviewProject);
return success();
}
/**
* 获取项目存储数据
* @param id 项目id
* @param mmap
* @return
*/
@GetMapping("/getData")
public AjaxResult getData(String projectId, ModelMap map) {
InterceptorIgnoreHelper.handle(IgnoreStrategy.builder().tenantLine(true).build());
GoviewProject goviewProject = projectMapper.selectById(projectId);
if (goviewProject == null) {
return AjaxResult.successData(200, null).put("msg", "无数据");
}
List<GoviewProjectData> goviewProjectDataList = projectDataMapper
.selectList(Wrappers.<GoviewProjectData>lambdaQuery().eq(GoviewProjectData::getProjectId, projectId));
if (CollUtil.isNotEmpty(goviewProjectDataList)) {
goviewProject.setContent(goviewProjectDataList.get(0).getContent());
return AjaxResult.successData(200, goviewProject).put("msg", "获取成功");
}
return AjaxResult.successData(200, null).put("msg", "无数据");
}
@PostMapping("/save/data")
public AjaxResult saveData(GoviewProjectData data) {
boolean exists = projectDataMapper
.exists(Wrappers.<GoviewProjectData>lambdaQuery().eq(GoviewProjectData::getProjectId, data.getProjectId()));
if (exists) {
projectDataMapper.update(data,
Wrappers.<GoviewProjectData>lambdaQuery().eq(GoviewProjectData::getProjectId, data.getProjectId()));
}
else {
projectDataMapper.insert(data);
}
return AjaxResult.success("操作成功");
}
/**
* 模拟请求
* @return
*/
@PostMapping("/magicHttp")
public AjaxResult magicHttp(@RequestBody MagicHttp magicHttp) {
return AjaxResult.successNullData("参数异常为null");
}
/**
* 上传文件
* @param file 文件流对象
* @return
* @throws Exception
*/
@PostMapping("/upload")
@ResponseBody
public AjaxResult upload(@RequestBody MultipartFile object) throws IOException {
File dest = new File(goviewProperties.getImgPath() + object.getOriginalFilename());
object.transferTo(dest);
Map<String, String> map = new HashMap(4);
String url;
if (StrUtil.isNotBlank(goviewProperties.getHost())) {
url = goviewProperties.getHost() + goviewProperties.getGatewayPrefix() + "/api/project/get-file/"
+ object.getOriginalFilename();
}
else {
url = goviewProperties.getGatewayPrefix() + "/api/project/get-file/" + object.getOriginalFilename();
}
map.put("link", url);
return AjaxResult.successData(200, map);
}
/**
* 文件获取
* @param fileName 文件名
*/
@GetMapping("/get-file/{fileName}")
public ResponseEntity<byte[]> getFile(@PathVariable String fileName) {
HttpHeaders headers = new HttpHeaders();
// 通知浏览器以下载文件方式打开
ContentDisposition contentDisposition = ContentDisposition.builder("attachment").filename(fileName).build();
headers.setContentDisposition(contentDisposition);
try {
return new ResponseEntity<>(
FileCopyUtils.copyToByteArray(new File(goviewProperties.getImgPath() + fileName)), headers,
HttpStatus.OK);
}
catch (IOException e) {
log.warn(e.getLocalizedMessage());
}
return null;
}
}
package com.dsk.biz.goview.controller;
import cn.dev33.satoken.annotation.SaIgnore;
import com.dsk.biz.goview.common.bean.AjaxResult;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import static com.dsk.biz.goview.common.bean.AjaxResult.success;
/**
* @author lengleng
* @date 2022/5/21
*/
@Slf4j
@Controller
@RequestMapping
@RequiredArgsConstructor
public class GoviewPageController {
@SaIgnore
@GetMapping({ "/", "/chart/**", "/project/**" })
public String index() {
return "index";
}
@GetMapping("/api/goview/sys/getOssInfo")
@ResponseBody
public AjaxResult getOssInfo() {
return success();
}
}
package com.dsk.biz.goview.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsk.biz.goview.common.domain.GoviewProjectData;
import org.apache.ibatis.annotations.Mapper;
/**
* @author lengleng
* @date 2023/4/4
*/
@Mapper
public interface GoviewProjectDataMapper extends BaseMapper<GoviewProjectData> {
}
package com.dsk.biz.goview.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsk.biz.goview.common.domain.GoviewProject;
import org.apache.ibatis.annotations.Mapper;
/**
* @author lengleng
* @date 2023/4/4
*/
@Mapper
public interface GoviewProjectMapper extends BaseMapper<GoviewProject> {
}
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<script>self["MonacoEnvironment"] = (function (paths) {
return {
globalAPI: false,
getWorkerUrl : function (moduleId, label) {
var result = paths[label];
if (/^((http:)|(https:)|(file:)|(\/\/))/.test(result)) {
var currentUrl = String(window.location);
var currentOrigin = currentUrl.substr(0, currentUrl.length - window.location.hash.length - window.location.search.length - window.location.pathname.length);
if (result.substring(0, currentOrigin.length) !== currentOrigin) {
var js = '/*' + label + '*/importScripts("' + result + '");';
var blob = new Blob([js], { type: 'application/javascript' });
return URL.createObjectURL(blob);
}
}
return result;
}
};
})({
"editorWorkerService": "/api/gv/monacoeditorwork/editor.worker.bundle.js",
"typescript": "/api/gv/monacoeditorwork/ts.worker.bundle.js",
"json": "/api/gv/monacoeditorwork/json.worker.bundle.js",
"html": "/api/gv/monacoeditorwork/html.worker.bundle.js",
"javascript": "/api/gv/monacoeditorwork/ts.worker.bundle.js",
"handlebars": "/api/gv/monacoeditorwork/html.worker.bundle.js",
"razor": "/api/gv/monacoeditorwork/html.worker.bundle.js"
});</script>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="renderer" content="webkit" />
<meta name="description" content="GoView 是高效、高性能的拖拽式低代码数据可视化开发平台,将页面元素封装为基础组件,无需编写代码即可完成业务需求。">
<meta name="keywords" content="GoView,goview,低代码,可视化">
<meta name="author" content="奔跑的面条,面条">
<meta
name="viewport"
content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0"
/>
<link rel="icon" href="./favicon.ico" />
<title>GoView</title>
<script type="module" crossorigin src="/api/gv/static/js/index-ebdecea3.js"></script>
<link rel="stylesheet" href="/api/gv/static/css/index-9c2eb289.css">
</head>
<body>
<div id="appProvider" style="display: none;"></div>
<div id="app">
<div class="first-loading-wrp">
<div class="loading-wrp">
<span class="dot dot-spin"><i></i><i></i><i></i><i></i></span>
</div>
</div>
</div>
</body>
</html>
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<modules> <modules>
<module>dsk-biz-api</module> <module>dsk-biz-api</module>
<module>dsk-biz-bi</module>
</modules> </modules>
<build> <build>
......
...@@ -8,4 +8,4 @@ ENV = 'production' ...@@ -8,4 +8,4 @@ ENV = 'production'
VUE_APP_BASE_API = 'https://szhapi.jiansheku.com' VUE_APP_BASE_API = 'https://szhapi.jiansheku.com'
# 子系统地址 # 子系统地址
VUE_APP_SUB_SYSTEM_ADDRESS = "https://plug.jiansheku.com" VUE_APP_SUB_SYSTEM_ADDRESS = "https://plug.jiansheku.com"
\ No newline at end of file
...@@ -322,14 +322,14 @@ li { ...@@ -322,14 +322,14 @@ li {
.table-item { .table-item {
width: 100%; width: 100%;
.el-table { .el-table {
font-size: 13px; font-size: 14px;
color: #232323; color: #232323;
th { th {
font-size: 13px !important; font-size: 13px !important;
font-weight: 400 !important; font-weight: 400 !important;
} }
td { td {
font-size: 13px; font-size: 14px;
} }
.cell { .cell {
padding-right: 12px !important; padding-right: 12px !important;
......
...@@ -762,7 +762,7 @@ select { ...@@ -762,7 +762,7 @@ select {
.checkbox .el-checkbox__label { .checkbox .el-checkbox__label {
padding-left: 6px; padding-left: 6px;
color: #232323; color: #606266;
} }
.checkbox .checkbox-content .checkbox-content-qx { .checkbox .checkbox-content .checkbox-content-qx {
...@@ -1171,11 +1171,11 @@ select { ...@@ -1171,11 +1171,11 @@ select {
.table-item .el-table tr, .table-item .el-table tr,
.table-item .el-table td { .table-item .el-table td {
font-size: 13px; font-size: 14px;
} }
.table-item-jf .el-table tr, .table-item-jf .el-table tr,
.table-item-jf .el-table td { .table-item-jf .el-table td {
font-size: 13px; font-size: 14px;
} }
......
...@@ -145,7 +145,8 @@ ...@@ -145,7 +145,8 @@
} }
.el-table .el-dropdown, .el-icon-arrow-down { .el-table .el-dropdown, .el-icon-arrow-down {
font-size: 12px; color: #232323;
font-size: 14px;
} }
.el-tree-node__content > .el-checkbox { .el-tree-node__content > .el-checkbox {
......
...@@ -28,6 +28,7 @@ import Layout from '@/layout'; ...@@ -28,6 +28,7 @@ import Layout from '@/layout';
} }
*/ */
// 公共路由 // 公共路由
export const constantRoutes = [ export const constantRoutes = [
{ {
......
...@@ -377,6 +377,7 @@ export default { ...@@ -377,6 +377,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.part-container { .part-container {
padding: 0; padding: 0;
margin: 0 24px;
} }
.part-main { .part-main {
margin-top: 12px; margin-top: 12px;
......
...@@ -842,7 +842,7 @@ export default { ...@@ -842,7 +842,7 @@ export default {
.el-checkbox-group { .el-checkbox-group {
.el-checkbox { .el-checkbox {
.el-checkbox__label { .el-checkbox__label {
color: #333333; color: #606266;
} }
&.is-checked { &.is-checked {
.el-checkbox__label { .el-checkbox__label {
......
...@@ -289,7 +289,6 @@ ...@@ -289,7 +289,6 @@
import skeleton from '../component/skeleton' import skeleton from '../component/skeleton'
import dataRegion from '@/assets/json/dataRegion' import dataRegion from '@/assets/json/dataRegion'
import api from '@/api/enterpriseData/enterpriseData.js'; import api from '@/api/enterpriseData/enterpriseData.js';
import elementResizeDetectorMaker from "element-resize-detector"
import { uipGroupData,urbanInvestmentPage,urbanInvestmentStatistics,claim,location,customerStatus,historyClaim } from '@/api/macro/macro' import { uipGroupData,urbanInvestmentPage,urbanInvestmentStatistics,claim,location,customerStatus,historyClaim } from '@/api/macro/macro'
import { infoHeader } from '@/api/detail/party-a/index' import { infoHeader } from '@/api/detail/party-a/index'
import Region from '../component/region' import Region from '../component/region'
......
...@@ -93,8 +93,8 @@ ...@@ -93,8 +93,8 @@
<el-checkbox v-if="index<showNum" :label="item" :key="index">{{item}}</el-checkbox> <el-checkbox v-if="index<showNum" :label="item" :key="index">{{item}}</el-checkbox>
</template> </template>
</el-checkbox-group> </el-checkbox-group>
<span class="more" v-if="showNum==10" @click="showNum=99">更多<img src="@/assets/images/more.png" alt=""></span> <!--<span class="more" v-if="showNum==10" @click="showNum=99">更多<img src="@/assets/images/more.png" alt=""></span>-->
<span class="more more1" v-if="showNum==99" @click="showNum=10">收起<img src="@/assets/images/more.png" alt=""></span> <!--<span class="more more1" v-if="showNum==99" @click="showNum=10">收起<img src="@/assets/images/more.png" alt=""></span>-->
</div> </div>
</div> </div>
<div class="content_item content_item_padding0"> <div class="content_item content_item_padding0">
...@@ -811,6 +811,9 @@ export default { ...@@ -811,6 +811,9 @@ export default {
.ename_input { .ename_input {
width: 240px; width: 240px;
margin-right: 20px; margin-right: 20px;
::v-deep .el-input__inner::placeholder {
color: rgba(35, 35, 35, 0.2) !important;
}
} }
.keyword_checkbox { .keyword_checkbox {
margin-top: 6px; margin-top: 6px;
...@@ -819,7 +822,7 @@ export default { ...@@ -819,7 +822,7 @@ export default {
display: inline-block; display: inline-block;
} }
.checkbox_1122 { .checkbox_1122 {
width: 1122px; /*width: 1122px;*/
margin-right: 6px; margin-right: 6px;
} }
.el-checkbox { .el-checkbox {
......
...@@ -48,9 +48,6 @@ ...@@ -48,9 +48,6 @@
<aws-java-sdk-s3.version>1.12.400</aws-java-sdk-s3.version> <aws-java-sdk-s3.version>1.12.400</aws-java-sdk-s3.version>
<!-- SMS 配置 --> <!-- SMS 配置 -->
<sms4j.version>2.2.0</sms4j.version> <sms4j.version>2.2.0</sms4j.version>
<!--中文转拼音-->
<pinyin4j.version>2.5.1</pinyin4j.version>
</properties> </properties>
<profiles> <profiles>
...@@ -334,6 +331,12 @@ ...@@ -334,6 +331,12 @@
<version>${pinyin4j.version}</version> <version>${pinyin4j.version}</version>
</dependency> </dependency>
<dependency>
<groupId>com.dsk</groupId>
<artifactId>dsk-biz-bi</artifactId>
<version>${dsk-operate-sys.version}</version>
</dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment