Karsa před 3 měsíci
rodič
revize
6c521e113e

+ 30 - 5
src/api/modules/thirdBaseApi.js

@@ -1410,14 +1410,16 @@ export const zhuochuangRedStageInterface = {
 	},
 
 	/**
-	 * 批量搜索指标
+	 * 搜索批量操作指标
 	 * @param {Object} params 
-	 * @param {String} ClassifyIds 目录列表 用,隔开
-	 * @param {String} Keyword
+	 * @param {int} ClassifyId 目录
+	 * @param {String} Keyword 
+	 * @param {[]} SelectedId 
+	 * @param {[]} IsSelectAll 
 	 * @returns 
 	 */
 	searchEdbBatch:params=>{
-		return http.get('/sci_hq/index/list',params)
+		return http.post('/datamanage/sci_hq/index/batch_list',params)
 	},
 
 	/**
@@ -1465,7 +1467,30 @@ export const zhuochuangRedStageInterface = {
 	 * @param {Number} params.ClassifyId
 	 * @returns 
 	 */
-	AddToLib:params=>{
+	addToLib:params=>{
 		return http.post('/datamanage/sci_hq/edb_info/add',params)
+	},
+
+	/**
+	 * 批量删除指标
+	 * @param {*} params
+    [{
+        "BaseFromSciHqIndexId":7
+		}]
+	 * @returns 
+	 */
+	batchDelEdb: params => {
+		return http.post('/datamanage/sci_hq/edb_info/batch_delete',params)
+	},
+
+	/**
+	 * 批量编辑指标分类
+	 * @param {* [
+	 * 	 {"BaseFromSciHqIndexId": 5,"ClassifyId":3}
+	 * 	]} params
+	 * @returns 
+	 */
+	batchEditEdb: params => {
+		return http.post('/datamanage/sci_hq/edb_info/batch_edit',params)
 	}
 }

binární
src/assets/img/set_m/add.png


binární
src/assets/img/set_m/del.png


binární
src/assets/img/set_m/edit.png


+ 8 - 0
src/lang/modules/DataSources/En.js

@@ -292,6 +292,14 @@ export default {
     previous:'Previous',
     blank:'Blank',
 
+  },
+
+  /* 卓创数据红期 */
+  SciHongqiPage: {
+    btn_batch_del: 'Bulk Delete',
+    btn_batch_edit: 'Bulk Edit',
+    handle_clear: 'Remove',
+    del_msg: 'Once deleted, the metrics cannot be recovered. Are you sure you want to delete the following metrics?',
   }
   
 }

+ 9 - 0
src/lang/modules/DataSources/Zh.js

@@ -295,5 +295,14 @@ export default {
     original:'不处理',
     previous:'沿用之前数据',
     blank:'空值',
+  },
+
+   /* 卓创数据红期 */
+  SciHongqiPage: {
+    btn_batch_del: '批量删除',
+    btn_batch_edit: '批量编辑',
+    handle_clear: '移除',
+    del_msg: '删除后不可恢复,是否确认删除以下指标?',
+
   }
 }

+ 36 - 9
src/views/dataEntry_manage/thirdBase/components/addIndicsDia.vue

@@ -67,7 +67,7 @@
 
 <script>
 import { dataBaseInterface } from '@/api/api.js';
