-
@@ -295,9 +295,11 @@ export default {
created() {
this.queryId = this.$route.params && this.$route.params.queryId
getQueryInfo(this.queryId).then(res => {
+ let data = res.data
this.columns = []
- this.info = res.data.info
- this.columns = JSONparse(res.data.list)
+ this.info = data.info
+ this.columnInfo.list = data.infoList
+ this.columns = JSONparse(data.list)
this.sqlConfig.coder.setValue(this.info.uqSql)
})
this.$nextTick(function() {
@@ -545,6 +547,7 @@ export default {
})
return
}
+ data.infoList = this.columnInfo.list
editQueryInfo(data).then(res => {
this.columns = JSONparse(list)
Message({
diff --git a/ebts-ui/src/views/tool/top/packages/topology/src/toolbar-edit.vue b/ebts-ui/src/views/tool/top/packages/topology/src/toolbar-edit.vue
index bba3420..e45383b 100644
--- a/ebts-ui/src/views/tool/top/packages/topology/src/toolbar-edit.vue
+++ b/ebts-ui/src/views/tool/top/packages/topology/src/toolbar-edit.vue
@@ -47,7 +47,7 @@
-
+
预览
上线
diff --git a/ebts-ui/src/views/tool/top/topology.vue b/ebts-ui/src/views/tool/top/topology.vue
index 0e6c147..a76a324 100644
--- a/ebts-ui/src/views/tool/top/topology.vue
+++ b/ebts-ui/src/views/tool/top/topology.vue
@@ -14,12 +14,14 @@
@doPreview="doPreview"
@doOnLine="doOnLine"
>
+
+ :label="item.ucName"
+ >
+ placeholder="选择日期时间"
+ >
-
+ :key="index"
+ :prop="item.prop"
+ />
{
+ this.topId = this.$route.params && this.$route.params.topId
+ getQuery(this.topId).then(res => {
this.baseData = res.data
- if (res.data.topJson){
+ if (res.data.topJson) {
this.graphData = JSON.parse(res.data.topJson)
- }else {
- this.graphData ={
- nodes:[],
- edges:[]
+ } else {
+ this.graphData = {
+ nodes: [],
+ edges: []
}
- }
+ }
let graphData = deepClone(this.graphData)
this.$refs.topology.initTopo(graphData)
this.randomChange()
})
- getTables().then(res =>{
+ getTables().then(res => {
this.nodeTypeList = res.data.tables
this.relationalMap = res.data.relationalMap
})
@@ -179,38 +184,35 @@ export default {
/** 导出按钮操作 */
handleExport() {
var that = this
- this.$confirm('是否确认导出查询数据项?', "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function () {
+ this.$confirm('是否确认导出查询数据项?', '警告', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(function() {
let data = {
- id:that.topId,
- uniCons:that.previewDate.uconList,
+ id: that.topId,
+ uniCons: that.previewDate.uconList
}
return exportReal(data)
}).then(response => {
- this.download(response.msg);
+ this.download(response.msg)
})
},
handleQuery() {
let data = {
id: this.topId,
pageNum: this.queryParams.pageNum,
- pageSize: this.queryParams.pageSize,
+ pageSize: this.queryParams.pageSize
}
data.uniCons = this.previewDate.uconList
+ //todo 需要修改
RealData(data).then(res => {
this.previewDate.data = res.rows
this.total = res.total
- this.previewDate.header = []
- for (const key in this.previewDate.data[0]) {
- this.previewDate.header.push(key)
- }
})
},
outPlaceholder(item) {
- return "请输入" + item.ucName
+ return '请输入' + item.ucName
},
doAutoRefresh(interval) {
if (interval === -1) {
@@ -235,46 +237,81 @@ export default {
},
doSaveData(graphData) {
let data = {
- id : this.topId,
- topJson:JSON.stringify(graphData)
+ id: this.topId,
+ topJson: JSON.stringify(graphData)
}
//todo 入库完成
- updateQuery(data).then(res =>{
+ updateQuery(data).then(res => {
this.msgSuccess(res.msg)
})
},
- doOnLine(){
- this.$confirm('请确认top图结构无误并预览结果无误后上线?', "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function () {
+ doOnLine() {
+ this.$confirm('请确认top图结构无误并预览结果无误后上线?', '警告', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(function() {
})
},
//预览
- doPreview(graphData){
- if (graphData.nodes&&graphData.nodes.length>0){
+ doPreview(graphData) {
+ if (graphData.nodes && graphData.nodes.length > 0) {
+ let nodeList = graphData.nodes
+ let edgeList = graphData.edges
+ let nodes = []
+ nodeList.forEach(node => {
+ nodes.push({
+ id: node.id,
+ label: node.label,
+ table: node.table,
+ columns: node.columns
+ })
+ })
+ let edges = []
+ edgeList.forEach(edge => {
+ edges.push({
+ id:edge.id,
+ label: edge.label,
+ source: edge.source,
+ target: edge.target,
+ appConfig: edge.appConfig
+ })
+ })
+
let data = {
- jsonData:JSON.stringify(graphData),
- id:this.topId
+ jsonData: JSON.stringify({
+ nodes: nodes,
+ edges: edges
+ }),
+ id: this.topId
}
- preview(data).then(res=>{
+ console.log({
+ nodes: nodes,
+ edges: edges
+ })
+ preview(data).then(res => {
this.previewDate.data = res.rows
this.previewDate.total = res.total
this.previewDate.uconList = res.uconList
- if (this.previewDate.uconList.length>0){
+ if (this.previewDate.uconList.length > 0) {
this.previewDate.showSearch = true
}
this.previewDate.header = []
- for (const key in this.previewDate.data[0]) {
- this.previewDate.header.push(key)
- }
- this.previewDate.title = this.baseData.uqName + "数据预览"
+ let infoList = res.infoList
+ infoList.forEach( info=>{
+ this.previewDate.header.push({
+ key: info.prop,
+ label: info.label,
+ prop: info.prop
+ })
+ })
+
+ this.previewDate.title = this.baseData.uqName + '数据预览'
this.previewDate.open = true
})
- }else {
- this.msgError("top数据有误,请再次检查")
+ } else {
+ this.msgError('top数据有误,请再次检查')
}
},
randomChange() {
From 6d7cf64700a192c4a57b56eee2e20bd3f9881232 Mon Sep 17 00:00:00 2001
From: clay <20932067@zju.edu.cn>
Date: Wed, 20 Jul 2022 19:57:28 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=AF=E5=8A=A8?=
=?UTF-8?q?=E4=BF=A1=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ebts-ui/README.md | 4 +++-
.../resources/{application-druid.yml => application-pro.yml} | 0
ebts/ebts-admin/src/main/resources/application.yml | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
rename ebts/ebts-admin/src/main/resources/{application-druid.yml => application-pro.yml} (100%)
diff --git a/ebts-ui/README.md b/ebts-ui/README.md
index 516af6b..dabb1a8 100644
--- a/ebts-ui/README.md
+++ b/ebts-ui/README.md
@@ -19,4 +19,6 @@ npm run build:stage
# 构建生产环境
npm run build:prod
```
-workflowe
\ No newline at end of file
+workflowe
+
+https://api.ebts.top/dev-api/
\ No newline at end of file
diff --git a/ebts/ebts-admin/src/main/resources/application-druid.yml b/ebts/ebts-admin/src/main/resources/application-pro.yml
similarity index 100%
rename from ebts/ebts-admin/src/main/resources/application-druid.yml
rename to ebts/ebts-admin/src/main/resources/application-pro.yml
diff --git a/ebts/ebts-admin/src/main/resources/application.yml b/ebts/ebts-admin/src/main/resources/application.yml
index df3dc15..f76b24c 100644
--- a/ebts/ebts-admin/src/main/resources/application.yml
+++ b/ebts/ebts-admin/src/main/resources/application.yml
@@ -72,7 +72,7 @@ logging:
# Spring配置
spring:
profiles:
- active: dev
+ active: pro
# 数据源配置
datasource:
type: com.alibaba.druid.pool.DruidDataSource