From 0b4392c9e8585f3ff92ae3c1338da82a6520169a Mon Sep 17 00:00:00 2001 From: rouchen <3133657697@qq.com> Date: Sun, 28 Apr 2024 22:10:22 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=95=B0=E6=8D=AE=E5=AD=97=E5=85=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/bes.js | 2 + src/api/kvt/kvt.js | 16 +++ src/main.js | 2 +- .../dashboard/OverallAssetStructure.vue | 131 ++++++------------ .../analysisData/dashboard/OverallAssets.vue | 21 ++- .../dashboard/OverallSpecificAssets.vue | 63 ++++++--- src/views/kvt/analysisData/index.vue | 44 +++--- 7 files changed, 143 insertions(+), 136 deletions(-) create mode 100644 src/api/bes.js diff --git a/src/api/bes.js b/src/api/bes.js new file mode 100644 index 0000000..2d6fbe9 --- /dev/null +++ b/src/api/bes.js @@ -0,0 +1,2 @@ +import Vue from 'vue'; +export default new Vue; diff --git a/src/api/kvt/kvt.js b/src/api/kvt/kvt.js index 2889487..f47d863 100644 --- a/src/api/kvt/kvt.js +++ b/src/api/kvt/kvt.js @@ -160,3 +160,19 @@ export function selectDictionaryTypeId(data) { data }) } +//修改 +export function utilAssetModel(data) { + return request({ + url: '/kvt/kvt/utilAssetModel', + method: 'post', + data + }) +} + +//查询数据的总个数 +export function overallDataStructure() { + return request({ + url: '/kvt/kvt/OverallDataStructure', + method: 'post' + }) +} diff --git a/src/main.js b/src/main.js index ad2e927..ade30df 100644 --- a/src/main.js +++ b/src/main.js @@ -1,6 +1,6 @@ import Vue from 'vue' import Cookies from 'js-cookie' -Vue.prototype.$EventBus = new Vue(); +Vue.prototype.$Eventstatus = new Vue(); import Element from 'element-ui' import './assets/styles/element-variables.scss' diff --git a/src/views/kvt/analysisData/dashboard/OverallAssetStructure.vue b/src/views/kvt/analysisData/dashboard/OverallAssetStructure.vue index 5b9acf2..d48b4ad 100644 --- a/src/views/kvt/analysisData/dashboard/OverallAssetStructure.vue +++ b/src/views/kvt/analysisData/dashboard/OverallAssetStructure.vue @@ -3,9 +3,7 @@
资产模型基本信息 - {{selectAll}}
- {{childrenMess}} {{childrenMess.name}} @@ -18,7 +16,7 @@
- {{selectData}}资产模型详细信息 + 资产模型详细信息
- - - + + + {{scope.row.dictKey}} @@ -77,8 +71,10 @@
+ + {{form}} @@ -149,28 +145,28 @@ + - - + + - - - + + + - @@ -180,13 +176,15 @@ import bus from '@/api/bus' import buss from '@/api/buss' import bues from '@/api/bues' +import { utilAssetModel } from '@/api/kvt/kvt' +import bes from '@/api/bes' export default { name: 'OverallAssetStructure', props: [ 'selectData', 'childrenMess', 'selectAll', - + 'dictName' ], data() { return { @@ -204,75 +202,22 @@ export default { // 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: "-", - // }, + // } ], form: {}, formStatus: false, - dictMap: { - "system_sex": [ - { label: '男', val: '1', isEdit: false }, - { label: '女', val: '2', isEdit: false }, - { label: '未知', val: '0', isEdit: false }, - ], - "system_y_n": [ - { label: '是', val: '1', isEdit: false }, - { label: '否', val: '0', isEdit: false } - ], - - } + dictMap: [], + // "system_sex": [ + // { label: '男', val: '1', isEdit: false }, + // { label: '女', val: '2', isEdit: false }, + // { label: '未知', val: '0', isEdit: false }, + // ], + // "system_y_n": [ + // { label: '是', val: '1', isEdit: false }, + // { label: '否', val: '0', isEdit: false } + // ], + dict: [], + thisDict:[] } }, created() { @@ -283,22 +228,34 @@ export default { this.$off('send',this.childrenMess ); this.$off('大头小头',this.selectData); }, + methods: { + utilAssetModel(from){ + utilAssetModel(from).then(res => { + this.$message.success(res.data) + }) + this.formStatus = false + }, + selectedChange(val){ + console.log(111,val) + this.thisDict=this.dictMap.filter(x=>x.id===val)[0].dictionaryTypes; + }, sendSelectAll(){ bus.$emit("sendSelecr", this. selectAll) }, ENEN(){ buss.$on('send',data => { this.childrenMess = data - console.log("childrenMess",this.childrenMess ) }) bues.$on('大头小头',(data) =>{ - console.log("大头小头",data) this.selectData = data - console.log("senddddd",this.selectData) + }) + bues.$on('ss',(data) =>{ + this.dictMap = data }) }, update(row) { + console.log("rrrrrrrrrrrrr",row) this.form = row; this.formStatus = true; } diff --git a/src/views/kvt/analysisData/dashboard/OverallAssets.vue b/src/views/kvt/analysisData/dashboard/OverallAssets.vue index a04dd2a..37c4d0a 100644 --- a/src/views/kvt/analysisData/dashboard/OverallAssets.vue +++ b/src/views/kvt/analysisData/dashboard/OverallAssets.vue @@ -13,7 +13,7 @@
数据接入
- + @@ -26,7 +26,7 @@
资产模型
- + @@ -39,7 +39,7 @@
数据模型
- + @@ -48,13 +48,28 @@ diff --git a/src/views/kvt/analysisData/index.vue b/src/views/kvt/analysisData/index.vue index d3ba62e..c5b6d52 100644 --- a/src/views/kvt/analysisData/index.vue +++ b/src/views/kvt/analysisData/index.vue @@ -17,8 +17,8 @@ - - + + @@ -33,7 +33,8 @@ import { selectChildAll, selectDataSource, selectDataStur, - selectDepartmen, selectDictionaryy + selectDepartmen, + selectDictionaryy } from '@/api/kvt/kvt' export default { @@ -64,11 +65,11 @@ export default { // } ], childrenMess:[ - { - name: "", - as: "", - dataTotal: 0 - } + // { + // name: "", + // as: "", + // dataTotal: 0 + // } ], showAssets: null, title: null, @@ -77,14 +78,15 @@ export default { dataStructure:[], childr:[], chir: [], - dictAddName: [] + dictAddName: [], + aa: 0, + } }, created() { this.selectDataSource() }, methods: { - selctChild(tableName){ // console.log("table",tableName) // selectChild(tableName).then(res =>{ @@ -100,31 +102,30 @@ export default { }, selectDataSource(){ selectDataSource().then(res=>{ - console.log("ressss",res) this.assetStructureList = res.data - console.log("wdesf",this.assetStructureList) + }) }, expandTable(node, resolve){ if (node.level === 0) return resolve(this.assetStructureList); const {data} = node; this.showAssets = data.type; - console.log("data",data) selectChildAll().then(res=>{ - console.log("resssssr",res) + console.log(res) this.chir = res.data }) + console.log(node) + selectDepartmen(node.data.databaseName).then(res=>{ + this.childrenList = res.data + }) if (data.type == 1){ - selectDepartmen(data.databaseName).then(res=>{ - console.log("res",res) - this.childrenList = res.data - }) - + this.aa=data.id console.log("55555555555555555",data) selectDictionaryy(data.id).then(res => { - console.log("rrrr",res) + + console.log("res",res) this.dictAddName = res.data }) } @@ -140,13 +141,12 @@ export default { this.showAssets = data.type; this.dataname= data.name, this.databaseNam= data.databaseName + console.log("dataname",data.name) selectChild(data.name).then(res =>{ - console.log("childrenList",res) this.childr=res.data }) selectDataStur(data.name).then(res=>{ - console.log("aaaaaa",res) this.dataStructure= res.data }) }