|
@@ -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
|
|
|
+ }))
|
|
|
+ }))
|
|
|
}
|
|
|
})
|
|
|
}
|