|
@@ -21,7 +21,7 @@
|
|
|
v-for="(item,index) in factorList" :key="index">
|
|
|
<span>
|
|
|
<i class="el-icon-arrow-right"></i>
|
|
|
- {{ item.name }}
|
|
|
+ {{ item.SeriesName }}
|
|
|
</span>
|
|
|
<span @click.stop="openAddDialog(item)" style="margin-left: auto;">
|
|
|
<img src="~@/assets/img/icons/edit_blue_new.png" alt="" style="width: 16px; height: 16px; margin-right: 5px">
|
|
@@ -95,9 +95,9 @@
|
|
|
<div class="dialog-content">
|
|
|
<!-- 选择指标 or 预测指标 -->
|
|
|
<div class="table-radio-wrap">
|
|
|
- <el-radio-group v-model="factorData.edbType" @input="changeEdbType">
|
|
|
- <el-radio label="1">ETA指标</el-radio>
|
|
|
- <el-radio label="2">预测指标</el-radio>
|
|
|
+ <el-radio-group v-model="factorData.EdbInfoType" @input="changeEdbType">
|
|
|
+ <el-radio :label="0">ETA指标</el-radio>
|
|
|
+ <el-radio :label="1">预测指标</el-radio>
|
|
|
</el-radio-group>
|
|
|
|
|
|
</div>
|
|
@@ -190,9 +190,10 @@
|
|
|
<script>
|
|
|
import batchSelectTable from './batchSelectTable'
|
|
|
import batchSelectFormula from './batchSelectFormula'
|
|
|
-import formMixin from './formMixin';
|
|
|
+import formMixin from './formMixin'
|
|
|
import { frequencySelectList } from '@/utils/defaultOptions'
|
|
|
-import { dataBaseInterface,departInterence } from '@/api/api.js';
|
|
|
+import { dataBaseInterface,departInterence } from '@/api/api.js'
|
|
|
+import * as preDictEdbInterface from "@/api/modules/predictEdbApi.js"
|
|
|
export default {
|
|
|
mixins:[formMixin],
|
|
|
components: { batchSelectTable, batchSelectFormula },
|
|
@@ -242,33 +243,33 @@ export default {
|
|
|
},
|
|
|
data(){
|
|
|
return {
|
|
|
- edbType:'1',
|
|
|
+ edbType:'0',
|
|
|
factorList:[
|
|
|
{
|
|
|
- "name":"7894567",
|
|
|
- "formulaList":[],
|
|
|
- "selectList":[
|
|
|
- {"EdbInfoId":104758,"EdbName":"7894567","EdbNameEn":"aaaa"},
|
|
|
- {"EdbInfoId":104845,"EdbName":"生成指标","EdbNameEn":"生成指标"}
|
|
|
+ "SeriesId": 4,
|
|
|
+ "SeriesName": "系列名称A001",
|
|
|
+ "EdbInfoType": 0, //0指标,1预测指标
|
|
|
+ "CalculateStep":[ //计算公式
|
|
|
+ {
|
|
|
+ "Formula": "",
|
|
|
+ "Calendar": "",
|
|
|
+ "Frequency": "",
|
|
|
+ "MoveType": 0,
|
|
|
+ "MoveFrequency": "",
|
|
|
+ "FromFrequency": "",
|
|
|
+ "Source": 3,
|
|
|
+ "Sort": 1
|
|
|
+ },
|
|
|
],
|
|
|
- "edbType":'1'
|
|
|
+ "EdbMappings":[],//所有的指标
|
|
|
},
|
|
|
- {
|
|
|
- "name":"美国10年通胀预期同比",
|
|
|
- "formulaList":[],
|
|
|
- "selectList":[
|
|
|
- {"EdbInfoId":104176,"EdbName":"美国10年通胀预期同比","EdbNameEn":"美国10年通胀预期同比"},
|
|
|
- {"EdbInfoId":104177,"EdbName":"天津螺纹价格同比","EdbNameEn":"天津螺纹价格同比"}
|
|
|
- ],
|
|
|
- "edbType":'2'
|
|
|
- }
|
|
|
- ], //mock用,之后替换成infoForm中表示因子系列的字段
|
|
|
+ ], //多因子系列列表
|
|
|
isAddFactorDialogShow:false,
|
|
|
factorData:{
|
|
|
- name:'',//因子系列名称
|
|
|
- formulaList:[],//因子系列计算公式
|
|
|
- selectList:[],//因子系列选择的指标
|
|
|
- edbType:'1',//选择的指标类型:1指标2预测指标
|
|
|
+ SeriesName:'',//因子系列名称
|
|
|
+ CalculateStep:[],//因子系列计算公式
|
|
|
+ EdbMappings:[],//因子系列选择的指标
|
|
|
+ EdbInfoType:0,//选择的指标类型:0指标1预测指标
|
|
|
},
|
|
|
tableData:[],
|
|
|
tableSelectParams:{
|
|
@@ -294,10 +295,8 @@ export default {
|
|
|
},
|
|
|
methods:{
|
|
|
openAddDialog(data){
|
|
|
- const {name='',formulaList=[],selectList=[],edbType='1'} = data
|
|
|
- this.factorData = {
|
|
|
- name,formulaList,selectList,edbType
|
|
|
- }
|
|
|
+ this.factorData = _.cloneDeep(data)
|
|
|
+ console.log('data?',data)
|
|
|
this.getClassifyOpt()
|
|
|
this.getSysUserOpt()
|
|
|
//清空筛选项
|
|
@@ -310,7 +309,7 @@ export default {
|
|
|
if(this.isAddFactorDialogShow){
|
|
|
console.log('change')
|
|
|
//若切换指标类型,清空选项
|
|
|
- this.factorData.selectList = []
|
|
|
+ this.factorData.EdbMappings = []
|
|
|
this.getClassifyOpt()
|
|
|
}
|
|
|
},
|
|
@@ -333,7 +332,9 @@ export default {
|
|
|
this.listCheckAllChange(false)
|
|
|
},
|
|
|
async getClassifyOpt(){
|
|
|
- const res=await dataBaseInterface.menuListV3()
|
|
|
+ const res= this.factorData.EdbInfoType===0
|
|
|
+ ?await dataBaseInterface.menuListV3()
|
|
|
+ :await preDictEdbInterface.classifyListV2()
|
|
|
if (res.Ret !== 200) return
|
|
|
|
|
|
const filterNodes = (arr)=>{
|
|
@@ -392,7 +393,8 @@ export default {
|
|
|
Keyword:keyword,
|
|
|
Frequency,
|
|
|
SelectAll:this.isSelectAll,
|
|
|
- EdbInfoIds:selectList.join(',')
|
|
|
+ EdbInfoIds:selectList.join(','),
|
|
|
+ EdbInfoType:Number(this.factorData.EdbInfoType||0)
|
|
|
})
|
|
|
if(res.Ret!==200) return
|
|
|
//去重
|
|
@@ -428,7 +430,8 @@ export default {
|
|
|
PageSize: this.tableParams.pageSize,
|
|
|
SysUserIds,ClassifyIds,Frequency,
|
|
|
Keyword:keyword,
|
|
|
- NotFrequency:''
|
|
|
+ NotFrequency:'',
|
|
|
+ EdbInfoType:Number(this.factorData.EdbInfoType||0)
|
|
|
})
|
|
|
this.tableLoading=false
|
|
|
if(res.Ret!==200) return
|
|
@@ -454,10 +457,10 @@ export default {
|
|
|
addFactorIndicators(){
|
|
|
//因子指标系列push
|
|
|
const selectData = this.$refs.batchSelectTable.selectData
|
|
|
- const {name,formulaList} = this.$refs.batchSelectFormula.formulaForm
|
|
|
+ const {SeriesName,CalculateStep} = this.$refs.batchSelectFormula.formulaForm
|
|
|
this.factorList.push({
|
|
|
- name,formulaList,
|
|
|
- selectList:selectData,
|
|
|
+ SeriesName,CalculateStep,
|
|
|
+ EdbMappings:selectData,
|
|
|
})
|
|
|
this.isAddFactorDialogShow = false
|
|
|
},
|