上线修改
This commit is contained in:
parent
ba7b2558fb
commit
f76fae0722
|
|
@ -49,6 +49,7 @@
|
||||||
<!--<el-button size="mini" @click="$parent.dagreLayoutHandler">层次</el-button>-->
|
<!--<el-button size="mini" @click="$parent.dagreLayoutHandler">层次</el-button>-->
|
||||||
<!--<el-button size="mini" @click="$parent.autoLayoutHandler">自动(old)</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: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" @click="$parent.changeModeHandler('preview')">返回</top-button>-->
|
||||||
<top-button size="mini" v-hasPermi="['top:edit']" @click="$parent.saveDataHandler">保存</top-button>
|
<top-button size="mini" v-hasPermi="['top:edit']" @click="$parent.saveDataHandler">保存</top-button>
|
||||||
|
|
|
||||||
|
|
@ -1417,6 +1417,10 @@ export default {
|
||||||
let graphData = this.getGraphData()
|
let graphData = this.getGraphData()
|
||||||
this.$emit('doPreview', graphData)
|
this.$emit('doPreview', graphData)
|
||||||
},
|
},
|
||||||
|
// 上线
|
||||||
|
searchOnLine(){
|
||||||
|
this.$emit('doOnLine')
|
||||||
|
},
|
||||||
// 保存函数
|
// 保存函数
|
||||||
saveDataHandler() {
|
saveDataHandler() {
|
||||||
let graphData = this.getGraphData()
|
let graphData = this.getGraphData()
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
@doChangeMode="doChangeMode"
|
@doChangeMode="doChangeMode"
|
||||||
@doSaveData="doSaveData"
|
@doSaveData="doSaveData"
|
||||||
@doPreview="doPreview"
|
@doPreview="doPreview"
|
||||||
|
@doOnLine="doOnLine"
|
||||||
>
|
>
|
||||||
</topology>
|
</topology>
|
||||||
<el-dialog :title="previewDate.title" width="1400px" :visible.sync="previewDate.open">
|
<el-dialog :title="previewDate.title" width="1400px" :visible.sync="previewDate.open">
|
||||||
|
|
@ -241,6 +242,16 @@ export default {
|
||||||
this.msgSuccess(res.msg)
|
this.msgSuccess(res.msg)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
doOnLine(){
|
||||||
|
this.$confirm('请确认top图结构无误并预览结果无误后上线?', "警告", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(function () {
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//预览
|
||||||
doPreview(graphData){
|
doPreview(graphData){
|
||||||
if (graphData.nodes&&graphData.nodes.length>0){
|
if (graphData.nodes&&graphData.nodes.length>0){
|
||||||
let data = {
|
let data = {
|
||||||
|
|
|
||||||
|
|
@ -106,8 +106,8 @@ spring:
|
||||||
redis:
|
redis:
|
||||||
# 地址
|
# 地址
|
||||||
# host: 114.215.82.135
|
# host: 114.215.82.135
|
||||||
host: 127.0.0.1
|
# host: 127.0.0.1
|
||||||
# host: 13.70.28.14
|
host: 13.70.28.14
|
||||||
# 端口,默认为6379
|
# 端口,默认为6379
|
||||||
port: 6379
|
port: 6379
|
||||||
# 密码
|
# 密码
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
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">
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>ebts</artifactId>
|
<artifactId>ebts</artifactId>
|
||||||
<groupId>com.ebts</groupId>
|
<groupId>com.ebts</groupId>1
|
||||||
<version>1.0.0</version>
|
1 <version>1.0.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取基本信息
|
* 获取基本信息
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,8 @@ public class UniQuery extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
private Integer isRelease;
|
private Integer isRelease;
|
||||||
|
|
||||||
|
private Integer isPreview;
|
||||||
|
|
||||||
private List<UniCon> uniCons;
|
private List<UniCon> uniCons;
|
||||||
|
|
||||||
private Integer pageNum;
|
private Integer pageNum;
|
||||||
|
|
@ -55,6 +57,15 @@ public class UniQuery extends BaseEntity {
|
||||||
return topJson;
|
return topJson;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Integer getIsPreview() {
|
||||||
|
return isPreview;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsPreview(Integer isPreview) {
|
||||||
|
this.isPreview = isPreview;
|
||||||
|
}
|
||||||
|
|
||||||
public void setTopJson(String topJson) {
|
public void setTopJson(String topJson) {
|
||||||
this.topJson = topJson;
|
this.topJson = topJson;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,4 +16,6 @@ public interface TopQueryService {
|
||||||
Map<String, Object> selectTopSearchTables();
|
Map<String, Object> selectTopSearchTables();
|
||||||
|
|
||||||
ServerResult<TopResult> preview(String jsonData, String id);
|
ServerResult<TopResult> preview(String jsonData, String id);
|
||||||
|
|
||||||
|
ServerResult<String> online(Long id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,7 @@ public class TopQueryServiceImpl implements TopQueryService {
|
||||||
UniQuery uniQuery = new UniQuery();
|
UniQuery uniQuery = new UniQuery();
|
||||||
uniQuery.setId(Long.valueOf(id));
|
uniQuery.setId(Long.valueOf(id));
|
||||||
uniQuery.setUqSql(sql.toString());
|
uniQuery.setUqSql(sql.toString());
|
||||||
|
uniQuery.setIsPreview(1);
|
||||||
List<UniCon> uniCons = uniQuery.getUniCons();
|
List<UniCon> uniCons = uniQuery.getUniCons();
|
||||||
for (TopNode node : topNodes) {
|
for (TopNode node : topNodes) {
|
||||||
JSONArray columns = node.getColumns();
|
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) {
|
void ParseSelectSQL(TopNode mainNode, List<TopNode> topNodes, StringBuilder selectSql, StringBuilder selectQuery) {
|
||||||
selectSql.append(mainNode.getTableSQL());
|
selectSql.append(mainNode.getTableSQL());
|
||||||
selectQuery.append(mainNode.getQuerySql());
|
selectQuery.append(mainNode.getQuerySql());
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,7 @@
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="uqName != null and uqName != ''">uq_name = #{uqName},</if>
|
<if test="uqName != null and uqName != ''">uq_name = #{uqName},</if>
|
||||||
<if test="uqSql != null">uq_sql = #{uqSql},</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="uqDescribe != null and uqDescribe != ''">uq_describe = #{uqDescribe},</if>
|
||||||
<if test="type != null and type != ''">type = #{type},</if>
|
<if test="type != null and type != ''">type = #{type},</if>
|
||||||
<if test="topJson != null and topJson != ''">top_json = #{topJson},</if>
|
<if test="topJson != null and topJson != ''">top_json = #{topJson},</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue