|
@@ -16,7 +16,7 @@
|
|
</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" @change="changeDatabase"
|
|
- :disabled="haveResult" v-if="fromType=='wind'">
|
|
|
|
|
|
+ :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>
|
|
</el-select>
|
|
</el-select>
|
|
@@ -26,21 +26,15 @@
|
|
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
|
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
|
</el-input>
|
|
</el-input>
|
|
|
|
|
|
- <el-input placeholder="指标ID" v-model="search_txt" style="maxWidth:300px" v-if="!(this.fromType=='wind' && this.fromDatabase=='1')"
|
|
|
|
|
|
+ <el-input placeholder="指标ID" v-model="search_txt" style="maxWidth:300px" v-if="!(hasDateSequence && fromDatabase=='1')"
|
|
@keyup.enter.native="searchHandle" :disabled="haveResult" clearable>
|
|
@keyup.enter.native="searchHandle" :disabled="haveResult" clearable>
|
|
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
|
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
|
</el-input>
|
|
</el-input>
|
|
</div>
|
|
</div>
|
|
- <div v-if="this.fromType=='wind' && this.fromDatabase=='1'">
|
|
|
|
|
|
+ <div v-if="hasDateSequence && fromDatabase=='1'">
|
|
<div class="wsd-index-box">
|
|
<div class="wsd-index-box">
|
|
<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-code-row">
|
|
|
|
- <div class="wsd-code-item" v-for="item in securityCode" :key="item">
|
|
|
|
- <div class="wsd-code-item-text">{{ item }}</div>
|
|
|
|
- <img src="~@/assets/img/icons/close_icon_black.png" @click="deleteCode('security',item)" />
|
|
|
|
- </div>
|
|
|
|
- </div> -->
|
|
|
|
<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>
|
|
<el-input placeholder="请输入指标代码,多个指标代码用英文逗号分隔" v-model.trim="indexCodeText" class="wsd-index-input" @blur="codeInputBlur('index')"></el-input>
|
|
<div class="index-code-hint">Wind金融终端输入“CG”会弹出代码生成器,可在代码生成器上获取其他指标的代码</div>
|
|
<div class="index-code-hint">Wind金融终端输入“CG”会弹出代码生成器,可在代码生成器上获取其他指标的代码</div>
|
|
@@ -51,7 +45,7 @@
|
|
<div class="wsd-code-row" style="margin-top: -10px;">
|
|
<div class="wsd-code-row" style="margin-top: -10px;">
|
|
<div class="wsd-code-item" v-for="item in indexCode" :key="item">
|
|
<div class="wsd-code-item" v-for="item in indexCode" :key="item">
|
|
<div class="wsd-code-item-text">{{ item }}</div>
|
|
<div class="wsd-code-item-text">{{ item }}</div>
|
|
- <img src="~@/assets/img/icons/close_icon_black.png" @click="deleteCode('index',item)" />
|
|
|
|
|
|
+ <img src="~@/assets/img/icons/close_icon_black.png" @click="deleteCode(item)" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -110,7 +104,8 @@
|
|
<td class="sticky" style="left: 0;text-align: center;">
|
|
<td class="sticky" style="left: 0;text-align: center;">
|
|
{{ edbTableHeadData.get(item) }}
|
|
{{ edbTableHeadData.get(item) }}
|
|
</td>
|
|
</td>
|
|
- <td v-for="(data, sub_index) in edbIndexDatas" :key="sub_index" :colspan="2">
|
|
|
|
|
|
+ <td v-for="(data, sub_index) in edbIndexDatas" :key="sub_index" :colspan="2"
|
|
|
|
+ :class="highLightIndex.includes(data.EdbName) && item=='EdbName' ?'exist-highlight':''">
|
|
<template v-if="item === 'ClassifyId'">
|
|
<template v-if="item === 'ClassifyId'">
|
|
<el-cascader :options="options" v-model="data[item]" placeholder="请选择所属目录"
|
|
<el-cascader :options="options" v-model="data[item]" placeholder="请选择所属目录"
|
|
size="mini" :disabled="!data.Source"
|
|
size="mini" :disabled="!data.Source"
|
|
@@ -172,8 +167,8 @@
|
|
<div class="check-fail-box">
|
|
<div class="check-fail-box">
|
|
<div>
|
|
<div>
|
|
<div style="margin-bottom: 20px;">指标库中已存在以下指标,请勿重新输入!</div>
|
|
<div style="margin-bottom: 20px;">指标库中已存在以下指标,请勿重新输入!</div>
|
|
- <div v-for="(item,index) in existIndexList">
|
|
|
|
- {{ index+1+'、'+item }}
|
|
|
|
|
|
+ <div v-for="(item,index) in existIndexList" class="exist-index-item" @click="existIndexClick(item)">
|
|
|
|
+ {{ index+1+'、'+item.text }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="check-fail-button">
|
|
<div class="check-fail-button">
|
|
@@ -196,12 +191,17 @@ export default {
|
|
},
|
|
},
|
|
computed:{
|
|
computed:{
|
|
isCodeComplete(){
|
|
isCodeComplete(){
|
|
- // return this.securityCode.length>0 && (this.indexCode.length>0 || this.indexCodeSelected.length>0)
|
|
|
|
return this.securityCodeText && (this.indexCode.length>0 || this.indexCodeSelected.length>0)
|
|
return this.securityCodeText && (this.indexCode.length>0 || this.indexCodeSelected.length>0)
|
|
-
|
|
|
|
|
|
+ },
|
|
|
|
+ hasDateSequence(){
|
|
|
|
+ return ["wind","同花顺"].includes(this.fromType)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
|
|
+ this.prefixMap=new Map([
|
|
|
|
+ ["wind","wsd"],
|
|
|
|
+ ["同花顺","thsds"]
|
|
|
|
+ ])
|
|
return {
|
|
return {
|
|
search_txt: '',//搜素关键词 M001625518 M0001427
|
|
search_txt: '',//搜素关键词 M001625518 M0001427
|
|
fromType: 'wind',
|
|
fromType: 'wind',
|
|
@@ -255,34 +255,33 @@ export default {
|
|
isCompanyCode: false,
|
|
isCompanyCode: false,
|
|
search_company_txt: '',
|
|
search_company_txt: '',
|
|
securityCodeText:"",
|
|
securityCodeText:"",
|
|
- // securityCode:[],
|
|
|
|
indexCodeText:'',
|
|
indexCodeText:'',
|
|
indexCode:[],
|
|
indexCode:[],
|
|
edbIndexDatas:[
|
|
edbIndexDatas:[
|
|
- // {Source:1,Catalogue:'',Unit:"",Frequency:'日度',SecName:'CU2403收盘价',SecurityCode:'CU2403.SHF',IndexCode:'close',
|
|
|
|
- // DataList:[{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},
|
|
|
|
- // {Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},
|
|
|
|
- // {Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"}]},
|
|
|
|
- // {Catalogue:'',Unit:"",Frequency:'日度',SecName:'CU2403收盘价',SecurityCode:'CU2403.SHF',IndexCode:'close',
|
|
|
|
- // DataList:[{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},
|
|
|
|
- // {Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},
|
|
|
|
- // {Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"}]},
|
|
|
|
- // {Catalogue:'',Unit:"",Frequency:'日度',SecName:'CU2403收盘价',SecurityCode:'CU2403.SHF',IndexCode:'close',
|
|
|
|
- // DataList:[{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},
|
|
|
|
- // {Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},
|
|
|
|
- // {Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"}]},
|
|
|
|
- // {Catalogue:'',Unit:"",Frequency:'日度',SecName:'CU2403收盘价',SecurityCode:'CU2403.SHF',IndexCode:'close',
|
|
|
|
- // DataList:[{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},
|
|
|
|
- // {Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},
|
|
|
|
- // {Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"}]},
|
|
|
|
- // {Catalogue:'',Unit:"",Frequency:'日度',SecName:'CU2403收盘价',SecurityCode:'CU2403.SHF',IndexCode:'close',
|
|
|
|
- // DataList:[{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},
|
|
|
|
- // {Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},
|
|
|
|
- // {Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"}]},
|
|
|
|
- // {Catalogue:'',Unit:"",Frequency:'日度',SecName:'CU2403收盘价',SecurityCode:'CU2403.SHF',IndexCode:'close',
|
|
|
|
- // DataList:[{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},
|
|
|
|
- // {Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},
|
|
|
|
- // {Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"},{Close: "632107.0000",Dt: "2023-09-07"}]}
|
|
|
|
|
|
+ {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"}]}
|
|
],
|
|
],
|
|
edbTableHeadKey: [
|
|
edbTableHeadKey: [
|
|
"ClassifyId",
|
|
"ClassifyId",
|
|
@@ -306,7 +305,8 @@ export default {
|
|
frequencyArr,
|
|
frequencyArr,
|
|
checkFailShow:false,
|
|
checkFailShow:false,
|
|
existIndexList:[],
|
|
existIndexList:[],
|
|
- isLoadingData:false
|
|
|
|
|
|
+ isLoadingData:false,
|
|
|
|
+ highLightIndex:[]
|
|
};
|
|
};
|
|
},
|
|
},
|
|
watch:{
|
|
watch:{
|
|
@@ -443,7 +443,6 @@ export default {
|
|
changeDatabase(e){
|
|
changeDatabase(e){
|
|
this.fromDatabase=e
|
|
this.fromDatabase=e
|
|
this.securityCodeText=""
|
|
this.securityCodeText=""
|
|
- // this.securityCode=[]
|
|
|
|
this.indexCodeText=''
|
|
this.indexCodeText=''
|
|
this.indexCode=[]
|
|
this.indexCode=[]
|
|
this.indexCodeSelected=[]
|
|
this.indexCodeSelected=[]
|
|
@@ -466,18 +465,6 @@ export default {
|
|
codeInputBlur(type){
|
|
codeInputBlur(type){
|
|
if(type == 'security'){
|
|
if(type == 'security'){
|
|
this.securityCodeText=this.securityCodeText.replaceAll(' ','')
|
|
this.securityCodeText=this.securityCodeText.replaceAll(' ','')
|
|
- // if(!this.securityCodeText) return
|
|
|
|
- // if(!(this.securityCode.length<5)){
|
|
|
|
- // this.$message.warning('证券代码一次最多输入5个')
|
|
|
|
- // this.securityCodeText=''
|
|
|
|
- // return
|
|
|
|
- // }
|
|
|
|
- // this.securityCode=Array.from(new Set([...this.securityCode,...this.securityCodeText.split(',')])).filter(Boolean)
|
|
|
|
- // if(this.securityCode.length>5){
|
|
|
|
- // this.securityCode = this.securityCode.slice(0,5)
|
|
|
|
- // this.$message.warning('证券代码一次最多输入5个')
|
|
|
|
- // }
|
|
|
|
- // this.securityCodeText=''
|
|
|
|
}else if(type == 'index'){
|
|
}else if(type == 'index'){
|
|
if(!this.indexCodeText) return
|
|
if(!this.indexCodeText) return
|
|
this.indexCodeText=this.indexCodeText.replaceAll(' ','')
|
|
this.indexCodeText=this.indexCodeText.replaceAll(' ','')
|
|
@@ -487,12 +474,8 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
},
|
|
},
|
|
- deleteCode(type,code){
|
|
|
|
- if(type == 'security'){
|
|
|
|
- // this.securityCode = this.securityCode.filter(it => it!=code)
|
|
|
|
- }else if(type == 'index'){
|
|
|
|
- this.indexCode = this.indexCode.filter(it => it!=code)
|
|
|
|
- }
|
|
|
|
|
|
+ deleteCode(code){
|
|
|
|
+ this.indexCode = this.indexCode.filter(it => it!=code)
|
|
},
|
|
},
|
|
/* 获取目录结构 */
|
|
/* 获取目录结构 */
|
|
getMenu() {
|
|
getMenu() {
|
|
@@ -535,111 +518,117 @@ export default {
|
|
Source:Number(this.fromCode.get(this.fromType)),
|
|
Source:Number(this.fromCode.get(this.fromType)),
|
|
SubSource:this.fromDatabase,
|
|
SubSource:this.fromDatabase,
|
|
EdbCode:Array.from(new Set([...this.indexCode,...this.indexCodeSelected])).join(','),
|
|
EdbCode:Array.from(new Set([...this.indexCode,...this.indexCodeSelected])).join(','),
|
|
- // StockCode:this.securityCode.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}(wsd${this.securityCodeText}${isCommon.value})`
|
|
|
|
- }else{
|
|
|
|
- text=`${this.securityCodeText}${item1}(wsd${this.securityCodeText}${item1})`
|
|
|
|
- }
|
|
|
|
- this.existIndexList.push(text)
|
|
|
|
- })
|
|
|
|
- // })
|
|
|
|
- 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){
|
|
|
|
+ // 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})
|
|
|
|
+ // })
|
|
|
|
|
|
- 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)
|
|
},
|
|
},
|
|
|
|
+ existIndexClick({code,id,classifyId}){
|
|
|
|
+ const { href } = this.$router.resolve({ path: '/database',query:{code,id,classifyId}});
|
|
|
|
+ window.open(href, '_blank');
|
|
|
|
+ },
|
|
wsdPrevHandle(){
|
|
wsdPrevHandle(){
|
|
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()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ // 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"]
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() { },
|
|
created() { },
|
|
@@ -806,10 +795,19 @@ export default {
|
|
border-top: 1px solid #dcdfe6;
|
|
border-top: 1px solid #dcdfe6;
|
|
border-left: 1px solid #dcdfe6;
|
|
border-left: 1px solid #dcdfe6;
|
|
}
|
|
}
|
|
|
|
+ .exist-highlight{
|
|
|
|
+ border: red solid 1px;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
.check-fail-box{
|
|
.check-fail-box{
|
|
padding: 0 0 15px 40px;
|
|
padding: 0 0 15px 40px;
|
|
color: #333333;
|
|
color: #333333;
|
|
|
|
+ .exist-index-item{
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ &:hover{
|
|
|
|
+ text-decoration: underline;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
.check-fail-button{
|
|
.check-fail-button{
|
|
margin-top: 80px;
|
|
margin-top: 80px;
|
|
display: flex;
|
|
display: flex;
|