Преглед на файлове

ETA1.4.5 有色原始数据库

hbchen преди 11 месеца
родител
ревизия
c39171f127
променени са 2 файла, в които са добавени 264 реда и са изтрити 159 реда
  1. 25 1
      src/api/modules/thirdBaseApi.js
  2. 239 158
      src/views/dataEntry_manage/thirdBase/ysTargetBase.vue

+ 25 - 1
src/api/modules/thirdBaseApi.js

@@ -189,11 +189,35 @@ const smmDataInterface = {
   },
 	// 有色原始数据库
 	/**
-   * 分类名称列表
+   * 列表
 	*/
 	getYsDataList:params=>{
 		return http.get('datamanage/smm/api/list',params)
 	},
+	/**
+   * 分类列表
+	*/
+	getYsTypeDataList:params=>{
+		return http.get('datamanage/smm/api/type/list',params)
+	},
+	/**
+   * 检验有色指标是否存在
+	*/
+	getYsEdbCodeCheck:params=>{
+		return http.get('datamanage/edb_info/smm/exist/check',params)
+	},
+	/**
+   * 查询有色指标
+	*/
+	getYsEdbCodeSearch:params=>{
+		return http.get('datamanage/edb_info/smm/search',params)
+	},
+	/**
+   * 批量添加有色指标
+	*/
+	ysEdbAddBatch:params=>{
+		return http.post('datamanage/edb_info/smm/batch/add',params)
+	},
 }
 
 /* 中国煤炭网 */

+ 239 - 158
src/views/dataEntry_manage/thirdBase/ysTargetBase.vue

@@ -1,14 +1,13 @@
 <template>
-  <div id="YS-data-container" v-loading="dataLoading" element-loading-text="指标数据加载中,请勿切换页面">
+  <div id="YS-data-container" v-loading="dataLoading" element-loading-text="指标数据加载中,请勿切换到其他页面">
     <div class="search-zone">
       <div class="search-row">
         <el-cascader @change="searchList" :options="classifyList" v-model="typesList" clearable
           placeholder="请选择分类" class="search-item"
           :props="{
-            value:'id',
-            label:'label',
-            children:'children',
-            emitPath:false
+            value:'Type',
+            label:'Type',
+            children:'Child'
           }"></el-cascader>
         <el-select v-model="searchParams.Frequency" class="search-item" placeholder="请选择频度" clearable @change="searchList">
           <el-option :label="item" :value="item" v-for="item in frequencyList" :key="item"></el-option>  
@@ -17,7 +16,7 @@
           <el-option :label="item.label" :value="item.value" v-for="item in dataStatusList" :key="item.value"></el-option>  
         </el-select>
         <el-select v-model="edbCheckList" multiple filterable remote clearable collapse-tags class="search-item edb-filter"
-          reserve-keyword placeholder="指标ID/指标名称" :remote-method="remoteMethod"
+          reserve-keyword placeholder="指标ID/指标名称" :remote-method="remoteMethod" 
           v-loadMore="searchLoad" @clear="searchList" @remove-tag="removeEdbFilterTag" ref="edbFilterRef" >
           <el-option v-for="item in edbFilterDataList" :key="item.IndexCode"
             :label="item.IndexName" :value="item.IndexCode">
@@ -26,7 +25,8 @@
         <el-checkbox label="列表全选" v-model="isCheckAll" :indeterminate="isCheckIndeterminate" style="margin: 0 20px 10px 0;"
         @change="listCheckAllChange"></el-checkbox>
       </div>
-      <el-button type="primary" style="margin: 0 0 10px 0;padding:12px 18px ;" @click="addToEdbBase" :disabled="!(isCheckAll || isCheckIndeterminate)">添加到指标库</el-button>
+      <el-button type="primary" style="margin: 0 0 10px 0;padding:12px 18px ;" @click="addToEdbBase" 
+      :disabled="addBaseDisable">添加到指标库</el-button>
     </div>
     <div class="table-zone">
       <el-table :data="tableData" border @sort-change="sortChange"  @selection-change="selectionChange"
