diff --git a/src/views/data/rule/engineVersion/index.vue b/src/views/data/rule/engineVersion/index.vue index 92763f9..76fa2e6 100644 --- a/src/views/data/rule/engineVersion/index.vue +++ b/src/views/data/rule/engineVersion/index.vue @@ -232,7 +232,7 @@
选择资产结构
- + - - {{ dataModeMap[_dataModel.name] }} + :label='_dataModel.name + "("+_dataModel.annotation+")"'> + + {{ value }} @@ -270,7 +270,7 @@ import Encoding from "@/components/Encoding/index.vue"; import {getEngineAndEngineVersion, updateEngineActivatedOrNot, updateEngineStatus} from "@/api/data/engine"; import {addEngineVersion, updateEngine} from "@/api/data/engineVersion"; -import {listAssetStructure, selectAssetSouructureTableList} from "@/api/data/structure"; +import {listAssetStructure, selectAssetSouructureTableList, tableDetailsValue} from "@/api/data/structure"; export default { name: "EngineVersion", @@ -297,109 +297,15 @@ export default { // 数据接入集合选择 assetStructure: null, // 数据资产 - assetsList: [ - { - name: "sys_user", - as: "用户表", - dataTotal: 635847, - type: "dataTable", - childrenList: [] - }, - { - name: "sys_dept", - as: "部门表", - dataTotal: 362548, - type: "dataTable", - childrenList: [] - }, - { - name: "sys_notice", - as: "通知公告", - dataTotal: 6347, - type: "dataTable", - childrenList: [] - } - ], + assetsList: [], // 数据资产选择 assets: null, + tableId: null, + dataSourceValueMap: null, // 数据模型 - dataModelList: [ - { - id: 1, - name: "id", - comment: "主键", - isPrimaryKey: "Y", - type: "bigint", - mappingType: "Long", - length: "-", - decimalPlaces: "-", - isNull: "N", - defaultValue: "-", - isDict: "N", - dictKey: "-", - }, { - id: 2, - name: "name", - comment: "姓名", - isPrimaryKey: "N", - type: "varchar", - mappingType: "String", - length: "64", - decimalPlaces: "-", - isNull: "N", - defaultValue: "-", - isDict: "N", - dictKey: "-", - }, { - id: 3, - name: "sex", - comment: "性别", - isPrimaryKey: "N", - type: "char", - mappingType: "String", - length: "1", - decimalPlaces: "-", - isNull: "N", - defaultValue: "-", - isDict: "Y", - dictKey: "system_sex", - }, { - id: 4, - name: "price", - comment: "金额", - isPrimaryKey: "N", - type: "double", - mappingType: "BigDecimal", - length: "10", - decimalPlaces: "2", - isNull: "N", - defaultValue: "0.00", - isDict: "N", - dictKey: "-", - }, { - id: 5, - name: "create_time", - comment: "创建时间", - isPrimaryKey: "N", - type: "datetime", - mappingType: "Date", - length: "-", - decimalPlaces: "-", - isNull: "Y", - defaultValue: "-", - isDict: "N", - dictKey: "-", - },], + dataModelList: [], // 数据模型选择 dataMode: null, - // 数据示例 - dataModeMap: { - id: 1, - name: "张三", - sex: 1, - price: "653.69", - create_time: "2024-5-7 16:37:16", - }, testResult: "", // 数据接入数量 assetStructureDataCount: { @@ -419,6 +325,17 @@ export default { this.initRuleEngine(); }, methods: { + changeAssets(row) { + this.tableId = row; + this.assetsList.forEach(item => { + if (item.id === row){ + this.dataModelList = item.assetTableDetailsList + } + }) + tableDetailsValue(row).then(response => { + this.dataSourceValueMap = response.data + }) + }, changeAssetStructure(row) { this.assets = null; this.assetsList = []; @@ -428,7 +345,6 @@ export default { // 将 API 返回的 data 属性赋值给 this.childrenList this.assetsList = response.data.tableDetailsRespList; - // 遍历 this.childrenList,为每个元素添加 type 属性,值为 "dataTable" this.assetsList.forEach((item) => { item.type = "dataTable"; @@ -436,8 +352,6 @@ export default { this.structureTableDataCount.tableCount = response.data.tableCount this.structureTableDataCount.tableDataCount = response.data.tableDataCount this.structureTableDataCount.childrenList = this.childrenList - console.log("aaaaaaaaa") - console.log(this.assetsList) }) }, saveCoding() {