上线修改

This commit is contained in:
clay 2021-09-23 19:41:01 +08:00
parent ba7b2558fb
commit f76fae0722
10 changed files with 51 additions and 4 deletions

View File

@ -49,6 +49,7 @@
<!--<el-button size="mini" @click="$parent.dagreLayoutHandler">层次</el-button>-->
<!--<el-button size="mini" @click="$parent.autoLayoutHandler">自动old</el-button>-->
<el-button size="mini" v-hasPermi="['top:preview']" @click="$parent.searchPreview">预览</el-button>
<el-button size="mini" v-hasPermi="['top:online']" @click="$parent.searchOnLine">上线</el-button>
<!-- 返回到预览模式 -->
<!-- <top-button size="mini" @click="$parent.changeModeHandler('preview')">返回</top-button>-->
<top-button size="mini" v-hasPermi="['top:edit']" @click="$parent.saveDataHandler">保存</top-button>

View File

@ -1417,6 +1417,10 @@ export default {
let graphData = this.getGraphData()
this.$emit('doPreview', graphData)
},
// 线
searchOnLine(){
this.$emit('doOnLine')
},
//
saveDataHandler() {
let graphData = this.getGraphData()

View File

@ -12,6 +12,7 @@
@doChangeMode="doChangeMode"
@doSaveData="doSaveData"
@doPreview="doPreview"
@doOnLine="doOnLine"
>
</topology>
<el-dialog :title="previewDate.title" width="1400px" :visible.sync="previewDate.open">
@ -241,6 +242,16 @@ export default {
this.msgSuccess(res.msg)
})
},
doOnLine(){
this.$confirm('请确认top图结构无误并预览结果无误后上线?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function () {
})
},
//
doPreview(graphData){
if (graphData.nodes&&graphData.nodes.length>0){
let data = {

View File

@ -106,8 +106,8 @@ spring:
redis:
# 地址
# host: 114.215.82.135
host: 127.0.0.1
# host: 13.70.28.14
# host: 127.0.0.1
host: 13.70.28.14
# 端口默认为6379
port: 6379
# 密码

View File

@ -4,8 +4,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>ebts</artifactId>
<groupId>com.ebts</groupId>
<version>1.0.0</version>
<groupId>com.ebts</groupId>1
1 <version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -53,6 +53,17 @@ public class TopQueryController extends BaseController {
}
}
@GetMapping("/online/{id}")
public AjaxResult online(@PathVariable("id") Long id){
ServerResult ServerResult = queryService.updateQueryInfo(uniQuery);
if (ServerResult.isStart()) {
return AjaxResult.success(ServerResult.getData());
} else {
return AjaxResult.info(ServerResult.getMsg());
}
}
/**
* 获取基本信息
*

View File

@ -45,6 +45,8 @@ public class UniQuery extends BaseEntity {
*/
private Integer isRelease;
private Integer isPreview;
private List<UniCon> uniCons;
private Integer pageNum;
@ -55,6 +57,15 @@ public class UniQuery extends BaseEntity {
return topJson;
}
public Integer getIsPreview() {
return isPreview;
}
public void setIsPreview(Integer isPreview) {
this.isPreview = isPreview;
}
public void setTopJson(String topJson) {
this.topJson = topJson;
}

View File

@ -16,4 +16,6 @@ public interface TopQueryService {
Map<String, Object> selectTopSearchTables();
ServerResult<TopResult> preview(String jsonData, String id);
ServerResult<String> online(Long id);
}

View File

@ -117,6 +117,7 @@ public class TopQueryServiceImpl implements TopQueryService {
UniQuery uniQuery = new UniQuery();
uniQuery.setId(Long.valueOf(id));
uniQuery.setUqSql(sql.toString());
uniQuery.setIsPreview(1);
List<UniCon> uniCons = uniQuery.getUniCons();
for (TopNode node : topNodes) {
JSONArray columns = node.getColumns();
@ -150,6 +151,11 @@ public class TopQueryServiceImpl implements TopQueryService {
}
}
@Override
public ServerResult<String> online(Long id) {
return null;
}
void ParseSelectSQL(TopNode mainNode, List<TopNode> topNodes, StringBuilder selectSql, StringBuilder selectQuery) {
selectSql.append(mainNode.getTableSQL());
selectQuery.append(mainNode.getQuerySql());

View File

@ -64,6 +64,7 @@
<trim prefix="SET" suffixOverrides=",">
<if test="uqName != null and uqName != ''">uq_name = #{uqName},</if>
<if test="uqSql != null">uq_sql = #{uqSql},</if>
<if test="isPreview != null">is_preview = #{isPreview},</if>
<if test="uqDescribe != null and uqDescribe != ''">uq_describe = #{uqDescribe},</if>
<if test="type != null and type != ''">type = #{type},</if>
<if test="topJson != null and topJson != ''">top_json = #{topJson},</if>