-import { steelInterface } from "@/api/modules/thirdBaseApi";
+import { steelInterface,zhuochuangRedStageInterface } from "@/api/modules/thirdBaseApi";
 import selectUnit from '@/components/selectUnit.vue';
 import { frequencySelectList } from '@/utils/defaultOptions';
 export default {
@@ -130,8 +130,7 @@ export default {
     },
     methods: {
         filterNodes(arr) {
-            arr.length &&
-                arr.forEach((item) => {
+            arr.length && arr.forEach((item) => {
                     item.Children.length && this.filterNodes(item.Children);
                     if (!item.Children.length) {
                         delete item.Children;
@@ -147,14 +146,41 @@ export default {
         },
         async handleAddEdb(){
             //校验表单
-            try{
-                await this.$refs.targetForm.validate()
-            }catch(e){
-                return 
+            await this.$refs.targetForm.validate()
+            this.btnloading = true
+            
+            let saveApiMap = {
+                '/zchqDataBase': this.handleAddzchqApi,
+                '/steelChemical': this.handleAddSteelApi
             }
+
+            saveApiMap[this.$route.path] && saveApiMap[this.$route.path]()
+        },
+        
+        /* 卓创红期api */
+        async handleAddzchqApi() {
             const {code,edb_name,menu,frequency,unit} = this.formData
-            this.btnloading = true
-            //添加检测
+
+            const res = await zhuochuangRedStageInterface.addToLib({
+                EdbCode:code,
+                EdbName:edb_name,
+                Unit:unit,
+                Frequency:frequency,
+                ClassifyId:Number(menu),
+            })
+
+            this.btnloading=false
+            if(res.Ret !== 200) return 
+
+            this.$message.success(this.$t('MsgPrompt.add_msg2'))
+            this.$emit('addCallback')
+        },
+
+        /* 钢联化工api */
+        async handleAddSteelApi() {
+            const {code,edb_name,menu,frequency,unit} = this.formData
+
+             //添加检测
             const resAddCheck = await steelInterface.batchAddEdbCheck({
                 IndexCodes:[code]
             })
@@ -186,6 +212,7 @@ export default {
             this.$message.success(this.$t('MsgPrompt.add_msg2'))
             this.$emit('addCallback')
         },
+
         initDia(){
             this.btnloading=false
             this.getClassifyOpt()

+ 24 - 10
src/views/dataEntry_manage/thirdBase/components/addToBaseDia.vue

@@ -45,7 +45,7 @@
                   placeholder="请选择频率"
                 >
                   <el-option
-                    v-for="item in $parent.frequencyOptions"
+                    v-for="item in frequencyOptions"
                     :key="item.val"
                     :label="item.label"
                     :value="item.val"
@@ -95,6 +95,8 @@
 <script>
 import { dataBaseInterface } from '@/api/api.js';
 import { selfDataInterface } from '@/api/modules/dataSource';
+import { zhuochuangRedStageInterface } from "@/api/modules/thirdBaseApi";
+import { frequencySelectList } from '@/utils/defaultOptions';
 export default {
   props: {
     isShow: {
@@ -105,6 +107,11 @@ export default {
       default: () => []
     }
   },
+  computed: {
+    frequencyOptions() {
+      return frequencySelectList()
+    }
+  },
   data() {
     return {
       tableData:[],
@@ -130,6 +137,7 @@ export default {
 
       this.getClassifyOpt()
 
+      console.log(this.list)
       this.tableData = this.list.map(_=>({
         ..._,
         ClassifyId: 0
@@ -189,13 +197,19 @@ export default {
       })
     },
 
-    handleSave() {
+    async handleSave() {
 
       let haveIncomplete = this.tableData.some(_ => !_.IndexName||!_.ClassifyId||!_.Unit)
       if(haveIncomplete) return this.$message.warning('指标信息填写不完整')
 
       this.saveLoading = true;
-      selfDataInterface.batchSaveEdb(
+      
+      const handleApiMap = {
+        '/selfData':selfDataInterface.batchSaveEdb,
+        '/zchqDataBase': zhuochuangRedStageInterface.batchAddToLib
+      }
+
+      let res = await handleApiMap[this.$route.path](
           this.tableData.map(i=>({
             EdbCode: i.IndexCode,
             EdbName: i.IndexName,
@@ -204,15 +218,15 @@ export default {
             ClassifyId: i.ClassifyId,
             Source: i.Source
           }))
-      ).then(res=>{
-          this.saveLoading = false
+      )
 
-          if(res.Ret!==200) return 
-          this.$message.success(this.$t('MsgPrompt.add_msg2'))
+      this.saveLoading = false
 
-          this.cancelHandle();
-          this.$emit('success')
-      })
+      if(res.Ret!==200) return 
+      this.$message.success(this.$t('MsgPrompt.add_msg2'))
+
+      this.cancelHandle();
+      this.$emit('success')
     }
   },
 };

+ 181 - 0
src/views/dataEntry_manage/thirdBase/components/batchEditIndexDia.vue

@@ -0,0 +1,181 @@
+<template>
+  <!-- 添加到指标库弹窗 -->
+  <el-dialog
+    :title="$t('SciHongqiPage.btn_batch_edit')"
+    :visible.sync="isShow"
+    :close-on-click-modal="false"
+    :modal-append-to-body="false"
+    @close="cancelHandle"
+    width="1000px"
+    top="5vh"
+    v-dialogDrag
+    center
+  >
+    <div class="add-dialog-wrap">
+          <el-table 
+            :data="tableData" 
+            border 
+            height="500px"
+          >
+            <el-table-column :label="$t('Edb.Detail.e_id')" align="center" prop="IndexCode"/>
+            <el-table-column :label="$t('Edb.Detail.e_name')" align="center" width="210px" prop="IndexName"/>
+            <el-table-column :label="$t('Edb.Detail.e_unit')" align="center" width="150px" prop="Unit"/>
+            <el-table-column :label="$t('Edb.Detail.e_fre')" align="center" width="120px" prop="Frequency"/>
+            <el-table-column align="center" width="280px">
+                <template slot="header" slot-scope="scope">
+                    <span style="margin-right:40px;display:inline-block"><!-- 目录 -->{{$t('SelftDataPage.col_menu')}}</span>
+                    <el-radio-group 
+                      v-model="classifyType"
+                      @change="handleClassifyTypeChange"
+                    >
+                        <el-radio :label="0"><!-- 分目录 -->{{$t('SelftDataPage.col_part_menu')}}</el-radio>
+                        <el-radio :label="1"><!-- 同目录 -->{{$t('SelftDataPage.col_same_menu')}}</el-radio>
+                    </el-radio-group>
+                </template>
+                <template slot-scope="{row,$index}">
+                      <el-cascader
+                        v-model="row.ClassifyId"
+                        :options="classifyOpt"
+                        :props="levelProps"
+                        placeholder="请选择指标目录"
+                        :disabled="(classifyType===1&&$index>0)"
+                        @change="handleClassifyChange(row,$index)"
+                        class="cascader-wrapper"
+                      />
+                </template>
+            </el-table-column>
+          </el-table>
+    </div>
+
+    <div style="text-align: center; margin: 30px 0">
+      <el-button @click="cancelHandle">{{$t("Dialog.cancel_btn")}}</el-button>
+      <el-button
+        type="primary"
+        @click="handleBatchEdit"
+        :loading="saveLoading"
+      >
+        {{ $t("Dialog.confirm_save_btn") }}
+      </el-button>
+    </div>
+  </el-dialog>
+</template>
+<script>
+import { zhuochuangRedStageInterface } from "@/api/modules/thirdBaseApi";
+import { frequencySelectList } from '@/utils/defaultOptions';
+export default {
+  props: {
+    isShow: {
+      type: Boolean
+    },
+    list: {
+      type: Array,
+      default: () => []
+    },
+
+    classifyList: {
+      type: Array,
+      default: () => []
+    }
+  },
+  computed: {
+    frequencyOptions() {
+      return frequencySelectList()
+    }
+  },
+  data() {
+    return {
+      tableData:[],
+      saveLoading: false,
+
+      classifyType:0,
+      classifyOpt: [],
+
+      levelProps: {
+				label: 'ClassifyName',
+				value: 'ClassifyId',
+				children: 'Children',
+        emitPath:false
+			},
+    };
+  },
+  watch: {
+    isShow(nval) {
+      if(!nval) return
+
+      this.classifyOpt = _.cloneDeep(this.classifyList)
+      // this.filterNodes(this.classifyOpt)
+
+      console.log(this.list)
+      this.tableData = this.list.map(_=>({
+        ..._,
+        ClassifyId: 0
+      }))
+    }
+  },
+  methods: {
+
+    filterNodes(arr) {
+			arr.length &&
+				arr.forEach((item) => {
+					item.Children.length && this.filterNodes(item.Children);
+					if (!item.Children.length) {
+						delete item.Children;
+					}
+				});
+		},
+
+    cancelHandle() {
+      this.$emit('update:isShow',false)
+    },
+
+    // 同目录修改
+    handleClassifyChange(e,index){
+        if(this.classifyType===1){
+          // 修改所有的指标的目录为第一个
+          this.tableData.forEach(item=>{
+              item.ClassifyId=e.ClassifyId
+          })
+        }
+    },
+
+    handleClassifyTypeChange(){
+      this.handleClassifyChange(this.tableData[0])
+    },
+
+    async handleBatchEdit() {
+
+      let haveIncomplete = this.tableData.some(_ => !_.ClassifyId)
+      if(haveIncomplete) return this.$message.warning('指标信息填写不完整')
+
+      this.saveLoading = true;
+      
+      let res = await zhuochuangRedStageInterface.batchEditEdb(
+          this.tableData.map(i=>({
+            BaseFromSciHqIndexId: i.BaseFromSciHqIndexId,
+            ClassifyId: i.ClassifyId
+          }))
+      )
+
+      this.saveLoading = false
+
+      if(res.Ret!==200) return 
+      this.$message.success(this.$t('MsgPrompt.saved_msg'))
+
+      this.cancelHandle();
+      this.$emit('success')
+    }
+  },
+};
+</script>
+<style lang="scss" scoped>
+.add-dialog-wrap {
+  .name-cell {
+    position: relative;
+    .error {
+      position: absolute;
+      bottom: -16px;
+      color: #f00;
+    }
+  }
+}
+</style>

+ 312 - 0
src/views/dataEntry_manage/thirdBase/components/edbDataDetail.vue

@@ -0,0 +1,312 @@
+<template>
+  <div class="edb-detail-data-wrap">
+    <div class="handle-list">
+      <span 
+        class="editsty" 
+        @click="$emit('handle',{item:edbInfo,type:'edit'})"
+        v-if="permissionBtn.isShowBtn('dataSourcePermission','sciHongqi_opera_edit')
+      "><!-- 编辑 -->{{$t('Table.edit_btn')}}</span>
+
+      <span 
+        class="editsty" 
+        @click="$emit('handle',{item:edbInfo,type:'addToBase'})" 
+        v-if="!edbInfo.EdbExist&&permissionBtn.isShowBtn('dataSourcePermission','sciHongqi_opera_addBase')
+      "><!-- 加入指标库 -->{{$t('ManualEntryPage.add_tobase')}}</span>
+
+      <span 
+        class="editsty" 
+        v-if="permissionBtn.isShowBtn('dataSourcePermission','sciHongqi_opera_clear')" 
+        @click="$emit('handle',{item:edbInfo,type:'clear'})
+      "><!-- 移除 -->{{$t('SciHongqiPage.handle_clear')}}</span>
+
+      <span 
+        class="deletesty" 
+        @click="$emit('handle',{item:edbInfo,type:'del'})" 
+        v-if="!edbInfo.EdbExist&&permissionBtn.isShowBtn('dataSourcePermission','sciHongqi_opera_del')
+      "><!-- 删除 -->{{$t('Table.delete_btn')}}</span>
+    </div>
+		<el-table
+			:data="tableData"
+			class="firstColumTable" 
+      border
+    >
+			<el-table-column
+				v-for="item in tableColumsOne"
+				:key="item.key"
+				:width="item.widthsty"
+        :label="item.label"
+				:min-width="item.minwidthsty"
+				align="center">
+				<template slot-scope="scope">
+
+						<span v-if="item.key === 'Unit'">{{ getUnitTrans(scope.row.Unit) }}</span>
+						<span v-else-if="item.key === 'Frequency'">{{ getFrequencyTrans(scope.row.Frequency) }}</span>
+
+						<span v-else>{{ scope.row[item.key] }}</span>
+				</template>
+			</el-table-column>
+      <div slot="empty" style="padding: 50px 0 50px;">
+					<tableNoData :text="$t('Table.prompt_slogan')"/>
+			</div>
+		</el-table>
+
+    <div class="bottom">
+      <div 
+        class="value-ul" 
+        ref="valueUl"
+        @scroll="handleLoadData"
+      >
+        <div class="total-cont" :style="{height: totalHeight}" v-if="dataList.length"></div>
+        <ul 
+          class="list-wrapper" 
+          @contextmenu.prevent="handleRightClick"
+          v-if="dataList.length"
+        >
+          <li
+            class="value-item"
+            v-for="(item,rindex) in renderDataList"
+            :key="rindex"
+          >
+            <div 
+              class="value-label"
+            >
+              {{item.DataTime}}
+            </div>
+            <div 
+              class="value-label"
+              :data-rindex="rindex"
+              :data-cindex="1"
+            >
+              {{item.Value}}
+            </div>
+          </li>
+        </ul>
+
+        <tableNoData :text="$t('Table.prompt_slogan')" v-else/>
+      </div>
+    </div>
+	</div>
+</template>
+<script>
+import { zhuochuangRedStageInterface } from "@/api/modules/thirdBaseApi";
+export default {
+  props: {
+    id: {
+      type: String
+    }
+  },
+  computed: {
+		tableColumsOne(){
+			return [
+				{
+					label: this.$t('Edb.Detail.e_id'),
+					key: 'IndexCode',
+					minwidthsty: '150px'
+				},
+				{
+					label: this.$t('Edb.Detail.e_name'),
+					key: 'IndexName',
+					minwidthsty: '200px'
+				},
+				{
+					label: this.$t('Edb.Detail.e_fre'),
+					key: 'Frequency',
+					widthsty: '80px'
+				},
+				{
+					label: this.$t('Edb.Detail.e_unit'),
+					key: 'Unit',
+					widthsty: '100px'
+				},
+				{
+					label: this.$t('Edb.Detail.e_update_time'),
+					key: 'ModifyTime',
+				},
+			]
+		},
+
+		tableColumsTwo() {
+			return [
+				{
+					label: this.$t('Edb.Detail.e_menu'),
+					key: 'ClassifyName',
+					minwidthsty: '150px',
+				},
+				{
+					label: this.$t('Edb.Detail.e_start_time'),
+					key: 'StartDate',
+					minwidthsty: '115px',
+				},
+				{
+					label: this.$t('Edb.Detail.e_update_time'),
+					key: 'ModifyTime',
+					minwidthsty: '120px',
+				},
+				{
+					label: this.$t('Edb.creater'),
+					key: 'UserName',
+					widthsty: '160px',
+				}
+			]
+		},
+
+    totalHeight() {
+      return `${this.dataList.length*45}px`
+    },
+
+    renderDataList() {
+      return this.dataList.slice(this.startIndex,this.endIndex)
+    },
+
+    hasEditAuth() {
+      return this.permissionBtn.isShowBtn('dataSourcePermission','manualDataWrite_edit')
+    }
+
+  },
+  watch: {
+    id(newval) {
+      if(!newval) return 
+      this.$refs.valueUl.scrollTop = 0;
+      this.getEdbDetail()
+    }
+  },
+  data() {
+    return {
+      tableData: [],
+      edbInfo: {},
+      dataList: [],
+      startIndex: 0,
+      endIndex: 100,
+
+      readonly:  false,//日期只读
+      temInputVal:{},
+      tempTime:'',
+
+    }
+  },
+  mounted(){
+    this.getEdbDetail()
+  },
+  methods:{
+    /* 获取指标详情 */
+    async getEdbDetail() {
+      let loading = this.$loading({
+        lock: true,
+        text: `${this.$t('Table.data_loading')}...`,
+        target: '.edb-detail-data-wrap',
+        spinner: 'el-icon-loading',
+        background: 'rgba(255, 255, 255, 0.8)'
+      })
+
+      const res = await zhuochuangRedStageInterface.getEdbData({
+        BaseFromSciHqIndexId: this.id
+      })
+
+      loading.close()
+      if(res.Ret !== 200) return 
+      this.edbInfo = res.Data;
+      
+      this.tableData = [res.Data]
+      
+      this.dataList = res.Data.Data||[];
+      this.dataList.length && this.$nextTick(() => {
+        this.handleLoadData()
+      })
+    },
+
+    /* 滚动加载位置数据 */
+    handleLoadData: _.throttle(function() {
+      const scrollTop = this.$refs.valueUl.scrollTop;
+      const visibleCount = Math.ceil(
+        this.$refs.valueUl.clientHeight / 45
+      )+5;
+
+      console.log(visibleCount)
+
+      this.startIndex = Math.floor(scrollTop / 45);
+      this.endIndex = this.startIndex + visibleCount;
+
+      this.$nextTick(() => {
+        $('.list-wrapper')[0].style=`transform: translateY(${this.startIndex*45}px)`
+      })
+    },300),
+  },
+}
+</script>
+<style scoped lang='scss'>
+.edb-detail-data-wrap{
+	display: flex;
+	flex-direction: column;
+	height: 100%;
+	.firstColumTable{
+		box-shadow: 0px 3px 6px rgba(155, 170, 219, 0.2);
+	}
+  .handle-list { 
+    flex: 0;
+    display: flex;
+    justify-content: flex-end;
+    gap: 20px;
+    margin-bottom: 15px;
+  }
+	.el-table{
+		flex: none;
+	}
+  .bottom {
+    flex: 1;
+    display: flex;
+    overflow: hidden;
+    .value-ul{
+      flex: 1;
+      max-height: 100%;
+      overflow-y: auto;
+      border: 1px solid #EBEFF6;
+      box-shadow: 0px 3px 6px rgba(155, 170, 219, 0.2);
+      position: relative;
+      .total-cont {
+        position: absolute;
+        left: 0;
+        right: 0;
+        top: 0;
+        bottom: 0;
+        z-index: -2;
+      }
+      .list-wrapper {
+        left: 0;
+        right: 0;
+        top: 0;
+        position: absolute;
+        .value-item {
+          border-bottom: 1px solid #dcdfe6;
+          display: flex;
+          height: 45px;
+          line-height: 45px;
+
+          .value-label {
+            width: 50%;
+            position: relative;
+            text-align: center;
+            color: #666;
+            &:first-child {
+              border-right: 1px solid #dcdfe6;
+            }
+          }
+        }
+      }
+      .nodata {
+        text-align: center;
+        padding: 40px 0;
+        color: #999;
+      }
+    }
+
+    .left-select {
+      width: fit-content;
+      max-height: 90%;
+      border: 1px solid #EBEFF6;
+      padding: 10px 15px;
+      overflow-y: auto;
+      .el-button { display: block;margin:10px 0; }
+    }
+  }
+}
+</style>

+ 542 - 165
src/views/dataEntry_manage/thirdBase/zhuochuangRedStageBase.vue

@@ -6,22 +6,22 @@
           v-permission="permissionBtn.dataSourcePermission.sciHongqi_batch_addBase"
           type="primary" 
           size="medium" 
-          @click="isBatchAddIndicsDiaShow = true"
+          @click="handleBatchAddBase"
         ><!-- 批量加入指标库 -->{{$t('SteelChemicalPage.batch_add_edb_btn')}}</el-button>
         <el-button
           v-permission="permissionBtn.dataSourcePermission.sciHongqi_batch_del"
           type="primary" 
           size="medium"
           plain
-          @click="isBatchAddIndicsDiaShow = true"
-        >批量删除</el-button>
+          @click="handBatchDelEdb"
+        ><!-- 批量删除 -->{{$t('SciHongqiPage.btn_batch_del')}}</el-button>
         <el-button
           v-permission="permissionBtn.dataSourcePermission.sciHongqi_batch_edit"
           type="primary" 
           size="medium"
           plain
-          @click="isBatchAddIndicsDiaShow = true"
-        >批量编辑</el-button>
+          @click="handleBatchEdit"
+        ><!-- 批量编辑 -->{{$t('SciHongqiPage.btn_batch_edit')}}</el-button>
         <el-button
           v-permission="permissionBtn.dataSourcePermission.sciHongqi_export"
           type="primary"
@@ -35,7 +35,6 @@
       <div class="right-wrap">
         <el-select
 					v-model="leftSearchVal"
-					v-loadMore="searchLoad"
 					ref="searchRef"
 					:filterable="!leftSearchVal"
 					remote
@@ -43,14 +42,13 @@
 					:placeholder="$t('Edb.InputHolderAll.input_name_orid')"
 					style="width: 260px;margin-left:10px;"
 					:remote-method="searchHandle"
-					@click.native="inputFocusHandle"
 				>
 					<i slot="prefix" class="el-input__icon el-icon-search"></i>
 					<el-option
 						v-for="item in searchOptions"
-						:key="item.TradeCode"
-						:label="item.SecName"
-						:value="item.TradeCode"
+						:key="item.BaseFromSciHqIndexId"
+						:label="item.IndexName"
+						:value="item.BaseFromSciHqIndexId"
 					/>
 				</el-select>
       </div>
@@ -83,7 +81,7 @@
               children: 'Children',
               isLeaf:'isLeaf'
             }"
-            :allow-drag="canDragHandle"
+            :allow-drag="permissionBtn.isShowBtn('dataSourcePermission','sciHongqi_classify_move')"
             :allow-drop="canDropHandle"
             :current-node-key="select_node"
             :default-expanded-keys="defaultShowNodes"
@@ -102,7 +100,7 @@
               <div
                 class="text_oneLine"
                 :style="`width:${
-                  (select_node === data.UniqueCode && node.Nodewidth) || ''
+                  select_node === data.UniqueCode ? '60%' :'100%'
                 }`"
               >
                 <span v-if="data.IndexCode">{{data.IndexName}}</span>
@@ -115,26 +113,26 @@
                 <img
                   src="~@/assets/img/data_m/move_ico.png"
                   v-if="permissionBtn.isShowBtn('dataSourcePermission','sciHongqi_classify_move')"
-                  style="width: 14px; height: 14px; margin-right: 5px"
+                  style="width: 16px; height: 16px; margin-right: 5px"
                   @click.stop="clickClassifyHandle('move', data, node)"
                 />
                 <img
                   src="~@/assets/img/set_m/add.png"
-                  style="width: 14px; height: 14px; 
+                  style="width: 16px; height: 16px; 
                   margin-right: 5px"
-                  v-if="node.level===1"
+                  v-if="node.level===1&&permissionBtn.isShowBtn('dataSourcePermission','sciHongqi_classify_add')"
                   @click.stop="clickClassifyHandle('add', data, node)"
                 />
                 <img
                   src="~@/assets/img/set_m/edit.png"
-                  v-if="permissionBtn.isShowBtn('dataSourcePermission','sciHongqi_classify_edit')"
+                  v-if="node.level!==3&&permissionBtn.isShowBtn('dataSourcePermission','sciHongqi_classify_edit')"
                   alt=""
-                  style="width: 14px; height: 14px; margin-right: 5px"
+                  style="width: 16px; height: 16px; margin-right: 5px"
                   @click.stop="clickClassifyHandle('edit', data, node)"
                 />
                 <img
                   src="~@/assets/img/set_m/del.png"
-                  v-if="permissionBtn.isShowBtn('dataSourcePermission','sciHongqi_classify_del')"
+                  v-if="node.level!==3&&permissionBtn.isShowBtn('dataSourcePermission','sciHongqi_classify_del')"
                   alt=""
                   style="width: 14px; height: 14px"
                   @click.stop="clickClassifyHandle('del', data, node)"
@@ -143,8 +141,8 @@
             </div>
           </el-tree>
 
-          <div class="add-cont" @click="addClassifyHandle" >
-            <!-- v-if="permissionBtn.isShowBtn('dataSourcePermission','sciHongqi_classify_add')" -->
+          <div class="add-cont" @click="addClassifyHandle" v-if="permissionBtn.isShowBtn('dataSourcePermission','sciHongqi_classify_add')">
+
             <img
               src="~@/assets/img/set_m/add_ico.png"
               alt=""
@@ -160,59 +158,71 @@
         v-loading="dataloading"
         :element-loading-text="$t('Table.data_loading')"
       >
-        <div class="right-header">
-
-        </div>
-        
-         <el-table
+        <template v-if="!selectEdb">
+          <div class="right-header">
+            <el-checkbox 
+              v-model="filterObj.checkAll"
+              :indeterminate="filterObj.checkSome"
+              :disabled="tableData.length===0"
+              style="margin-left:20px" 
+              @change="listCheckAllChange"
+            ><!-- 列表全选 -->{{$t('SystemManage.OperateAuth.all_select')}}</el-checkbox>
+          </div>
+          
+          <el-table
             :data="tableData"
             style="box-shadow: 0px 3px 6px rgba(155, 170, 219, 0.2);margin-top: 20px"
             border
             ref="table"
+            @selection-change="selectionChange"
+            @select="selectHandle" 
+            @select-all="selectAllPageHandle"
           >
-            <el-table-column
-              v-for="item in tableColums"
-              :key="item.key"
-              :label="item.label"
-              :width="item.widthsty"
-              :min-width="item.minwidthsty"
-              align="center"
-            >
-              <template slot-scope="{row}">
-                <span v-if="item.key==='SecName'" class="editsty" @click="lookDetailHandle(row)">{{row[item.key]}}</span>
-                <span v-else>{{row[item.key]}}</span>
-              </template>
-            </el-table-column>
-
-            <el-table-column
-              :label="$t('Table.column_operations')"
-              align="center"
-              min-width="200"
-            >
-              <template slot-scope="{row}">
-                <div>
-                  <span 
-                    class="editsty" 
-                    @click="handleEdb({item:row,type:'edit'})"
-                  >{{$t('Table.edit_btn')}}</span>
-
-                  <span v-if="permissionBtn.isShowBtn('dataSourcePermission','manualDataWrite_add')" class="editsty" @click="handleEdb({item:row,type:'addToBase'})"><!-- 加入指标库 -->{{$t('ManualEntryPage.add_tobase')}}</span>
-
-                  <span 
-                    v-if="permissionBtn.isShowBtn('dataSourcePermission','manualDataWrite_del')" 
-                    class="deletesty" 
-                    @click="handleEdb({item:row,type:'del'})"
-                  >{{$t('Table.delete_btn')}}</span>
-                </div>
-
-                
-              </template>
-            </el-table-column>
-            <div class="nodata" slot="empty">
-              <tableNoData :text="$t('Table.prompt_slogan')" size="mini"/>
-            </div>
+              <el-table-column type="selection"/>
+              <el-table-column
+                v-for="item in tableColums"
+                :key="item.key"
+                :label="item.label"
+                :width="item.widthsty"
+                :min-width="item.minwidthsty"
+                align="center"
+              >
+                <template slot-scope="{row}">
+                  <span v-if="item.key==='IndexName'" class="editsty" @click="nodeChangeHandle(row)">{{row[item.key]}}</span>
+                  <span v-else>{{row[item.key]}}</span>
+                </template>
+              </el-table-column>
+
+              <el-table-column
+                :label="$t('Table.column_operations')"
+                align="center"
+                min-width="200"
+              >
+                <template slot-scope="{row}">
+                  <div>
+                    <span
+                      v-if="permissionBtn.isShowBtn('dataSourcePermission','sciHongqi_opera_edit')"
+                      class="editsty" 
+                      @click="handleEdb({item:row,type:'edit'})"
+                    >{{$t('Table.edit_btn')}}</span>
+
+                    <span v-if="!row.EdbExist&&permissionBtn.isShowBtn('dataSourcePermission','sciHongqi_opera_addBase')" class="editsty" @click="handleEdb({item:row,type:'addToBase'})"><!-- 加入指标库 -->{{$t('ManualEntryPage.add_tobase')}}</span>
+
+                    <span 
+                      v-if="!row.EdbExist&&permissionBtn.isShowBtn('dataSourcePermission','sciHongqi_opera_del')" 
+                      class="deletesty" 
+                      @click="handleEdb({item:row,type:'del'})"
+                    >{{$t('Table.delete_btn')}}</span>
+                  </div>
+
+                  
+                </template>
+              </el-table-column>
+              <div class="nodata" slot="empty">
+                <tableNoData :text="$t('Table.prompt_slogan')" size="mini"/>
+              </div>
           </el-table>
-          
+            
           <div style="height:35px;margin: 20px 0;">
             <m-page
               :page_no="page_no"
@@ -221,6 +231,15 @@
               @handleCurrentChange="handlePageChange"
             />
           </div>
+        </template>
+
+        <template v-else>
+          <edbDataDetail
+            ref="edbDetailRef"
+            :id="selectEdb"
+            @handle="handleEdb"
+          />
+        </template>
       </div>
     </div>
 
@@ -244,7 +263,21 @@
           <el-form-item :label="$t('SteelChemicalPage.label_one_level')"  v-if="classifyForm.parent_classify_id">
             <span>{{ classifyForm.parent_classify_name }}</span>
           </el-form-item>
-          <el-form-item :label="$t('SteelChemicalPage.label_classify_name')" prop="classify_name">
+          <el-form-item :label="$t('SteelChemicalPage.label_classify_name')" prop="classifyId" v-if="classifyForm.indexId">
+            <el-cascader
+              v-model="classifyForm.classify_id"
+              style="width: 80%"
+              :options="classifyList"
+              :props="{
+                label: 'ClassifyName',
+                value: 'ClassifyId',
+                children: 'Children',
+                emitPath:false
+              }"
+              :placeholder="$t('SteelChemicalPage.ph_classify_name')"
+            />
+          </el-form-item>
+          <el-form-item :label="$t('SteelChemicalPage.label_classify_name')" prop="classify_name" v-else>
             <el-input
               v-model="classifyForm.classify_name"
               style="width: 80%"
@@ -266,29 +299,56 @@
       </div>
     </m-dialog>
 
-    <!-- 指标弹窗 -->
-    <target-dialog
-      :isOpenDialog.sync="addTargetDialog"
-      :classifyList="classifyList"
-      :edbForm="edbForm"
-      @successCallback="addSuccessCallback"
+    <!-- 批量入库 -->
+    <addToBaseDia
+      :isShow.sync="isAddToBaseDia"
+      :list="addToBaseList"
+      @success="() => { listCheckAllChange(false);handlePageChange(1)}"
     />
-    <!-- 批量添加指标弹窗 -->
-    <batch-add-edb-dia :isOpenDialog.sync="batchAddDiaShow" 
-    :classifyList="classifyList" 
-    @successCallback="addSuccessCallback"/>
-    <!-- 批量添加至指标库弹窗 -->
-    <batchAddIndicsDia 
-        :isOpenDialog="isBatchAddIndicsDiaShow"
-        @close="isBatchAddIndicsDiaShow=false"
+
+    <!-- 批量编辑index分类 -->
+    <batchEditIndexDia
+      :isShow.sync="isBatchEditIndexDia"
+      :list="addToBaseList"
+      :classifyList="classifyList"
+      @success="getClassify"
     />
+
     <!-- 单个添加至指标库弹窗 -->
     <addIndicsDia 
-        :isOpenDialog="isAddIndicsDiaShow"
-        :edbData="currentIndicData"
-        @close="isAddIndicsDiaShow=false;"
-        @addCallback="isAddIndicsDiaShow=false;"
+      :isOpenDialog="isAddIndicsDiaShow"
+      :edbData="currentIndicData"
+      @close="isAddIndicsDiaShow=false;"
+      @addCallback="intoBaseBack"
     />
+
+    <!-- 操作提示弹窗 -->
+    <el-dialog 
+      :title="$t('BloombergPage.operation_prompt')"
+      :visible.sync="isHintDialogShow"
+      :close-on-click-modal="false"
+      :modal-append-to-body="false"
+      @close="isHintDialogShow=false"
+      width="578px"
+      v-dialogDrag
+      center>
+      <div class="hint-dialog-wrap">
+          <p style="margin-bottom: 20px;">{{ hintText }}</p>
+          <ul>
+              <li v-for="(item,index) in (existEdbList||batchDelList)" :key="index" class="hint-item" @click="goToEdbBase(item)">
+                  {{ index+1 }}、{{ item.IndexName }}({{ item.IndexCode }})
+              </li>
+          </ul>
+      </div>
+      <div style="text-align: center;margin-bottom: 30px;">
+          <el-button type="primary" @click="handleCloseHintDia" v-if="existEdbList.length">{{$t('Dialog.known')}}</el-button>
+
+          <template v-if="batchDelList.length">
+            <el-button type="primary" @click="isHintDialogShow=false" plain><!-- 取消 -->{{$t('Dialog.cancel_btn')}}</el-button>
+            <el-button type="primary" @click="handleCloseHintDia"><!-- 确定 -->{{$t('Dialog.confirm_btn')}}</el-button>
+          </template>
+      </div>
+    </el-dialog>
   </div>
 
 </template>
@@ -296,9 +356,14 @@
 <script>
 import { zhuochuangRedStageInterface } from "@/api/modules/thirdBaseApi";
 import mDialog from "@/components/mDialog.vue";
+import mPage from '@/components/mPage.vue';
+import edbDataDetail from './components/edbDataDetail.vue';
+import addIndicsDia from './components/addIndicsDia.vue';
+import addToBaseDia from './components/addToBaseDia.vue';
+import batchEditIndexDia from './components/batchEditIndexDia.vue';
 export default {
   name: "",
-  components: { mDialog, },
+  components: { mDialog,edbDataDetail,mPage,addIndicsDia,addToBaseDia,batchEditIndexDia },
   computed: {
     exportGlapi() {
       // 数据导出接口
@@ -323,6 +388,28 @@ export default {
         {  label: this.$t('Edb.Detail.e_update_time'),key: 'ModifyTime', },
       ]
     },
+
+    hintText(){
+        let key = 0
+        if(this.existEdbList.length) key++
+        if(!this.addToBaseList.length) key++
+        if(this.batchDelList.length) key = 3
+
+        return {
+            0:'',
+            1:this.$t('YsDataPage.haved_all_msg'),//本次添加的指标均已在指标库中,请勿重复添加!
+            2:this.$t('YsDataPage.haved_some_msg'),//指标库中已存在以下指标,会自动过滤!
+            3: this.$t('SciHongqiPage.del_msg')
+        }[key]
+    }
+  },
+  watch: {
+    leftSearchVal(nval) {
+      if(!nval) return
+
+      this.selectEdb = nval;
+      this.selectClassify = 0;
+    }
   },
   data() {
     return {
@@ -332,6 +419,7 @@ export default {
 
       selectClassify:0,
       leftSearchVal: "",
+      searchOptions: [],
       classifyList: [],
       defaultShowNodes: [], //展开节点
     
@@ -340,8 +428,14 @@ export default {
       total:0,
       page_size: 10,
       page_no: 1,
+      filterObj: {
+        checkAll: false,
+        checkSome: false,
+      },
+      isSelectAll: false, //真正意义上的全选或不全选
+      checkedList: [], //不全选勾选中的 或 全选取消勾的
+      selectionReactCancel:false,//手动设置选中
 
-      index_code: "", //添加指标后的code,无论是否加载出来,无论是否加载成功
       select_node: "",
 
       /* 分类弹窗 */
@@ -358,27 +452,225 @@ export default {
         ],
       },
 
-      addTargetDialog: false, //指标弹窗
-      edbForm: {},
-
       //批量添加指标弹窗
-      batchAddDiaShow:false,
+      isAddToBaseDia: false,
+      addToBaseList: [],//可加入的指标
+      existEdbList: [],//已存在的指标
+      batchDelList: [],
 
-      isBatchAddIndicsDiaShow:false, //批量添加至指标库弹窗
       isAddIndicsDiaShow:false,//单个添加至指标库弹窗
       currentIndicData:{},//当前选中指标
+
+      //批量编辑
+      isBatchEditIndexDia: false,
+
+      /* 提示弹窗 */
+      isHintDialogShow: false,
     };
   },
   mounted() {
     this.getClassify();
-    this.getEdbList();
+    this.getEdbList('init');
   },
   methods: {
+    /* 批量入库 */
+    async handleBatchAddBase() {
+      let res = await this.getBatchEdbList()
+      if(!res.Data) return
+
+      const checkRes = await zhuochuangRedStageInterface.batchAddEdbCheck({IndexCodes:res.Data.map(_ => _.IndexCode)})
+      if(checkRes.Ret !== 200) return 
+
+      const edbList = checkRes.Data||[]
+      this.batchDelList = [];
+      this.existEdbList = edbList.filter(i=>i.EdbExist===1)
+      this.addToBaseList = edbList.filter(i=>i.EdbExist===0)
+
+      this.existEdbList.length&&(this.isHintDialogShow=true)
+      !this.existEdbList.length&&this.handleCloseHintDia()
+    },
+
+    /* 批量编辑 */
+   async handleBatchEdit() {
+      let res = await this.getBatchEdbList()
+      if(!res.Data) return
+      
+      this.addToBaseList= res.Data;
+      this.isBatchEditIndexDia = true
+    },
+
+    /* 批量删除 */
+    async handBatchDelEdb() {
+      this.addToBaseList= []
+      this.existEdbList= []
+
+      let res = await this.getBatchEdbList()
+      if(!res.Data) return
+
+      this.batchDelList = res.Data;
+      this.batchDelList.length&&(this.isHintDialogShow=true)
+
+    },
+
+    async handBatchDelApi() {
+      let res = await zhuochuangRedStageInterface.batchDelEdb(
+        this.batchDelList.map(_ => ({ BaseFromSciHqIndexId:_.BaseFromSciHqIndexId }))
+      )
+      if(res.Ret !== 200) return 
+
+      this.$message.success(/* '删除成功!' */this.$t('MsgPrompt.delete_msg'));
+      this.getClassify();
+      this.getEdbList()
+    },
+
+    //提示弹窗关闭
+    async handleCloseHintDia(){
+        this.isHintDialogShow = false
+
+        if(this.batchDelList.length) return this.handBatchDelApi()
+
+        //判断是否要展示下一个弹窗
+        if(!this.addToBaseList.length) return
+        
+        if(this.addToBaseList.length>30) return this.$message.warning('批量添加指标数量不得超过30个!')
+
+        this.isAddToBaseDia = true
+    },
+
+     //跳转至指标详情
+    goToEdbBase(data){
+        const {EdbClassifyId,EdbInfoId,EdbUniqueCode} = data||{}
+        const { href } = this.$router.resolve({
+            path:'/database',
+            query:{
+                code:EdbUniqueCode,
+                id:EdbInfoId,
+                classifyId:EdbClassifyId,
+            }
+        })
+        window.open(href,"_blank")
+    },
+
+    /* 获取所有批量操作的指标信息 */
+    async getBatchEdbList() {
+      
+      if(!this.checkedList.length && !this.isSelectAll) return this.$message.warning('请选择指标')
+      return new Promise(async(resolve,reject) => {
+        const res = await zhuochuangRedStageInterface.searchEdbBatch({
+          ClassifyId: this.selectClassify,
+          Keyword: this.leftSearchVal,
+          SelectedId: this.checkedList.map(_=>Number(_.BaseFromSciHqIndexId)),
+          isSelectAll: this.isSelectAll
+        })
+
+        resolve(res)
+      })
+      
+    },
+
+    async searchHandle(query) {
+      if(!query) return 
+
+      const res = await zhuochuangRedStageInterface.searchEdb({
+        Keyword: query
+      })
+      if(res.Ret !== 200) return
+
+      this.searchOptions = res.Data || []
+    },
+
+    /* 指标操作 */
+    handleEdb({item,type}) {
+      const typeMap = {
+        'edit': this.handleEditEdb,
+        'addToBase': this.handleAddToBase,
+        'clear': this.handleClear,
+        'del': this.handleDelEdb
+      }
+
+      typeMap[type]&&typeMap[type](item)
+    },
+    
+    /* 编辑指标 */
+    handleEditEdb(item) {
+      this.openClassifyDia = true;
+        this.classifyForm = {
+          title: "编辑分类",
+          classify_name: '',
+          indexId: item.BaseFromSciHqIndexId,
+          classify_id: item.ClassifyId,
+          parent_classify_name:"",
+          parent_classify_id: "",
+        };
+    },
+    async handleEditEdbApi() {
+      const res = await zhuochuangRedStageInterface.edbEdit({
+        BaseFromSciHqIndexId: this.classifyForm.indexId,
+        ClassifyId: this.classifyForm.classify_id
+      })
+      if(res.Ret !== 200) return 
+      this.$message.success(/* "保存成功" */this.$t('MsgPrompt.saved_msg'));
+      this.cancelDialogHandle();
+      this.getClassify()
+    },  
+
+    /* 加入指标库 */
+    handleAddToBase(item){
+      //打开弹窗
+      this.currentIndicData = {
+        ...item,
+        FrequencyName: item.Frequency,
+        UnitName: item.Unit
+      }
+      this.isAddIndicsDiaShow = true
+    },
+
+    intoBaseBack() {
+      this.isAddIndicsDiaShow = false
+      if(this.selectedEdb){
+        this.$refs.edbDetailRef.edbInfo.EdbExist=1
+      }else {
+        this.getEdbList()
+      }
+    },
+    
+    /* 清除 */
+    async handleClear(item) {
+      const res = await zhuochuangRedStageInterface.clearEdbClassify({
+        BaseFromSciHqIndexId: item.BaseFromSciHqIndexId
+      })
+      if(res.Ret !== 200) return 
+      
+      this.$message.success(this.$t('MsgPrompt.clean_classify_msg'));
+      this.getClassify();
+    },
+
+    /* 删除指标 */
+    handleDelEdb(item) {
+     
+      this.$confirm(
+        this.$t('ManualEdbListPage.del_edb_msg'),
+        this.$t('Dialog.warn_tit'),{
+        type:'warning'
+      }).then(async() => {
+        const res = await zhuochuangRedStageInterface.edbDel({
+          BaseFromSciHqIndexId:item.BaseFromSciHqIndexId
+        })
+        
+        if( res.Ret !== 200 ) return
+        this.$message.success(/* '删除成功!' */this.$t('MsgPrompt.delete_msg'));
+        this.selectEdb = 0;
+        this.getClassify();
+        this.getEdbList()
+      }).catch(() => {});
+    },
+
     /* 获取分类 */
     getClassify(params = null) {
       zhuochuangRedStageInterface.classifyList().then((res) => {
         if (res.Ret !== 200) return;
         this.classifyList = res.Data || [];
+        this.filterNodes(this.classifyList)
 
         this.$nextTick(() => {
           /* 处理树展开和选中 */
@@ -390,6 +682,16 @@ export default {
       });
     },
 
+    filterNodes(arr) {
+			arr.length &&
+				arr.forEach((item) => {
+					item.Children&&item.Children.length && this.filterNodes(item.Children);
+					if (!item.Children||!item.Children.length) {
+						delete item.Children;
+					}
+				});
+		},
+
     //指标懒加载
     async getLazyTreeData(node,resolve){
       let arr=[]
@@ -414,34 +716,141 @@ export default {
     },
 
     /* 获取数据 */
-    async getEdbList() {
+    async getEdbList(type='pageChange') {
       const res = await zhuochuangRedStageInterface.getEdbList({
         PageSize: this.page_size,
-        CurrentIndex: this.page_no
+        CurrentIndex: this.page_no,
+        ClassifyId: this.selectClassify
       })
       
       if(res.Ret !== 200) return 
 
       this.tableData =res.Data.List||[]
+      this.total = res.Data.Paging.Totals;
+
+      if(type==='filter'){
+          this.listCheckAllChange(true)
+      }else {
+        //页码变化 选中项不做清空
+        this.checkedSomeSelection()
+
+      }
     },
 
-    handlePageChange(page) {
-      this.page_no = page;
-      this.getEdbList()
+    /* 设置当页数据勾选状态 */
+    checkedSomeSelection() {
+      this.selectionReactCancel=true
+
+      if(!this.isSelectAll){
+          this.checkedList.map(_ =>{
+              let row = this.tableData.find(item => item.IndexCode===_.IndexCode)
+              if(row){ //设置部分选中
+                  setTimeout(()=>{
+                      this.$refs.table.toggleRowSelection(row,true)
+                  },20)
+              }
+          })
+      }else{
+          this.$refs.table &&this.$refs.table.toggleAllSelection()
+          this.checkedList.map(_ =>{
+              let row = this.tableData.find(item => item.IndexCode===_.IndexCode)
+              if(row){ //设置部分不勾选
+                  setTimeout(()=>{
+                      this.$refs.table.toggleRowSelection(row,false)
+                  },20)
+              }
+          })
+      }
+      setTimeout(()=>{
+          this.selectionReactCancel=false
+      },30)
+    },
+
+    //列表全选或全不选
+    listCheckAllChange(value){
+      this.checkedList = []
+      this.isSelectAll = value
+      this.$refs.table && this.$refs.table.clearSelection()
+
+      value && this.$refs.table && this.$refs.table.toggleAllSelection()
+    },
+
+    selectionChange() {
+      if(this.selectionReactCancel) return
+
+        //设置全选框状态 选中 半选 不选
+        setTimeout(()=>{
+            let filterChecked = Array.from(new Set(this.checkedList))
+            //全选
+            if(
+              (filterChecked.length===this.total&&this.total>0 && (!this.isSelectAll))
+                || (filterChecked.length === 0 && this.isSelectAll)
+            ){
+                this.filterObj.checkAll = true
+                this.filterObj.checkSome = false
+            //不选
+            }else if(
+              (filterChecked.length === 0 && (!this.isSelectAll))
+              || (filterChecked.length === this.total && this.isSelectAll)
+            ){
+                this.filterObj.checkAll = false
+                this.filterObj.checkSome = false
+            //半选
+            }else{
+                this.filterObj.checkAll = false
+                this.filterObj.checkSome=true
+            }
+        },1)
+    },
+
+    //单选
+    selectHandle(selection,row){ //当前选中的项是进选中还是取消选中中
+        if(this.selectionReactCancel) return 
+
+        //当前项是选中还是取消选
+        let haveChecked = selection.some(_ => _.IndexCode === row.IndexCode);
+
+        //全选取消选和不全选选中才有意义
+        if((haveChecked&&!this.isSelectAll) || (!haveChecked&&this.isSelectAll)) {
+          this.checkedList.push(row)
+        }else {
+          this.checkedList=this.checkedList.filter(_ => _.IndexCode!==row.IndexCode)
+        }
     },
 
-    lookDetailHandle() {
+    //整列选
+    selectAllPageHandle(selection){
+        if(this.selectionReactCancel) return 
+        
+        //当前页是选中还是取消
+        let haveChecked = selection && selection.length>0;
+
+        //全选取消选和不全选选中才有意义
+        if((haveChecked&&!this.isSelectAll) || (!haveChecked&&this.isSelectAll)) {
+          this.checkedList = [...this.checkedList,...this.tableData]
+        }else {
 
+          let pageIds = this.tableData.map(_ => _.IndexCode);
+          this.checkedList = this.checkedList.filter(_ => !pageIds.includes(_.IndexCode))
+        }
     },
 
+    handlePageChange(page) {
+      this.page_no = page;
+      this.getEdbList()
+    },
 
     /* 改变节点 */
     nodeChangeHandle(data, node) {
      
       this.select_node = data.UniqueCode;
-      this.selectClassify = data.ClassifyId;
+      this.selectClassify = data.BaseFromSciHqIndexId?0:data.ClassifyId;
       this.selectEdb = data.BaseFromSciHqIndexId;
-      this.index_code = data.IndexCode;
+
+      if(this.selectClassify){
+        this.page_no = 1;
+        this.getEdbList();
+      }
     },
 
     /* 数据导出 */
@@ -474,17 +883,6 @@ export default {
       }
     },
 
-    // 选中左侧搜索值
-    handleSelectLeftSearchval(e) {
-      if (!e.IndexCode) return;
-
-      this.leftSearchVal = e.IndexName;
-
-      // 父级
-      let selectClassifyNodes=[`${e.ParentClassifyId}`,`${e.ClassifyId}`]
-      this.getClassify({ code: e.UniqueCode, id: e.Id ,selectClassifyNodes});
-    },
-
     /* 编辑分类 */
     async editClassifyHandle(
       {
@@ -496,20 +894,6 @@ export default {
       },
       node
     ) {
-      if (node.level === 3) {
-        // 指标
-        let { Data } = await zhuochuangRedStageInterface.edbDetail({
-          BaseFromSciHqIndexId,
-        });
-        this.edbForm = {
-          selectEdb: Data.BaseFromSciHqIndexId,
-          classify_id: Data.ClassifyId,
-          from_edb_code: Data.IndexCode,
-          frequency: Data.UpdateWeek,
-          update_time: Data.UpdateTime ? Data.UpdateTime.split(",") : [],
-        };
-        this.addTargetDialog = true;
-      } else {
         //分类
         this.openClassifyDia = true;
         this.classifyForm = {
@@ -520,7 +904,6 @@ export default {
             node.level === 2 ? (this.currentLang==='zh'?node.parent.data.ClassifyName:node.parent.data.ClassifyNameEn) : "",
           parent_classify_id: node.level === 2 ? ParentId : "",
         };
-      }
     },
 
     /* 删除分类 */
@@ -529,23 +912,15 @@ export default {
       node
     ) {
       this.$confirm(
-        `${
-          node.level === 3
-            ? this.$t('SteelChemicalPage.del_edb_msg')
-            : this.$t('SteelChemicalPage.del_classify_edb_msg')
-        }`,
+        this.$t('SteelChemicalPage.del_classify_edb_msg'),
         this.$t('Dialog.warn_tit'),
         {
           type: "warning",
         }
-      )
-        .then(async () => {
-          let res =
-            node.level === 3
-              ? await zhuochuangRedStageInterface.edbDel({ BaseFromSciHqIndexId })
-              : await zhuochuangRedStageInterface.classifyDel({
-                  ClassifyId,
-                });
+      ).then(async () => {
+          let res = await zhuochuangRedStageInterface.classifyDel({
+            ClassifyId,
+          });
 
           if (res.Ret !== 200) return;
 
@@ -583,13 +958,20 @@ export default {
 
     cancelDialogHandle() {
       this.$refs.classifyFormRef.clearValidate();
-      this.classifyForm.classify_name = "";
+      this.classifyForm = {
+        title: "添加分类",
+        classify_name: "",
+        parent_classify_name: "",
+        parent_classify_id: "",
+      };
       this.openClassifyDia = false;
     },
 
     /* 保存分类 */
     async saveClassifyHandle() {
       await this.$refs.classifyFormRef.validate();
+      
+      if(this.classifyForm.indexId) return this.handleEditEdbApi();
 
       let params = {
         ClassifyName: this.classifyForm.classify_name,
@@ -610,23 +992,6 @@ export default {
       this.openClassifyDia = false;
     },
 
-    handleAddToLib(data){
-        //添加前校验 ID是否已存在指标库中
-        //打开弹窗
-        this.currentIndicData = data
-        this.isAddIndicsDiaShow = true
-    },
-    addToLibCallback(){
-        //添加成功回调 
-        this.isAddIndicsDiaShow = false
-    },
-
-    /* 添加后回调 */
-    addSuccessCallback({ code, id,selectClassifyNodes,indexCode }) {
-      indexCode && (this.index_code = indexCode)
-      this.getClassify({ code, id,selectClassifyNodes });
-    },
-
     // 对[# ;]转义
     escapeStr(str) {
       return str.replace(/#/g, escape("#")).replace(/;/g, escape(";"));
@@ -653,11 +1018,6 @@ export default {
       });
     },
 
-    /* 判断节点是否能被拖拽 */
-    canDragHandle({data}) {
-      return true
-    },
-
     /* 判断节点是否能被拖入 */
     canDropHandle(draggingNode, dropNode, type) {
       let canDrop = false;
@@ -882,7 +1242,10 @@ export default {
       flex:1;
       padding: 30px;
       position: relative;
-     
+      .right-header {
+        display: flex;
+        justify-content: flex-end;
+      }
     }
    
   }
@@ -895,6 +1258,17 @@ export default {
   display: flex;
   justify-content: center;
 }
+.hint-dialog-wrap{
+    padding-bottom:30px;
+    .hint-item{
+        cursor: pointer;
+        margin-bottom: 10px;
+        &:hover{
+            color:#409EFF;
+            text-decoration: underline;
+        }
+    }
+}
 </style>
 <style lang="scss">
 .sciHongqiData-page {
@@ -934,5 +1308,8 @@ export default {
   .el-tree-node__content {
     padding-right: 10px !important;
   }
+  .el-cascader .el-input {
+    width: 100% !important;
+  }
 }
 </style>