@@ -97,7 +97,9 @@
 			width="600px" title="操作提示">
 			<div class="check-fail-box">
 				<div>
-					<div style="margin-bottom: 20px;">指标库中已存在以下指标,请勿重新输入!</div>
+					<div style="margin-bottom: 20px;">
+            {{ indexAllExist?'本次添加的指标均已在指标库中,请勿重复添加!':'指标库中已存在以下指标,会自动过滤!' }}
+          </div>
 					<div v-for="(item,index) in existIndexList" class="exist-index-item" @click="existIndexClick(item)">
 						{{ index+1+'、'+item.text }}
 					</div>
@@ -110,67 +112,69 @@
     <!-- 添加到指标库 -->
     <el-dialog :visible.sync="addToEbdDiaShow" :close-on-click-modal="false" :modal-append-to-body='false' 
     width="980px" title="添加到指标库">
-      <div class="edb-table-preview">
-        <table width="auto" border="0">
-          <thead>
-            <tr v-for="(item, index) in edbTableHeadKey" :key="item">
-              <td class="sticky" style="left: 0;text-align: center;">
-                {{ edbTableHeadData.get(item) }}
-              </td>
-              <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'">
-                  <el-cascader :options="options" v-model="data[item]" placeholder="请选择所属目录"
-                  size="mini" :disabled="!data.Source"
-                  :props="{label: 'ClassifyName',
-                    value: 'ClassifyId',
-                    children: 'Children',
-                    checkStrictly: true,
-                    emitPath:false}">
-                  </el-cascader>
+      <div class="edb-table-box">
+        <div class="edb-table-preview">
+          <table width="auto" border="0">
+            <thead>
+              <tr v-for="(item, index) in edbTableHeadKey" :key="item">
+                <td class="sticky" style="left: 0;text-align: center;">
+                  {{ edbTableHeadData.get(item) }}
+                </td>
+                <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'">
+                    <el-cascader :options="options" v-model="data[item]" placeholder="请选择所属目录"
+                    size="mini" :disabled="!data.Source"
+                    :props="{label: 'ClassifyName',
+                      value: 'ClassifyId',
+                      children: 'Children',
+                      checkStrictly: true,
+                      emitPath:false}">
+                    </el-cascader>
+                  </template>
+                  <template v-else-if="item === 'Unit'">
+                    <el-autocomplete
+                    :disabled="!data.Source"
+                      v-model.trim="data[item]"
+                      :fetch-suggestions="querySearchUnit"
+                      placeholder="请输入单位"
+                      suffix-icon="el-icon-arrow-down"
+                      size="mini"
+                    ></el-autocomplete>
+                  </template>
+                  <template v-else-if="item === 'Frequency'">
+                    <el-select v-model="data[item]" placeholder="请选择频度" size="mini" :disabled="!data.Source">
+                      <el-option :label="item" :value="item"
+                      v-for="item in edbFrequencyList" :key="item"></el-option>
+                    </el-select>
+                  </template>
+                  <template v-else-if="item === 'EdbName'">
+                    <el-input v-model.trim="data[item]" placeholder="请输入指标名称" size="mini" :disabled="!data.Source"></el-input>
+                  </template>
+                  <template v-else>
+                    <div style="padding: 0 7px;">{{ data[item] }}</div>
+                  </template>
+                </td>
+              </tr>
+            </thead>
+            <tbody v-if="edbIndexDatas && edbIndexDatas.length>0">
+              <tr v-for="(item,index) in edbIndexDatas[0].DataList.length" :key="index">
+                <td :rowspan="edbIndexDatas[0].DataList.length" v-if="index==0"
+                class="sticky" style="left: 0;text-align: center;">
+                  数据详情
+                </td>
+                <template v-for="(item1,index1) in edbIndexDatas.length">
+                  <td>{{ edbIndexDatas[index1].DataList[index].DataTime }}</td>
+                  <td>{{ edbIndexDatas[index1].DataList[index].Value }}</td>
                 </template>
