|
@@ -15,7 +15,7 @@
|
|
<el-option v-for="item in fromArr" :key="item" :label="item" :value="item">
|
|
<el-option v-for="item in fromArr" :key="item" :label="item" :value="item">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
- <el-select v-model="fromDatabase" placeholder="请选择数据库" style="width:240px;margin-left:10px" @change="changeDatabase"
|
|
|
|
|
|
+ <el-select v-model="fromDatabase" placeholder="请选择数据库" style="width:240px;margin-left:10px"
|
|
:disabled="haveResult" v-if="hasDateSequence">
|
|
:disabled="haveResult" v-if="hasDateSequence">
|
|
<el-option v-for="item in databaseType" :key="item.value" :label="item.label" :value="item.value">
|
|
<el-option v-for="item in databaseType" :key="item.value" :label="item.label" :value="item.value">
|
|
</el-option>
|
|
</el-option>
|
|
@@ -36,9 +36,17 @@
|
|
<el-input placeholder="请输入证券代码,每次只查询一个证券代码" v-model.trim="securityCodeText" class="wsd-index-input"
|
|
<el-input placeholder="请输入证券代码,每次只查询一个证券代码" v-model.trim="securityCodeText" class="wsd-index-input"
|
|
@blur="codeInputBlur('security')" style="margin-bottom: 20px;"></el-input>
|
|
@blur="codeInputBlur('security')" style="margin-bottom: 20px;"></el-input>
|
|
<div class="wsd-index-code">
|
|
<div class="wsd-index-code">
|
|
- <el-input placeholder="请输入指标代码,多个指标代码用英文逗号分隔" v-model.trim="indexCodeText" class="wsd-index-input" @blur="codeInputBlur('index')"></el-input>
|
|
|
|
- <div class="index-code-hint">Wind金融终端输入“CG”会弹出代码生成器,可在代码生成器上获取其他指标的代码</div>
|
|
|
|
|
|
+ <el-input placeholder="请输入指标代码,多个指标代码用英文逗号分隔" v-model.trim="indexCodeText"
|
|
|
|
+ class="wsd-index-input" @blur="codeInputBlur('index')"></el-input>
|
|
|
|
+ <div class="index-code-hint">
|
|
|
|
+ {{ indexCodeHintText }}
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <el-select v-model="THSIndexCodeType" placeholder="请选择常用指标类型" v-if="fromType=='同花顺'"
|
|
|
|
+ @change="THSIndexCodeTypeChange" style="margin-bottom: 15px;" class="wsd-index-input">
|
|
|
|
+ <el-option :label="item.label" :value="item.value"
|
|
|
|
+ v-for="item in THSIndexCodeTypeArr" :key="item.value"></el-option>
|
|
|
|
+ </el-select>
|
|
<el-checkbox-group v-model="indexCodeSelected">
|
|
<el-checkbox-group v-model="indexCodeSelected">
|
|
<el-checkbox :label="item.value" v-for="item in indexCodeArr" :key="item.value">{{ item.label }}</el-checkbox>
|
|
<el-checkbox :label="item.value" v-for="item in indexCodeArr" :key="item.value">{{ item.label }}</el-checkbox>
|
|
</el-checkbox-group>
|
|
</el-checkbox-group>
|
|
@@ -181,7 +189,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { dataBaseInterface,dataInterence } from '@/api/api.js'
|
|
import { dataBaseInterface,dataInterence } from '@/api/api.js'
|
|
-import { fromArr, fromCode ,frequencyArr} from './util';
|
|
|
|
|
|
+import { fromArr, fromCode ,frequencyArr,windCommonIndexCodeArr,THSCommonIndexStockCodeArr,THSCommonIndexFuturesCodeArr} from './util';
|
|
export default {
|
|
export default {
|
|
name: '',
|
|
name: '',
|
|
props: {
|
|
props: {
|
|
@@ -195,6 +203,27 @@ export default {
|
|
},
|
|
},
|
|
hasDateSequence(){
|
|
hasDateSequence(){
|
|
return ["wind","同花顺"].includes(this.fromType)
|
|
return ["wind","同花顺"].includes(this.fromType)
|
|
|
|
+ },
|
|
|
|
+ // 常用的指标代码
|
|
|
|
+ indexCodeArr(){
|
|
|
|
+ if(this.fromType=='wind'){
|
|
|
|
+ return windCommonIndexCodeArr
|
|
|
|
+ }else if(this.fromType=='同花顺'){
|
|
|
|
+ if(this.THSIndexCodeType==1){
|
|
|
|
+ //期货常用
|
|
|
|
+ return THSCommonIndexFuturesCodeArr
|
|
|
|
+ }else{
|
|
|
|
+ //股票常用
|
|
|
|
+ return THSCommonIndexStockCodeArr
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ indexCodeHintText(){
|
|
|
|
+ if(this.fromType=='wind'){
|
|
|
|
+ return 'Wind金融终端输入“CG”会弹出代码生成器,可在代码生成器上获取其他指标的代码'
|
|
|
|
+ }else if(this.fromType=='同花顺'){
|
|
|
|
+ return '可用Excel同花顺插件/日期序列功能,根据所选指标获取指标代码,期货和股票常用代码可在下方勾选'
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
@@ -208,21 +237,6 @@ export default {
|
|
fromDatabase:'0',
|
|
fromDatabase:'0',
|
|
fromArr,
|
|
fromArr,
|
|
indexCodeSelected:[],
|
|
indexCodeSelected:[],
|
|
- indexCodeArr:[
|
|
|
|
- {value:'pre_close',label:"前收盘价"},
|
|
|
|
- {value:'open',label:"开盘价"},
|
|
|
|
- {value:'high',label:"最高价"},
|
|
|
|
- {value:'low',label:"最低价"},
|
|
|
|
- {value:'close',label:"收盘价"},
|
|
|
|
- {value:'settle',label:"结算价"},
|
|
|
|
- {value:'volume',label:"成交量"},
|
|
|
|
- {value:'amt',label:"成交额"},
|
|
|
|
- {value:'pct_chg',label:"涨跌幅"},
|
|
|
|
- {value:'swing',label:"振幅"},
|
|
|
|
- {value:'turn',label:"换手率"},
|
|
|
|
- {value:'oi',label:"持仓量"},
|
|
|
|
- {value:'oiamount',label:"持仓额"},
|
|
|
|
- ], // 常用的指标代码
|
|
|
|
databaseType:[
|
|
databaseType:[
|
|
{value:'0',label:'经济数据库'},
|
|
{value:'0',label:'经济数据库'},
|
|
{value:'1',label:'日期序列'}
|
|
{value:'1',label:'日期序列'}
|
|
@@ -257,32 +271,7 @@ export default {
|
|
securityCodeText:"",
|
|
securityCodeText:"",
|
|
indexCodeText:'',
|
|
indexCodeText:'',
|
|
indexCode:[],
|
|
indexCode:[],
|
|
- edbIndexDatas:[
|
|
|
|
- {Source:1,Catalogue:'',Unit:"",Frequency:'日度',EdbName:'CU2403收盘价1',StockCode:'CU2403.SHF',EdbCode:'close',
|
|
|
|
- DataList:[{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},
|
|
|
|
- {Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},
|
|
|
|
- {Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"}]},
|
|
|
|
- {Catalogue:'',Unit:"",Frequency:'日度',EdbName:'CU2403收盘价',StockCode:'CU2403.SHF',EdbCode:'close',
|
|
|
|
- DataList:[{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},
|
|
|
|
- {Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},
|
|
|
|
- {Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"}]},
|
|
|
|
- {Catalogue:'',Unit:"",Frequency:'日度',EdbName:'CU2403收盘价',StockCode:'CU2403.SHF',EdbCode:'close',
|
|
|
|
- DataList:[{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},
|
|
|
|
- {Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},
|
|
|
|
- {Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"}]},
|
|
|
|
- {Catalogue:'',Unit:"",Frequency:'日度',EdbName:'CU2403收盘价',StockCode:'CU2403.SHF',EdbCode:'close',
|
|
|
|
- DataList:[{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},
|
|
|
|
- {Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},
|
|
|
|
- {Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"}]},
|
|
|
|
- {Catalogue:'',Unit:"",Frequency:'日度',EdbName:'CU2403收盘价',StockCode:'CU2403.SHF',EdbCode:'close',
|
|
|
|
- DataList:[{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},
|
|
|
|
- {Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},
|
|
|
|
- {Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"}]},
|
|
|
|
- {Catalogue:'',Unit:"",Frequency:'日度',EdbName:'CU2403收盘价',StockCode:'CU2403.SHF',EdbCode:'close',
|
|
|
|
- DataList:[{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},
|
|
|
|
- {Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},
|
|
|
|
- {Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"},{Value: "632107.0000",DataTime: "2023-09-07"}]}
|
|
|
|
- ],
|
|
|
|
|
|
+ edbIndexDatas:[],
|
|
edbTableHeadKey: [
|
|
edbTableHeadKey: [
|
|
"ClassifyId",
|
|
"ClassifyId",
|
|
"Unit",
|
|
"Unit",
|
|
@@ -306,7 +295,13 @@ export default {
|
|
checkFailShow:false,
|
|
checkFailShow:false,
|
|
existIndexList:[],
|
|
existIndexList:[],
|
|
isLoadingData:false,
|
|
isLoadingData:false,
|
|
- highLightIndex:[]
|
|
|
|
|
|
+ highLightIndex:[],
|
|
|
|
+ // 同花顺常用指标类型
|
|
|
|
+ THSIndexCodeType:1,
|
|
|
|
+ THSIndexCodeTypeArr:[
|
|
|
|
+ {value:1,label:"期货常用指标"},
|
|
|
|
+ {value:2,label:"股票常用指标"}
|
|
|
|
+ ]
|
|
};
|
|
};
|
|
},
|
|
},
|
|
watch:{
|
|
watch:{
|
|
@@ -322,7 +317,6 @@ export default {
|
|
init() {
|
|
init() {
|
|
this.fromType = 'wind'
|
|
this.fromType = 'wind'
|
|
this.fromDatabase='0'
|
|
this.fromDatabase='0'
|
|
- this.wsdAddStep=1
|
|
|
|
this.status = ''
|
|
this.status = ''
|
|
this.tableData = []
|
|
this.tableData = []
|
|
this.dataList = []
|
|
this.dataList = []
|
|
@@ -330,6 +324,12 @@ export default {
|
|
this.search_txt = '';
|
|
this.search_txt = '';
|
|
this.haveResult = false;
|
|
this.haveResult = false;
|
|
this.search_company_txt = '';
|
|
this.search_company_txt = '';
|
|
|
|
+ this.wsdAddStep=1
|
|
|
|
+ this.securityCodeText=""
|
|
|
|
+ this.indexCodeText=''
|
|
|
|
+ this.indexCode=[]
|
|
|
|
+ this.indexCodeSelected=[]
|
|
|
|
+ this.THSIndexCodeType=1
|
|
this.isCompanyCode = false;
|
|
this.isCompanyCode = false;
|
|
},
|
|
},
|
|
cancelHandle() {
|
|
cancelHandle() {
|
|
@@ -434,17 +434,18 @@ export default {
|
|
this.isCompanyCode = false;
|
|
this.isCompanyCode = false;
|
|
}
|
|
}
|
|
if(this.fromDatabase=='1'){
|
|
if(this.fromDatabase=='1'){
|
|
- this.changeDatabase('0')
|
|
|
|
|
|
+ this.fromDatabase='0'
|
|
|
|
+ this.securityCodeText=""
|
|
|
|
+ this.indexCodeText=''
|
|
|
|
+ this.indexCode=[]
|
|
|
|
+ this.indexCodeSelected=[]
|
|
|
|
+ this.THSIndexCodeType=1
|
|
}
|
|
}
|
|
this.search_txt = '';
|
|
this.search_txt = '';
|
|
this.search_company_txt = '';
|
|
this.search_company_txt = '';
|
|
this.loading && this.loading.close();
|
|
this.loading && this.loading.close();
|
|
},
|
|
},
|
|
- changeDatabase(e){
|
|
|
|
- this.fromDatabase=e
|
|
|
|
- this.securityCodeText=""
|
|
|
|
- this.indexCodeText=''
|
|
|
|
- this.indexCode=[]
|
|
|
|
|
|
+ THSIndexCodeTypeChange(){
|
|
this.indexCodeSelected=[]
|
|
this.indexCodeSelected=[]
|
|
},
|
|
},
|
|
getTargetSource(){
|
|
getTargetSource(){
|
|
@@ -520,79 +521,73 @@ export default {
|
|
EdbCode:Array.from(new Set([...this.indexCode,...this.indexCodeSelected])).join(','),
|
|
EdbCode:Array.from(new Set([...this.indexCode,...this.indexCodeSelected])).join(','),
|
|
StockCode:this.securityCodeText
|
|
StockCode:this.securityCodeText
|
|
}
|
|
}
|
|
- // dataBaseInterface.edbExistCheck(params).then(res=>{
|
|
|
|
- // if(res.Ret == 200){
|
|
|
|
- // if(res.Data.IndexExist){
|
|
|
|
- // // 有重复
|
|
|
|
- // this.existIndexList=[]
|
|
|
|
- // let ExistEdbCodeArr=res.Data.ExistEdbCodeArr
|
|
|
|
- // // let ExistStockCodeArr=res.Data.ExistStockCodeArr
|
|
|
|
- // let text=''
|
|
|
|
- // // ExistStockCodeArr.map(item =>{
|
|
|
|
- // Array.from(new Set(ExistEdbCodeArr)).map(item1 =>{
|
|
|
|
- // let isCommon = this.indexCodeArr.find(it => it.value == item1)
|
|
|
|
- // if(isCommon){
|
|
|
|
- // text=`${this.securityCodeText}${isCommon.label}(${this.prefixMap.get(this.fromType)}${this.securityCodeText}${isCommon.value})`
|
|
|
|
- // }else{
|
|
|
|
- // text=`${this.securityCodeText}${item1}(${this.prefixMap.get(this.fromType)}${this.securityCodeText}${item1})`
|
|
|
|
- // }
|
|
|
|
- // this.existIndexList.push({text,code:'c266a926275bbdaf50e65b9c37081433',id:103734,classifyId:854})
|
|
|
|
- // })
|
|
|
|
- // // })
|
|
|
|
- // this.checkFailShow=true
|
|
|
|
- // }else{
|
|
|
|
- // // 没有重复
|
|
|
|
- // this.isLoadingData=true
|
|
|
|
- // dataBaseInterface.getTarget(params).then(res => {
|
|
|
|
- // if(res.Ret == 200){
|
|
|
|
- // let stockList = res.Data.SearchItem.StockList || []
|
|
|
|
- // this.edbIndexDatas=[]
|
|
|
|
- // this.BatchList=[]
|
|
|
|
- // let Source = Number(this.fromCode.get(this.fromType))
|
|
|
|
- // stockList.map((item,index) =>{
|
|
|
|
- // let isCommon = this.indexCodeArr.find(it => it.value == item.EdbCode)
|
|
|
|
- // let params={
|
|
|
|
- // Source,
|
|
|
|
- // ClassifyId:0,
|
|
|
|
- // Unit:'',
|
|
|
|
- // Frequency:'日度',
|
|
|
|
- // EdbName:isCommon?`${item.StockCode}${isCommon.label}`:`${item.StockCode}${item.EdbCode}`,
|
|
|
|
- // EdbCode:item.EdbCode,
|
|
|
|
- // StockCode:item.StockCode
|
|
|
|
- // }
|
|
|
|
- // this.BatchList.push(params)
|
|
|
|
- // let datas = item.DataList || []
|
|
|
|
- // let datasLength = datas.length
|
|
|
|
- // if( datasLength<10){
|
|
|
|
- // for (let i = datasLength; i < 10; i++) {
|
|
|
|
- // datas.push({DataTime:'',Value:''})
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // this.edbIndexDatas.push({...params,DataList:datas})
|
|
|
|
- // })
|
|
|
|
|
|
+ dataBaseInterface.edbExistCheck(params).then(res=>{
|
|
|
|
+ if(res.Ret == 200){
|
|
|
|
+ // console.log(res,'res');
|
|
|
|
+ // return
|
|
|
|
+ if(res.Data.IndexExist){
|
|
|
|
+ // 有重复
|
|
|
|
+ this.existIndexList=[]
|
|
|
|
+ let existEdbInfo=res.Data.ExistEdbInfo || []
|
|
|
|
+ let text=''
|
|
|
|
+ existEdbInfo.map(item =>{
|
|
|
|
+ text=`${item.EdbName}(${item.EdbCode})`
|
|
|
|
+ this.existIndexList.push({text,code:item.UniqueCode,id:item.EdbInfoId,classifyId:item.ClassifyId})
|
|
|
|
+ })
|
|
|
|
+ this.checkFailShow=true
|
|
|
|
+ }else{
|
|
|
|
+ // 没有重复
|
|
|
|
+ this.isLoadingData=true
|
|
|
|
+ dataBaseInterface.getTarget(params).then(res => {
|
|
|
|
+ if(res.Ret == 200){
|
|
|
|
+ let stockList = res.Data.SearchItem.StockList || []
|
|
|
|
+ this.edbIndexDatas=[]
|
|
|
|
+ this.BatchList=[]
|
|
|
|
+ let Source = Number(this.fromCode.get(this.fromType))
|
|
|
|
+ stockList.map((item,index) =>{
|
|
|
|
+ let isCommon = this.indexCodeArr.find(it => it.value == item.EdbCode)
|
|
|
|
+ let params={
|
|
|
|
+ Source,
|
|
|
|
+ ClassifyId:0,
|
|
|
|
+ Unit:'',
|
|
|
|
+ Frequency:'日度',
|
|
|
|
+ EdbName:isCommon?`${item.StockCode}${isCommon.label}`:`${item.StockCode}${item.EdbCode}`,
|
|
|
|
+ EdbCode:item.EdbCode,
|
|
|
|
+ StockCode:item.StockCode
|
|
|
|
+ }
|
|
|
|
+ this.BatchList.push(params)
|
|
|
|
+ let datas = item.DataList || []
|
|
|
|
+ let datasLength = datas.length
|
|
|
|
+ if( datasLength<10){
|
|
|
|
+ for (let i = datasLength; i < 10; i++) {
|
|
|
|
+ datas.push({DataTime:'',Value:''})
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.edbIndexDatas.push({...params,DataList:datas})
|
|
|
|
+ })
|
|
|
|
|
|
- // let edbIndexDataLength = this.edbIndexDatas.length
|
|
|
|
- // //填充空的列
|
|
|
|
- // for (let i = edbIndexDataLength; i < 6; i++) {
|
|
|
|
- // this.edbIndexDatas.push({
|
|
|
|
- // Source:0,
|
|
|
|
- // ClassifyId:0,
|
|
|
|
- // Unit:'',
|
|
|
|
- // Frequency:'',
|
|
|
|
- // EdbName:'',
|
|
|
|
- // EdbCode:'',
|
|
|
|
- // StockCode:'',
|
|
|
|
- // DataList:new Array(10).fill({DataTime:'',Value:''})
|
|
|
|
- // })
|
|
|
|
- // }
|
|
|
|
|
|
+ let edbIndexDataLength = this.edbIndexDatas.length
|
|
|
|
+ //填充空的列
|
|
|
|
+ for (let i = edbIndexDataLength; i < 6; i++) {
|
|
|
|
+ this.edbIndexDatas.push({
|
|
|
|
+ Source:0,
|
|
|
|
+ ClassifyId:0,
|
|
|
|
+ Unit:'',
|
|
|
|
+ Frequency:'',
|
|
|
|
+ EdbName:'',
|
|
|
|
+ EdbCode:'',
|
|
|
|
+ StockCode:'',
|
|
|
|
+ DataList:new Array(10).fill({DataTime:'',Value:''})
|
|
|
|
+ })
|
|
|
|
+ }
|
|
this.wsdAddStep=2
|
|
this.wsdAddStep=2
|
|
- // }
|
|
|
|
- // }).finally(()=>{
|
|
|
|
- // this.isLoadingData=false
|
|
|
|
- // })
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // })
|
|
|
|
|
|
+ }
|
|
|
|
+ }).finally(()=>{
|
|
|
|
+ this.isLoadingData=false
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
},50)
|
|
},50)
|
|
},
|
|
},
|
|
@@ -604,31 +599,30 @@ export default {
|
|
this.wsdAddStep=1
|
|
this.wsdAddStep=1
|
|
},
|
|
},
|
|
wsdSaveHandle(){
|
|
wsdSaveHandle(){
|
|
- // let flag = this.edbIndexDatas.some(it => {
|
|
|
|
- // return (it.StockCode && it.EdbCode) && ((!it.ClassifyId) || (!it.Unit) || (!it.Frequency) || (!it.EdbName))
|
|
|
|
- // })
|
|
|
|
- // if(flag){
|
|
|
|
- // this.$message.warning("指标信息未填写完整")
|
|
|
|
- // return
|
|
|
|
- // }
|
|
|
|
- // this.BatchList.map((it,ind) => {
|
|
|
|
- // it.ClassifyId = this.edbIndexDatas[ind].ClassifyId
|
|
|
|
- // it.EdbCode = this.edbIndexDatas[ind].EdbCode
|
|
|
|
- // it.EdbName = this.edbIndexDatas[ind].EdbName
|
|
|
|
- // it.Frequency = this.edbIndexDatas[ind].Frequency
|
|
|
|
- // it.StockCode = this.edbIndexDatas[ind].StockCode
|
|
|
|
- // it.Unit = this.edbIndexDatas[ind].Unit
|
|
|
|
- // })
|
|
|
|
- // dataBaseInterface.edbAddBatch({BatchList:this.BatchList}).then(res=>{
|
|
|
|
- // if(res.Ret == 200){
|
|
|
|
- // this.$message.success("添加指标成功")
|
|
|
|
- // this.$emit('addSuccessHandle',{ code:res.Data.UniqueCode,id:res.Data.EdbInfoId,classifyId:res.Data.ClassifyId })
|
|
|
|
- // this.cancelHandle()
|
|
|
|
- // }
|
|
|
|
- // })
|
|
|
|
- this.highLightIndex=["CU2403收盘价1"]
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ let flag = this.edbIndexDatas.some(it => {
|
|
|
|
+ return (it.StockCode && it.EdbCode) && ((!it.ClassifyId) || (!it.Unit) || (!it.Frequency) || (!it.EdbName))
|
|
|
|
+ })
|
|
|
|
+ if(flag){
|
|
|
|
+ this.$message.warning("指标信息未填写完整")
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.BatchList.map((it,ind) => {
|
|
|
|
+ it.ClassifyId = this.edbIndexDatas[ind].ClassifyId
|
|
|
|
+ it.EdbCode = this.edbIndexDatas[ind].EdbCode
|
|
|
|
+ it.EdbName = this.edbIndexDatas[ind].EdbName
|
|
|
|
+ it.Frequency = this.edbIndexDatas[ind].Frequency
|
|
|
|
+ it.StockCode = this.edbIndexDatas[ind].StockCode
|
|
|
|
+ it.Unit = this.edbIndexDatas[ind].Unit
|
|
|
|
+ })
|
|
|
|
+ dataBaseInterface.edbAddBatch({BatchList:this.BatchList}).then(res=>{
|
|
|
|
+ if(res.Ret == 200){
|
|
|
|
+ this.$message.success("添加指标成功")
|
|
|
|
+ this.$emit('addSuccessHandle',{ code:res.Data.UniqueCode,id:res.Data.EdbInfoId,classifyId:res.Data.ClassifyId })
|
|
|
|
+ this.cancelHandle()
|
|
|
|
+ }else if(res.Ret == 403){
|
|
|
|
+ this.highLightIndex=res.Data?res.Data.ExistEdbName || []:[]
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() { },
|
|
created() { },
|
|
@@ -684,7 +678,7 @@ export default {
|
|
.wsd-index-code{
|
|
.wsd-index-code{
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
- margin-bottom: 15px;
|
|
|
|
|
|
+ margin-bottom: 20px;
|
|
.index-code-hint{
|
|
.index-code-hint{
|
|
color: #C0C4CC;
|
|
color: #C0C4CC;
|
|
font-size: 15px;
|
|
font-size: 15px;
|
|
@@ -717,7 +711,8 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.wsd-index-input{
|
|
.wsd-index-input{
|
|
- width: 400px;
|
|
|
|
|
|
+ min-width: 400px;
|
|
|
|
+ width:400px;
|
|
margin-right: 10px;
|
|
margin-right: 10px;
|
|
}
|
|
}
|
|
}
|
|
}
|