浏览代码

Merge branch 'master' of http://8.136.199.33:3000/eta_front/eta_front

cxmo 1 年之前
父节点
当前提交
762bb64cfc

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

@@ -374,6 +374,14 @@ const dataBaseInterface = {
 		return http.post('/datamanage/edb_info/calculate/compute_correlation',params)
 	},
 
+	/**
+	 * 代码运算的sourceList
+	 * @param {*} params 
+	 */
+	getCodecountEdbSources: params => {
+		return http.get('/datamanage/edb_source/list/python')
+	},
+
 
 	//========================================chart
 	// /**

+ 25 - 12
src/views/dataEntry_manage/codecount/index.vue

@@ -82,7 +82,20 @@
 							label-width="100px"
 						>
 							<el-form-item label="数据来源">
-								<el-select 
+
+								<el-cascader
+								v-model="fromType"
+								:options="allFromArr"
+								:props="{
+									label: 'SourceName',
+									value: 'EdbSourceId',
+									children: 'Child',
+									emitPath: false
+								}"
+								clearable
+								style="width:220px"
+								placeholder="请选择来源"/>
+								<!-- <el-select 
 								v-model="fromType" 
 								placeholder="请选择来源"
 								style="width:220px">
@@ -92,7 +105,7 @@
 										:label="item.name"
 										:value="item.key">
 									</el-option>
-								</el-select>
+								</el-select> -->
 							</el-form-item>
 							<el-form-item label="指标名称/ID">
 								<el-select
@@ -152,7 +165,7 @@
 import { dataBaseInterface } from '@/api/api.js';
 import { unitArr } from '@/utils/defaultOptions';
 import storage from '@/utils/storage.js';
-import { allFromArr } from '../databaseComponents/util';
+// import { allFromArr } from '../databaseComponents/util';
 import codeMirror from './compoments/codeMirror';
 import dataTable from './compoments/dataTable';
 import { mapState } from 'vuex';
@@ -170,7 +183,7 @@ export default {
 			formData: {},
 			fromType:"",
 			unitArr,
-			allFromArr,//所有指标来源
+			allFromArr:[],//所有指标来源
 			frequencyArr:['日度','周度','旬度','月度','季度','年度'],
 			menuOptions:[],//目录数组
 
@@ -405,16 +418,16 @@ export default {
 			this.searchApi(this.current_search,++this.search_page);
 		},
 		getTargetSource(){
-			this.allFromArr = []
-			dataBaseInterface.getDataSource().then(res=>{
+			dataBaseInterface.getCodecountEdbSources().then(res=>{
 				if(res.Ret!==200) return
 				if(res.Data){
-					this.allFromArr = res.Data.map(i=>{
-						return {
-							name:i.SourceName,
-							key:i.EdbSourceId
-						}
-					})
+					this.allFromArr = res.Data.map(_ => ({
+						..._,
+						Child: _.Child.map(_item => ({
+							..._item,
+							Child:null
+						}))
+					}))
 				}
 			})
 		}

+ 2 - 2
src/views/predictEdb_manage/addPredicEdb.vue

@@ -605,8 +605,8 @@ export default {
             oldEdbName: res.Data.CalculateList[0].FromEdbName,
             edbName: EdbName,
             frequency: Frequency,
-            newdata: LatestValue,
-            lasetDate: LatestDate,
+            newdata:  res.Data.CalculateList[0].EndValue,
+            lasetDate: res.Data.CalculateList[0].EndDate,
             dateType: DataDateType
           };