-                <template v-else-if="item === 'Unit'">
-                  <el-autocomplete
-                  :disabled="!data.Source"
-                    v-model.trim="data[item]"
-                    :fetch-suggestions="querySearchUnit"
-                    placeholder="请输入单位"
-                    suffix-icon="el-icon-arrow-down"
-                    size="mini"
-                  ></el-autocomplete>
-                </template>
-                <template v-else-if="item === 'Frequency'">
-                  <el-select v-model="data[item]" placeholder="请选择频度" size="mini" :disabled="!data.Source">
-                    <el-option :label="item" :value="item"
-                    v-for="item in edbFrequencyList" :key="item"></el-option>
-                  </el-select>
-                </template>
-                <template v-else-if="item === 'EdbName'">
-                  <el-input v-model.trim="data[item]" placeholder="请输入指标名称" size="mini" :disabled="!data.Source"></el-input>
-                </template>
-                <template v-else>
-                  <div style="padding: 0 7px;">{{ data[item] }}</div>
-                </template>
-              </td>
-            </tr>
-          </thead>
-          <tbody v-if="edbIndexDatas && edbIndexDatas.length>0">
-            <tr v-for="(item,index) in edbIndexDatas[0].DataList.length" :key="index">
-              <td :rowspan="edbIndexDatas[0].DataList.length" v-if="index==0"
-              class="sticky" style="left: 0;text-align: center;">
-                数据详情
-              </td>
-              <template v-for="(item1,index1) in edbIndexDatas.length">
-                <td>{{ edbIndexDatas[index1].DataList[index].DataTime }}</td>
-                <td>{{ edbIndexDatas[index1].DataList[index].Value }}</td>
-              </template>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-      <div class="dia-bot">
-        <el-button @click="addToEbdDiaShow=false" style="width: 120px;">取消</el-button>
-        <el-button type="primary" @click="wsdSaveHandle" style="width: 120px;margin-left: 30px;" :loading="saveLoading">保存</el-button>
+              </tr>
+            </tbody>
+          </table>
+        </div>
+        <div class="dia-bot">
+          <el-button @click="addToEbdDiaShow=false" style="width: 120px;">取消</el-button>
+          <el-button type="primary" @click="ysEdbSaveHandle" style="width: 120px;margin-left: 30px;" :loading="saveLoading">保存</el-button>
+        </div>
       </div>
 		</el-dialog>
   </div>
