-
- {{this.ruleEngineInfo.ruleengine.level === "data-set" ? "选择资产集" : "选择资产记录"}}
-
-
-
-
+
+
+
+
@@ -282,6 +279,7 @@
import { details, versionsAdd, engineOnOff, statusOnOff, versionsUpd, ruleengine, loader } from '@/api/rule/maintenance'
import Encoding from "@/components/Encoding/index.vue";
import { information } from '@/api/dataSource/source'
+import { assetsList } from '@/api/accredit/auth'
export default {
name: "EngineVersion",
computed: {},
@@ -343,21 +341,24 @@ export default {
//表信息
dataModelList:[],
dataModeMapList:[],
+ keyList:[],
+ dataList:[],
+ dataModeMap:[],
}
},
created() {
this.initRuleEngine();
this.SourceList();
},
- watch:{
- "assetStructure":{
- handler(val){
- this.assetsList=[]
- console.log("assetStructure监听",val)
+ watch: {
+ "assetStructure": {
+ handler(val) {
+ this.assetsList = []
+ console.log("assetStructure监听", val)
this.assetStructureList.forEach(res => {
- console.log("循环的值",res)
- if (res.dataSource.accessSourceName === val){
- res.databaseTableInformationList.forEach(values=>{
+ console.log("循环的值", res)
+ if (res.dataSource.accessSourceName === val) {
+ res.databaseTableInformationList.forEach(values => {
if (res.dataSource.databaseName === values.databaseName) {
this.assetsList.push(values);
console.log(this.assetsList)
@@ -367,23 +368,30 @@ export default {
})
}
},
- "assets":{
- handler(val){
+ "assets": {
+ handler(val) {
console.log("assets监听",val)
+ this.keyList=[]
this.assetsList.forEach(res=>{
console.log("遍历",res)
if (res.name === val) {
-
console.log("过滤后的数据",res)
this.dataModelList = res.databaseTables
- console.log("表信息赋值完成",this.dataModelList)
- console.log(this.ruleEngineInfo.ruleengine.level)
+
+ this.dataModeMap.forEach(KeyValue=>{
+
+ if (KeyValue.tableName === res.name) {
+
+ this.dataModeMapList.push(KeyValue)
+ }
+ })
}
})
}
- }
+ },
},
methods: {
+
//测试
dataTest(){
let number = Math.floor(Math.random()*3);
@@ -588,6 +596,9 @@ public class ${this.engineVersionForm.versionCode} extends ${parentClass} {
this.assetStructureList=res.data
console.log("数据结构",this.assetStructureList)
})
+ assetsList().then(res=>{
+ this.dataModeMap=res.data
+ })
}
}