From fa31eccae026fbbec5a63377201fd1a2666394a0 Mon Sep 17 00:00:00 2001 From: chao <3072464591@QQ.com> Date: Wed, 8 May 2024 21:47:10 +0800 Subject: [PATCH] =?UTF-8?q?feat()=20=E8=A7=84=E5=88=99=E7=BB=B4=E6=8A=A4?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2,=E9=80=89=E6=8B=A9=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=8E=A5=E5=85=A5=20=E9=80=89=E6=8B=A9=E8=B5=84=E4=BA=A7?= =?UTF-8?q?=E7=BB=93=E6=9E=84=20=E9=80=89=E6=8B=A9=E8=B5=84=E4=BA=A7?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/data/rule/engineVersion/index.vue | 126 ++++---------------- 1 file changed, 20 insertions(+), 106 deletions(-) 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() {