diff --git a/ebts-ui/src/views/system/query/queryDate.vue b/ebts-ui/src/views/system/query/queryDate.vue
index c063fbe..bf4087c 100644
--- a/ebts-ui/src/views/system/query/queryDate.vue
+++ b/ebts-ui/src/views/system/query/queryDate.vue
@@ -60,23 +60,38 @@
-
-
-
- {{ parseDateOrTime(scope.row[item.prop]) }}
-
-
-
-
+
+
+
+ {{ parseDateOrTime(scope.row[item.prop]) }}
+
+
+ {{ dictFormat(item.dictType, scope.row[item.prop]) }}
+
+ {{ scope.row[item.prop] }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
{{ parseDateOrTime(scope.row[item.prop]) }}
-
-
-
-
+
+
+ {{ dictFormat(item.dictType, scope.row[item.prop]) }}
+
+ {{ scope.row[item.prop] }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -309,6 +326,7 @@ export default {
data: [],
header: []
},
+ dictTypeDataList:{},
rules: {
uqName: [{required: true, message: '请输入名称', trigger: 'blur'}],
uqDescribe: [{required: true, message: '请输入描述', trigger: 'blur'}]
@@ -337,9 +355,25 @@ export default {
mounted() {
},
methods: {
+ /**
+ * 字典渲染
+ * @param dictType
+ * @param data
+ * @returns {*}
+ */
+ dictFormat(dictType, data) {
+ return this.selectDictLabel(this.dictTypeDataList[dictType], data)
+ },
+ /**
+ * 字段信息列删除
+ * @param index
+ */
columnInfoDelete(index) {
this.columnInfo.list.splice(index, 1)
},
+ /**
+ * 重置字段信息
+ */
resetFieldExtract() {
this.columnInfo.list = []
this.previewDate.header = []
@@ -378,6 +412,7 @@ export default {
return
}
let columnList = []
+ this.columnInfo.list = []
this.previewDate.header.forEach(item => {
columnList.push({
prop: item.key,
@@ -475,15 +510,14 @@ export default {
})
},
/** 预览 */
- previewQuery() {
- this.$refs['elForm'].validate(valid => {
+ previewQuery(){
+ this.$refs['elForm'].validate( valid=>{
if (valid) {
let list = JSONString(this.columns)
let data = {
pageNum: this.queryParams.pageNum,
pageSize: this.queryParams.pageSize,
uqSql: this.info.uqSql
-
}
if (list.length > 0) {
if (this.changUniCon(list)) {
@@ -492,6 +526,17 @@ export default {
return
}
}
+ for (let i = 0; i < this.columnInfo.list.length; i++) {
+ let info = this.columnInfo.list[i]
+ if (info.dictType!=null){
+ this.getDicts(info.dictType).then(res=>{
+ this.dictTypeDataList[info.dictType] = res.data
+ })
+ }
+ }
+ /**
+ * 预览数据请求
+ */
previewQueryData(data).then(res => {
this.previewDate.data = res.rows
this.total = res.total
@@ -624,6 +669,7 @@ export default {
return
}
}
+ data.infoList = that.columnInfo.list
return exportMock(data)
}).then(response => {
that.columns = JSONParse(list)
diff --git a/ebts-ui/src/views/tool/top/topology.vue b/ebts-ui/src/views/tool/top/topology.vue
index a944f8c..e8f451f 100644
--- a/ebts-ui/src/views/tool/top/topology.vue
+++ b/ebts-ui/src/views/tool/top/topology.vue
@@ -196,22 +196,14 @@ export default {
},
methods: {
-
- // todo 异步请求问题 字典状态字典翻译
- dictFormat: async function(dictType, data) {
- console.log("请求开始",dictType, !this.dictTypeDataList[dictType])
- if (!this.dictTypeDataList[dictType]) {
- this.dictTypeDataList[dictType] = {}
- await this.getDicts(dictType).then(res => {
- this.dictTypeDataList[dictType] = res.data
- console.log("请求响应",res.data)
- console.log("数据集",this.dictTypeDataList)
- })
- }
- console.log('准备执行字段渲染',this.dictTypeDataList[dictType], data)
- let res = this.selectDictLabel(this.dictTypeDataList[dictType], data + '')
- console.log(res,"rses")
- return res;
+ /**
+ * 字典渲染
+ * @param dictType
+ * @param data
+ * @returns {*}
+ */
+ dictFormat(dictType, data) {
+ return this.selectDictLabel(this.dictTypeDataList[dictType], data)
},
/**
* 重置
@@ -297,11 +289,7 @@ export default {
isRelease: release
}
Release(data).then(res => {
- that.$router.replace('/tool/er-top')
- Message({
- message: res.msg,
- type: 'success'
- })
+ window.close()
})
})
},
@@ -338,6 +326,7 @@ export default {
id: this.topId
}
preview(data).then(res => {
+ this.dictTypeDataList = res.dictList
this.previewDate.data = res.rows
this.previewDate.total = res.total
this.previewDate.uconList = res.uconList
@@ -353,11 +342,6 @@ export default {
prop: info.prop,
dictType: info.dictType
})
- // if (info.dictType!=null){
- // this.getDicts(info.dictType).then(res => {
- // this.dictTypeDataList[info.dictType] = res.data
- // })
- // }
})
this.previewDate.title = this.baseData.uqName + '数据预览'
this.previewDate.open = true