@@ -185,7 +189,6 @@ import { frequencyArr} from '../databaseComponents/util';
     name:'ysTargetBase',
     components:{mPage},
     data() {
-      this.flowToData=[{id:'M',label:'Import'},{id:'X',label:'Export'}]
       return {
         searchParams:{
           Types:'',
@@ -198,6 +201,7 @@ import { frequencyArr} from '../databaseComponents/util';
           IndexCodes:''
         },
         typesList:[],
+        options:[],
         isCheckAll:false,
         isCheckIndeterminate:false,
         // 标志列表当前是全选状态还是不是全选状态和 isCheckAll不一样
@@ -226,13 +230,32 @@ import { frequencyArr} from '../databaseComponents/util';
         // 添加到指标库
         existIndexList:[],
         checkFailShow:false,
+        indexAllExist:false,//指标是否都存在
         edbIndexDatas:[],
+        edbTableHeadKey: [
+          "ClassifyId",
+          "Unit",
+          "Frequency",
+          "EdbName",
+          "EdbCode",
+        ],
+        edbTableHeadData:new Map([
+          ["ClassifyId", "所属目录"],
+          ["Unit", "单位"],
+          ["Frequency", "频度"],
+          ["EdbName", "指标名称"],
+          ["EdbCode", "指标ID"],
+        ]),
         BatchList:[],
         addToEbdDiaShow:false,
+        highLightIndex:[],
         saveLoading:false
       }
     },
     computed:{
+      addBaseDisable(){
+        return !(this.isCheckAll || this.isCheckIndeterminate ) || (!(this.tableData && this.tableData.length>0))
+      }
     },
     watch:{
       edbCheckList(value){
@@ -254,7 +277,6 @@ import { frequencyArr} from '../databaseComponents/util';
       // el-select 的@blur绑定事件不生效代替方法
       this.$refs.edbFilterRef.$refs.input.blur=()=>{
         if(this.hasEdbFilterChange){
-          console.log('失焦');
           this.searchList()
           this.hasEdbFilterChange=false
         }
@@ -268,20 +290,19 @@ import { frequencyArr} from '../databaseComponents/util';
         }else{
           this.searchParams.IndexCodes = ''
         }
-        console.log(this.searchParams);
         smmDataInterface.getYsDataList(this.searchParams).then(res=>{
           if(res.Ret == 200){
             this.tableData=res.Data.List || []
             this.total = res.Data.Paging.Totals || 0
             if(this.tableData.length>0){
-              this.tableDataIds = this.tableData.map(it => it.id)
+              this.tableDataIds = this.tableData.map(it => it.IndexCode)
             }else{
               this.tableDataIds = []
             }
             if(type == 'adjustSelection'){
               this.adjustSelection()
             }else{
-              if(this.searchParams.Types || this.searchParams.Frequency || this.searchParams.DataState || this.searchParams.Keyword){
+              if(this.searchParams.Types || this.searchParams.Frequency || this.searchParams.DataState || this.searchParams.IndexCodes){
                 this.isCheckAll=true
                 this.checkAllStatus=true
                 this.isCheckIndeterminate=false
@@ -297,8 +318,12 @@ import { frequencyArr} from '../databaseComponents/util';
       },
       // 获取有色数据库分类列表
       getYsClassifyList(){
-        //TODO: 获取分类列表
-        this.classifyList=[{id:1,label:'宏观',children:[{id:11,label:'房地产',children:[{id:111,label:'国内'},{id:112,label:'国外'}]}]}]
+        smmDataInterface.getYsTypeDataList().then(res=>{
+          if(res.Ret == 200){
+            this.classifyList=res.Data || []
+          }
+        })
+
       },
       // 指标名称的远程搜索方法
       remoteMethod(text){
@@ -326,7 +351,6 @@ import { frequencyArr} from '../databaseComponents/util';
 			  this.searchApi();
       },
 	    removeEdbFilterTag: _.throttle(function() {
-        console.log('删除标签');
         this.searchList()
 		  },1000),
       searchList(type){
@@ -343,15 +367,12 @@ import { frequencyArr} from '../databaseComponents/util';
         this.searchList('adjustSelection')
       },
       selectionChange(val){
-        console.log(this.selectionReactCancel,'selectionReactCancel');
         if(this.selectionReactCancel) return 
         // selectAllHandle的触发在selectionChange后面,将selectionChange的逻辑延迟一下
         setTimeout(()=>{
           // 去重
           let duplicateArr = Array.from(new Set(this.tableDataCheckedList))
           
-          console.log(val,'selectionChange',this.tableDataCheckedList);
-          console.log(duplicateArr.length,this.total,this.checkAllStatus);
           if((duplicateArr.length == this.total && (!this.checkAllStatus))
           || (duplicateArr.length == 0 && this.checkAllStatus)){
             this.isCheckAll = true
@@ -368,11 +389,10 @@ import { frequencyArr} from '../databaseComponents/util';
 
       },
       selectHandle(selection,row){
-        console.log(this.selectionReactCancel,'selectionReactCancel');
         if(this.selectionReactCancel) return 
-        console.log(selection,row,'row,selectHandle');
+
         let check = false; // 从tableDataCheckedList 添加还是删除
-        if(selection.some(it => it.id == row.id)){
+        if(selection.some(it => it.IndexCode == row.IndexCode)){
           // 勾选
           if(this.checkAllStatus){
             check=false
@@ -388,15 +408,14 @@ import { frequencyArr} from '../databaseComponents/util';
           }
         }
         if(check){
-          this.tableDataCheckedList.push(row.id)
+          this.tableDataCheckedList.push(row.IndexCode)
         }else{
-          this.tableDataCheckedList=this.tableDataCheckedList.filter(it => it!=row.id)
+          this.tableDataCheckedList=this.tableDataCheckedList.filter(it => it!=row.IndexCode)
         }
       },
       selectAllHandle(selection){
-        console.log(this.selectionReactCancel,'selectionReactCancel');
         if(this.selectionReactCancel) return 
-        console.log(selection,'selectAllHandle');
+
         let check = false; // 从tableDataCheckedList 添加还是删除
         if(selection && selection.length>0){
           // 全选
@@ -413,7 +432,6 @@ import { frequencyArr} from '../databaseComponents/util';
             check=false
           }
         }
-        // console.log(this.tableDataIds,'ids',this.tableDataCheckedList);
         if(check){
           this.tableDataCheckedList =  [...this.tableDataCheckedList,...this.tableDataIds]
         }else{
@@ -434,27 +452,21 @@ import { frequencyArr} from '../databaseComponents/util';
       },
       adjustSelection(){
         this.selectionReactCancel=true
-        console.log('adjustSelection');
         if(!this.checkAllStatus){
           this.tableDataCheckedList.map(it =>{
-            console.log(this.tableData,'this.tableData');
-            let row = this.tableData.find(da => da.id==it)
+            let row = this.tableData.find(da => da.IndexCode==it)
             if(row){
               setTimeout(()=>{
                 this.$refs.edbDataRef.toggleRowSelection(row,true)
-              },1)
+              },10)
             }
           })
         }else{
-          // this.selectionReactCancel=true
           this.$refs.edbDataRef.toggleAllSelection()
           this.tableDataCheckedList.map(it =>{
-            console.log(this.tableData,'this.tableData',it);
-            let row = this.tableData.find(da => da.id==it)
+            let row = this.tableData.find(da => da.IndexCode==it)
             if(row){
-              console.log(row,'row');
               setTimeout(()=>{
-                console.log('toggleRowSelection false');
                 this.$refs.edbDataRef.toggleRowSelection(row,false)
               },50)
             }
@@ -466,20 +478,19 @@ import { frequencyArr} from '../databaseComponents/util';
       },
       // 添加指标库
       addToEdbBase:_.throttle(function() {
-        if(this.dataLoading || (!this.isCheckAll && !this.isCheckIndeterminate)) return 
-        console.log(this.searchParams,this.checkAllStatus,this.tableDataCheckedList,'请求参数');
+        if(this.dataLoading || this.addBaseDisable) return 
         let params={
-          Source:Number(this.fromCode.get(this.fromType)),
-          SubSource:this.fromDatabase,
-          EdbCode:Array.from(new Set([...this.indexCode,...this.indexCodeSelected])).join(','),
-          StockCode:this.securityCodeText
+          Types:this.searchParams.Types,
+          Frequency:this.searchParams.Frequency,
+          DataState:this.searchParams.DataState,
+          SelectAll:this.checkAllStatus,
+          SelectCode:this.searchParams.IndexCodes,
+          EdbCode:this.tableDataCheckedList.join(',')
         }
-        return 
-        // TODO: 检查接口对接
-        dataBaseInterface.edbExistCheck(params).then(res=>{
+        // return 
+        smmDataInterface.getYsEdbCodeCheck(params).then(res=>{
           if(res.Ret == 200){
             // console.log(res,'res');
-            // return 
             if(res.Data.IndexExist){
               // 有重复
               this.existIndexList=[]
@@ -487,9 +498,10 @@ import { frequencyArr} from '../databaseComponents/util';
               let text=''
               existEdbInfo.map(item =>{
                 text=`${item.EdbName}(${item.EdbCode})`
-                this.existIndexList.push({text,code:item.UniqueCode,id:item.EdbInfoId,Types:item.ClassifyId})
+                this.existIndexList.push({text,code:item.UniqueCode,id:item.EdbInfoId,Types:item.ClassifyId,edbCode:item.EdbCode})
               })
               this.checkFailShow=true
+              this.indexAllExist=res.Data.ExistAll+'' =='false' ? false :res.Data.ExistAll || true
             }else{
               // 没有重复
               this.getTargetData()
@@ -498,27 +510,45 @@ import { frequencyArr} from '../databaseComponents/util';
         })
       },300),
       edbCheckFinished(){
+        if(!this.indexAllExist){
+          this.getTargetData()
+        }
         this.checkFailShow=false
       },
       getTargetData(){
         this.dataLoading=true
         this.getMenu()
         this.getTargetUnitList()
-        // TODO: 获取数据接口对接
-        dataBaseInterface.getTarget(params).then(res => {
+        let existEdbList = this.existIndexList.map(item => item.edbCode)
+        let afterFilterList=[]
+        if(this.checkAllStatus){
+          afterFilterList = Array.from(new Set([...this.tableDataCheckedList,...existEdbList]))
+        }else{
+          afterFilterList= this.tableDataCheckedList.filter(item => !existEdbList.includes(item))
+        }
+
+        // return 
+        let params={
+          Types:this.searchParams.Types,
+          Frequency:this.searchParams.Frequency,
+          DataState:this.searchParams.DataState,
+          SelectAll:this.checkAllStatus,
+          SelectCode:this.searchParams.IndexCodes,
+          EdbCode:afterFilterList.join(',')
+        }
+        smmDataInterface.getYsEdbCodeSearch(params).then(res => {
           if(res.Ret == 200){
-            let stockList = res.Data.SearchItem.StockList || []
+            let stockList = res.Data.StockSearchList || []
             this.edbIndexDatas=[]
             this.BatchList=[]
             stockList.map((item,index) =>{
               let params={
-                Source,
+                Source:11,
                 ClassifyId:0,
-                Unit:'',
-                Frequency:'日度',
-                EdbName:isCommon?`${item.StockCode}${isCommon.label}`:`${item.StockCode}${item.EdbCode}`,
+                Unit:item.Unit,
+                Frequency:this.edbFrequencyList.includes(item.Frequency)?item.Frequency:'',
+                EdbName:item.EdbName,
                 EdbCode:item.EdbCode,
-                StockCode:item.StockCode
               }
               this.BatchList.push(params)
               let datas = item.DataList || []
@@ -533,7 +563,7 @@ import { frequencyArr} from '../databaseComponents/util';
 
             let edbIndexDataLength = this.edbIndexDatas.length
             //填充空的列
-            for (let i = edbIndexDataLength; i < 6; i++) {
+            for (let i = edbIndexDataLength; i < 4; i++) {
               this.edbIndexDatas.push({
                 Source:0,
                 ClassifyId:0,
@@ -541,8 +571,7 @@ import { frequencyArr} from '../databaseComponents/util';
                 Frequency:'',
                 EdbName:'',
                 EdbCode:'',
-                StockCode:'',
-                DataList:new Array(10).fill({DataTime:'',Value:''})
+                DataList:new Array(10).fill({DataTime:'',Value:''}),
               })
             }
             this.addToEbdDiaShow=true
@@ -555,8 +584,8 @@ import { frequencyArr} from '../databaseComponents/util';
       getMenu() {
         dataBaseInterface.menuListV3().then(res => {
           if(res.Ret === 200) {
-            this.filterNodes(res.Data.AllNodes||[]);
             this.options = res.Data.AllNodes || [];
+            this.filterNodes(this.options);
           }
         })
       },
@@ -578,9 +607,19 @@ import { frequencyArr} from '../databaseComponents/util';
           })
         }
       },
-      wsdSaveHandle(){
+      //搜索单位
+      querySearchUnit(queryString, cb){
+        let results = queryString ? this.unitList.filter(item=>item.value.indexOf(queryString) === 0) : this.unitList;
+        // 调用 callback 返回建议列表的数据
+        cb(results);
+      },
+      existIndexClick({code,id,classifyId}){
+        const { href } = this.$router.resolve({ path: '/database',query:{code,id,classifyId}});
+        window.open(href, '_blank');
+      },
+      ysEdbSaveHandle(){
         let flag = this.edbIndexDatas.some(it => {
-				  return (it.StockCode && it.EdbCode) && ((!it.ClassifyId) || (!it.Unit) || (!it.Frequency) || (!it.EdbName))
+				  return it.Source && ((!it.ClassifyId) || (!it.Unit) || (!it.Frequency) || (!it.EdbName) || (!it.EdbCode))
         })
         if(flag){
           this.$message.warning("指标信息未填写完整")
@@ -591,15 +630,20 @@ import { frequencyArr} from '../databaseComponents/util';
           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
         })
         this.saveLoading=true
-        dataBaseInterface.edbAddBatch({BatchList:this.BatchList}).then(res=>{
+        // console.log({BatchList:this.BatchList});
+        // return 
+        smmDataInterface.ysEdbAddBatch({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 {href} = this.$router.resolve({
+              path:'/database',
+              query:{code:res.Data.UniqueCode,id:res.Data.EdbInfoId,classifyId:res.Data.ClassifyId}
+            });
+            window.open(href,'_blank');
+            this.addToEbdDiaShow=false	
           }else if(res.Ret == 403){
             this.highLightIndex=res.Data?res.Data.ExistEdbName || []:[]
           }
@@ -647,48 +691,85 @@ import { frequencyArr} from '../databaseComponents/util';
       bottom: 20px;
       right: 20px;
     }
-    .edb-table-preview {
-      overflow: auto;
-      height: calc(100% - 124px);
-      &::-webkit-scrollbar {
-        width: 5px !important;
-      }
-      table {
-        border-color: #dcdfe6;
-        border-bottom: 1px solid #dcdfe6;
-        border-right: 1px solid #dcdfe6;
-        border-collapse: separate;
+    .edb-table-box{
+      padding: 0 40px;
+      .edb-table-preview {
+        overflow: auto;
+        height: calc(100% - 124px);
+        &::-webkit-scrollbar {
+          width: 5px !important;
+        }
+        table {
+          border-color: #dcdfe6;
+          border-bottom: 1px solid #dcdfe6;
+          border-right: 1px solid #dcdfe6;
+          border-collapse: separate;
+        }
+        thead {
+          position: sticky;
+          z-index: 2;
+          top: 0;
+        }
+        td {
+          min-width: 100px;
+          max-width: 100px;
+          height: 30px;
+          // text-align: center;
+          color: #333;
+          box-sizing: border-box;
+          padding: 0 5px;
+          background-color: #fff;
+          border-top: 1px solid #dcdfe6;
+          border-left: 1px solid #dcdfe6;
+        }
+        .exist-highlight{
+          border: red solid 1px;
+        }
       }
-      thead {
-        position: sticky;
-        z-index: 2;
-        top: 0;
+      .dia-bot {
+        margin: 30px 0;
+        display: flex;
+        justify-content: center;
       }
-      td {
-        min-width: 100px;
-        max-width: 100px;
-        height: 30px;
-        // text-align: center;
-        color: #333;
-        box-sizing: border-box;
-        padding: 0 5px;
-        background-color: #fff;
-        border-top: 1px solid #dcdfe6;
-        border-left: 1px solid #dcdfe6;
+    }
+
+    .check-fail-box{
+      padding: 0 0 15px 40px;	
+      color: #333333;
+      .exist-index-item{
+        cursor: pointer;
+        &:hover{
+          text-decoration: underline;
+        }
       }
-      .exist-highlight{
-        border: red solid 1px;
+      .check-fail-button{
+        margin-top: 80px;
+        display: flex;
+        justify-content: flex-end;
       }
     }
-    .dia-bot {
-      margin: 30px 0;
-      display: flex;
-      justify-content: center;
-    }
   }
 </style>
 <style lang="scss">
   #YS-data-container{
+    .el-select{
+      .el-tag{
+        max-width: 100%;
+        display: inline-flex;
+        align-items: center;
+        .el-select__tags-text{
+          flex-grow: 1;
+          overflow: hidden;
+          text-overflow: ellipsis;
+        }
+        .el-tag__close{
+          min-width: 16px;
+        }
+      }
+      .el-select__input{
+        min-width: 80px;
+      }
+    }
     .edb-table-preview{
       border: 1px solid #dcdfe6;
       .el-cascader{