Browse Source

指标来源改为接口获取

cxmo 1 year ago
parent
commit
395626782e

+ 7 - 0
src/api/modules/chartApi.js

@@ -855,6 +855,13 @@ const dataBaseInterface = {
 	getChartInfoById: params => {
 		return http.get('/datamanage/chart_info/detail/v2',params)
 	},
+	/**
+	 * 接口获取指标数据来源
+	 * @param params.IsBase
+	 */
+	getDataSource:(params)=>{
+		return http.get('datamanage/edb_source/list',params)
+	},
 	
 }
 

+ 15 - 0
src/views/dataEntry_manage/codecount/index.vue

@@ -404,10 +404,25 @@ export default {
 			if(!this.search_have_more) return;
 			this.searchApi(this.current_search,++this.search_page);
 		},
+		getTargetSource(){
+			this.allFromArr = []
+			dataBaseInterface.getDataSource({IsBase:1}).then(res=>{
+				if(res.Ret!==200) return
+				if(res.Data){
+					this.allFromArr = res.Data.map(i=>{
+						return {
+							name:i.SourceName,
+							key:i.EdbSourceId
+						}
+					})
+				}
+			})
+		}
 	},
 	mounted() {
 		this.getEdbInfo();
 		this.getMenu();
+		this.getTargetSource()
 	},
 }
 </script>

+ 12 - 0
src/views/dataEntry_manage/databaseComponents/addTargetDiaBase.vue

@@ -220,10 +220,22 @@ export default {
 			this.search_txt = '';
 			this.search_company_txt = '';
 			this.loading && this.loading.close();
+		},
+		getTargetSource(){
+			this.fromArr = []
+			dataBaseInterface.getDataSource({IsBase:1}).then(res=>{
+				if(res.Ret!==200) return
+				if(res.Data){
+					this.fromArr = res.Data.map(i=>{
+						return i.SourceName
+					})
+				}
+			})
 		}
 	},
 	created() { },
 	mounted() {
+		this.getTargetSource()
 	},
 }
 </script>

+ 15 - 0
src/views/dataEntry_manage/databaseComponents/updateDialog.vue

@@ -388,9 +388,24 @@ export default {
       this.init();
       this.$emit('cancel');
     },
+    getTargetSource(){
+        this.sourceArr = []
+        dataBaseInterface.getDataSource({IsBase:1}).then(res=>{
+            if(res.Ret!==200) return
+            if(res.Data){
+                this.sourceArr = res.Data.map(i=>{
+                    return {
+                        label:i.SourceName,
+                        value:i.EdbSourceId
+                    }
+                })
+            }
+        })
+    }
   },
   created() { },
   mounted() {
+      this.getTargetSource()
   },
 };
 </script>