Ver Fonte

指标设置共享,公开,审批,收藏

shanbinzhang há 1 semana atrás
pai
commit
d7ac8bdb44
25 ficheiros alterados com 1993 adições e 416 exclusões
  1. 97 0
      src/api/modules/approve.js
  2. 250 8
      src/api/modules/chartApi.js
  3. 2 1
      src/api/modules/sheetApi.js
  4. 2 1
      src/api/modules/toolBoxApi.js
  5. 50 25
      src/components/notificationMsg.vue
  6. 49 19
      src/views/approve_manage/approveDetail.vue
  7. 37 33
      src/views/approve_manage/approveList.vue
  8. 158 44
      src/views/approve_manage/approveSetting.vue
  9. 48 27
      src/views/approve_manage/components/EdbChartApproveWrapper.vue
  10. 4 10
      src/views/approve_manage/mixins/approveMixins.js
  11. 5 2
      src/views/dataEntry_manage/chartSetting.vue
  12. 1 0
      src/views/dataEntry_manage/components/addMarkerDialog.vue
  13. 592 0
      src/views/dataEntry_manage/components/batchMoveDialog.vue
  14. 4 1
      src/views/dataEntry_manage/databaseComponents/chartTrendRender.vue
  15. 4 4
      src/views/dataEntry_manage/databaseComponents/collectEdbMenu.vue
  16. 5 4
      src/views/dataEntry_manage/databaseComponents/edbCollectDia.vue
  17. 10 11
      src/views/dataEntry_manage/databaseComponents/edbTableList.vue
  18. 49 20
      src/views/dataEntry_manage/databaseComponents/openDialog.vue
  19. 166 98
      src/views/dataEntry_manage/databaseList.vue
  20. 76 18
      src/views/dataEntry_manage/sharedComponents/batchSetPublicDia.vue
  21. 43 12
      src/views/dataEntry_manage/sharedComponents/setPublicDia.vue
  22. 50 5
      src/views/dataEntry_manage/sharedComponents/setSharedDia.vue
  23. 268 61
      src/views/dataEntry_manage/sharedComponents/setSharedListDialog.vue
  24. 21 11
      src/views/dataEntry_manage/sharedComponents/sharedMenu.vue
  25. 2 1
      src/views/sandbox_manage/sandFlowNew/components/addLInkDia.vue

+ 97 - 0
src/api/modules/approve.js

@@ -381,4 +381,101 @@ export const approveInterence = {
         return http.get("/bi_approve/detail",params)
     },
 
+    /**
+     * 设置公开审批流详情
+     * @param {*} params DataType 1指标 2图表
+     * @returns 
+     */
+    getSetPublicApproveDetail(params){
+        return http.get("/datamanage/data_approve/flow/detail",params)
+    },
+    
+    /**
+     * 设置审批流
+     * @param {*} params 
+     * DataType
+     * Nodes []
+     * IgnoreApproveUserIdList
+     * @returns 
+     */
+    setPublicApprove(params){
+        return http.post("/datamanage/data_approve/flow/save",params)
+    },
+
+    /**
+     * 指标图表审批列表
+     * @param {*} params 
+     * DataType
+     * ListType 1-待处理;2-已处理;3-我发起的
+     * PageSize 
+     * CurrentIndex
+     * Keyword
+     * ClassifyId
+     * TimeType
+     * StartTime
+     * EndTime
+     * SortRule
+     * SortField
+     * ApproveState :1-待审批;2-已审批;3-已驳回;4-已撤回
+     * @returns 
+     */
+    getPublicApproveList(params) {
+        return http.get("/datamanage/data_approve/list",params)
+    },
+
+    /**
+     * 公开审批通过
+     * @param {*} params DataApproveId
+     * @returns 
+     */
+    passPublicApprove(params) {
+        return http.post("/datamanage/data_approve/approve",params)
+    },
+
+    /**
+     * 公开审批驳回
+     * @param {*} params DataApproveId ApproveRemark
+     * @returns 
+     */
+    refusePublicApprove(params) {
+        return http.post("/datamanage/data_approve/refuse",params)
+    },
+
+    /**
+     * 公开审批撤销
+     * @param {*} params DataApproveId
+     * @returns 
+     */
+    cancelPublicApprove(params) {
+        return http.post("/datamanage/data_approve/cancel",params)
+    },
+
+
+    /**
+     * 公开审批详情
+     * @param {*} params 
+     * DataApproveId
+     * @returns 
+     */
+    getPublicApproveDetail(params) {
+        return http.get("/datamanage/data_approve/detail",params)
+    },
+
+    /**
+     * 公开审批消息
+     * @param {*} params  PageSize CurrentIndex DataType
+     * @returns 
+     */
+    getPublicMsgList(params) {
+        return http.get("/datamanage/data_approve/message/list",params)
+    },
+
+    /**
+     * 已读公开消息
+     * @param {*} params  MessageId
+     * @returns 
+     */
+    readPublicMsg(params) {
+        return http.post("/datamanage/data_approve/message/read",params)
+    },
 }

+ 250 - 8
src/api/modules/chartApi.js

@@ -1489,8 +1489,8 @@ const edbBaseV2Interface = {
 	 * FilterSource 0:我共享的;1:别人共享给我的
 	 * @returns 
 	 */
-	sharedEdbList: params => {
-		return http.get('/datamanage/edb_info/share/tree',params)
+	getSharedEdbList: params => {
+		return http.get('/datamanage/edb_info/share/list',params)
 	},
 
 	/**
@@ -1504,7 +1504,7 @@ const edbBaseV2Interface = {
 	 * @returns 
 	 */
 	getSharedSearchList: params => {
-		return http.post('/datamanage/edb_info/share/list_by_es',params)
+		return http.post('/datamanage/edb_info/share/list/es',params)
 	},
 	
 	/**
@@ -1617,14 +1617,12 @@ const edbBaseV2Interface = {
 	},
 
 	/**
-	 * 设置公开指标列表
+	 * 已选择的公开指标列表
 	 * @param {*} params 
 	 * "EdbPublicList": [],
     "SourceList":[37,62],
      "Keyword": "拟合残差",
     "ClassifyIdList":[2386,1389],
-    "CurrentIndex": 1,
-    "PageSize": 20
 	 * @returns 
 	 */
 	getPublicSearchListAll: params => {
@@ -1633,7 +1631,7 @@ const edbBaseV2Interface = {
 
 	/**
 	 * 获取指标公开时当前用户是否要审批
-	 * @param {*} params 
+	 * @param {*} params DataType 1指标 2图库
 	 * @returns 
 	 */
 	getSetPublicApprove: params => {
@@ -1654,14 +1652,258 @@ const edbBaseV2Interface = {
 	 */
 	setEdbPublic: params => {
 		return http.post('/datamanage/edb_info/public/save',params)
-	}
+	},
+
+	/**
+	 * 批量移动公开
+	 * @param {*} params 
+	 * "EdbPublicList": [
+        // 1
+        // 2
+        1,2,3
+    ],
+    "Keyword": "螺纹",
+    "ClassifyIdList":[],
+    "IsSelectAll":false,
+    "NoEdbIdList": [102183],
+    "EdbIdList": [1586],
+    "NewClassifyId":1
+	 * @returns 
+	 */
+		movePublicBatch: params => {
+			return http.post('/datamanage/edb_info/public/batch_move',params)
+		},
+
+		/**
+		 * 批量移动我的
+		 * @param {*} params 
+			"SourceList":[37,62],
+			"Keyword": "拟合残差",
+			"ClassifyIdList":[2386,1389],
+			"IsSelectAll":false,
+			"NoEdbIdList": [102183],
+			"EdbIdList": [102180,102178],
+			"NewClassifyId":2386
+		 * @returns 
+		 */
+		moveOwnBatch: params => {
+			return http.post('/datamanage/edb_info/batch_move',params)
+		}
 
 }
 
 
 /* 图库拆分我的 共享 公共后新接口 */
 const chartBaseV2Interface = {
+	/**
+	 * 共享 收到共享分类树
+	 * @param {*} params 
+	 * ClassifyType
+	 * @returns 
+	 */
+	getSharedClassify: params => {
+		return http.get('/datamanage/chart_info/share/tree',params)
+	},
+
+	/**
+	 * 分享指标列表
+	 * @param {*} params ClassifyId 
+	 * FilterSource 0:我共享的;1:别人共享给我的
+	 * @returns 
+	 */
+	getSharedChartList: params => {
+		return http.get('/datamanage/chart_info/share/list',params)
+	},
+
+	/**
+	 * 设置共享弹窗列表
+	 * @param {*} params 
+	 *  "ChartShareList": [],
+			"SourceList":[37,62],
+			"Keyword": "拟合残差",
+			"ClassifyIdList":[2386,1389],
+			"CurrentIndex": 1,
+	 * @returns 
+	 */
+	getSharedSearchList: params => {
+		return http.post('/datamanage/chart_info/share/list/es',params)
+	},
+	
+	/**
+	 * 设置单指标共享
+	 * @param {*} params 
+	 * ChartInfoId  UserIdList  ShareType1:仅查看;2:可编辑
+	 * @returns 
+	 */
+	setChartSharedSingle: params => {
+		return http.post('/datamanage/chart_info/share/save',params)
+	},
+
+	/**
+	 * 批量设置共享
+	 * @param {*} params 
+	 * "ChartShareList": [],
+    "SourceList":[37,62],
+    "Keyword": "拟合残差",
+    "ClassifyIdList":[2386,1389],
+    "IsSelectAll": true,
+    "NoChartIdList": [],
+		 ChartIdList:[]
+    "UserIdList": [],
+    "ShareType": 2
+	 * @returns 
+	 */
+	setChartSharedBatch: params => {
+		return http.post('/datamanage/chart_info/share/batch_save',params)
+	},
+
+	/**
+	 * 图表共享用户
+	 * @param {*} params 
+	 * ChartInfoId
+	 * @returns 
+	 */
+	getChartSharedUser: params => {
+		return http.get('/datamanage/chart_info/share/user_list',params)
+	},
+
+	/**
+	 * 公共图表分类树
+	 * @param {*} params 
+	 * @returns 
+	 */
+	getPublicClassifyBase: params => {
+		return http.get('/datamanage/chart_public/classify/tree',params)
+	},
+
+	/**
+	 * 公共图表分类树展开
+	 * @param {*} params  ParentId
+	 * @returns 
+	 */
+	getPublicClassifyExpand: params => {
+		return http.get('/datamanage/chart_public/classify/simple',params)
+	},
+	
+	/**
+	 * 新增公开分类
+	 * @param {*} params 
+	 * "ChartClassifyName": "国内宏观",
+		"ParentId": 4,
+	 * @returns 
+	 */
+	addPublicedClassify: params => {
+		return http.post('/datamanage/chart_public/classify/add',params)
+	},
+
+	/**
+	 * 编辑公开分类
+	 * @param {*} params 
+	 * @returns 
+	 */
+	editPublicedClassify: params => {
+		return http.post('/datamanage/chart_public/classify/edit',params)
+	},
+
+	/**
+	 * 删除公开分类校验
+	 * @param {*} params ClassifyId
+	 * @returns 
+	 */
+	delPublicedClassifyCheck: params => {
+		return http.post('/datamanage/chart_public/classify/delete/check',params)
+	},
+
+	/**
+	 * 删除公开分类
+	 * @param {*} params 
+	 * @returns 
+	 */
+	delPublicedClassify: params => {
+		return http.post('/datamanage/chart_public/classify/delete',params)
+	},
+
+	/**
+	 * 设置公开图表列表
+	 * @param {*} params 
+	 * "ChartPublicList": [],
+    "SourceList":[37,62],
+     "Keyword": "拟合残差",
+    "ClassifyIdList":[2386,1389],
+    "CurrentIndex": 1,
+    "PageSize": 20
+	 * @returns 
+	 */
+	getPublicSearchList: params => {
+		return http.post('/datamanage/chart_info/public/list/es',params)
+	},
+
+	/**
+	 * 已选择的公开列表
+	 * @param {*} params 
+	 * "ChartPublicList": [],
+    "SourceList":[37,62],
+     "Keyword": "拟合残差",
+    "ClassifyIdList":[2386,1389],
+	 * @returns 
+	 */
+	getPublicSearchListAll: params => {
+		return http.post('/datamanage/chart_info/public/list/es/all',params)
+	},
 
+	/**
+	 * 获取指标公开时当前用户是否要审批
+	 * @param {*} params DataType 1指标 2图库
+	 * @returns 
+	 */
+	getSetPublicApprove: params => {
+		return http.post('/datamanage/data_approve/check_open',params)
+	},
+
+	/**
+	 * 设置公开
+	 * @param {*} params 
+	 * "ChartInfoList": [
+        {
+            "ChartInfoId": 102174,
+            "ClassifyId": 5
+        }
+    	],
+    "Description": "测试审批"
+	 * @returns 
+	 */
+	setChartPublic: params => {
+		return http.post('/datamanage/chart_info/public/save',params)
+	},
+
+	/**
+	 * 批量移动公开
+	 * @param {*} params 
+	 * "ChartPublicList": [
+        // 1
+        // 2
+        1,2,3
+    ],
+    "Keyword": "螺纹",
+    "ClassifyIdList":[],
+    "IsSelectAll":false,
+    "NoChartIdList": [102183],
+    "ChartIdList": [1586],
+    "NewClassifyId":1
+	 * @returns 
+	 */
+	movePublicBatch: params => {
+		return http.post('/datamanage/chart_info/public/save',params)
+	},
+
+	/**
+	 * 批量移动我的
+	 * @param {*} params 
+	 * @returns 
+	 */
+	moveOwnBatch: params => {
+		return http.post('/datamanage/chart_info/batch_move',params)
+	}
 }
 
 export {

+ 2 - 1
src/api/modules/sheetApi.js

@@ -315,7 +315,8 @@ export const copyExcel = params => {
  * @returns 
  */
 export const searchTarget  = params => {
-	return http.get('/datamanage/edb_info/filter_by_es/all',params)
+	// return http.get('/datamanage/edb_info/filter_by_es/all',params)
+	return http.get('/datamanage/edb_info/filter_by_es',params)
 }
 
 /**

+ 2 - 1
src/api/modules/toolBoxApi.js

@@ -90,7 +90,8 @@ export const ForexCalendarInterface = {
      * @returns 
      */
     searchEdbInfo:(params)=>{
-        return http.get("/datamanage/edb_info/filter_by_es/all",params)
+        // return http.get("/datamanage/edb_info/filter_by_es/all",params)
+        return http.get("/datamanage/edb_info/filter_by_es",params)
     }
 }
 

+ 50 - 25
src/components/notificationMsg.vue

@@ -14,6 +14,12 @@
                     <el-tab-pane v-if="tabsShow.second" :label="`${$t('SystemManage.BaseConfig.bIDashboard_approval')}${activeName==='second'?'('+UnreadTotal+')':''}`" name="second"></el-tab-pane>
                     <!-- 资产数据 -->
                     <el-tab-pane v-if="tabsShow.third" :label="`${$t('SystemManage.OperateAuth.label_notice_title')}${activeName==='third'?'('+UnreadTotal+')':''}`" name="third"></el-tab-pane>
+
+                    <!-- 指标 -->
+                    <el-tab-pane v-if="tabsShow.third" :label="`指标审批${activeName==='edb'?'('+UnreadTotal+')':''}`" name="edb"></el-tab-pane>
+
+                    <!-- 图表 -->
+                    <el-tab-pane v-if="tabsShow.third" :label="`图表审批${activeName==='chart'?'('+UnreadTotal+')':''}`" name="chart"></el-tab-pane>
                 </el-tabs>
                 <div class="massage-list" v-if="visible">
                     <div class="message-item" :class="{'IsRead':item.IsRead}" v-for="item in msgList" :key="item.Id" @click="readMsg(item)">
@@ -28,9 +34,9 @@
                             <!-- 审批内容 -->
                             <div class="content" v-if="activeName==='first'">{{item.Content||''}}&nbsp;</div>
                             <!-- 看板审批 内容部分-->
-                            <div class="content" v-else-if="activeName==='second'">{{item.Remark||''}}&nbsp;</div>
+                            <div class="content" v-else-if="['second','edb','chart'].includes(activeName)">{{item.Remark||''}}&nbsp;</div>
                             <!-- 权限内容 -->
-                            <div class="content" v-else>
+                            <div class="content" v-else-if="activeName==='third'">
                                 {{item.Remark||''}}
                                 <span>,点击<el-button type="text" @click="openAuthDetail(item)">查看详情</el-button>!</span>
                             </div>
@@ -185,6 +191,8 @@ export default {
               first:true, //研报
               second:false, //BI
               third:true, //资产
+              edb: true, //指标公开审批
+              chart:true, //图表公开审批
             },
 
             //驳回弹窗
@@ -296,46 +304,59 @@ export default {
             })
         },
         async readMsg(msg){
-            const res = this.activeName === 'first'    
-                ? await reportV2Interface.readReportNotice({MessageId:msg.Id})
-                : this.activeName === 'second' ? await approveInterence.readBiApproveMsg({MessageId:msg.Id})
-                  : await operateAuthInterface.redMessage({ MessageId: msg.DataPermissionMessageId })
+            const apiMap = {
+                'first': reportV2Interface.readReportNotice,
+                'second': approveInterence.readBiApproveMsg,
+                'third': operateAuthInterface.redMessage,
+                'edb': approveInterence.readPublicMsg,
+                'chart': approveInterence.readPublicMsg,
+            }
+            if(!apiMap[this.activeName]) return 
+            const res = await apiMap[this.activeName]({MessageId:msg.Id})
 
             if(res.Ret!==200) return 
             this.getMsgList()
             this.getUnreadNum()
-
+            
+            //报告点击处理
             this.activeName === 'first' && this.handleReportNotice(msg)
-            if(this.activeName === 'second'){
-                const type = msg.ApproveState===1?'approve':msg.ApproveState===4?'detail':'myself' 
+
+            if(['second','edb','chart'].includes(this.activeName)){
+                const type = msg.ApproveState===1?'approve':msg.ApproveState===4?'detail':'myself';
+
                 this.$router.push({
                     path:'/approveDetail',
                     query:{
-                        mainType:this.activeName === 'first' ? 'report' :'bi',
+                        mainType:this.activeName === 'second' ? 'bi' : this.activeName,
                         type,
-                        approveId:this.activeName === 'first' ? msg.ReportApproveId :msg.BiApproveId, 
+                        approveId:this.activeName === 'second' ? msg.BiApproveId:msg. DataApproveId, 
                     }
                 })
             }
             
         },
         async getMsgList(){
-            const res = this.activeName === 'first' 
-                ? await reportV2Interface.getReportNotice({
-                    CurrentIndex:1,
-                    PageSize:1000
-                })
-                :  (
-                this.activeName === 'second' ?
-                await approveInterence.getBiApproveMsgList({ 
+
+            const apiMap = {
+                'first': reportV2Interface.getReportNotice,
+                'second': approveInterence.getBiApproveMsgList,
+                'third': operateAuthInterface.getNoticeList,
+                'edb': approveInterence.getPublicMsgList,
+                'chart': approveInterence.getPublicMsgList,
+            }
+            if(!apiMap[this.activeName]) return 
+            
+            let params = ['edb','chart'].includes(this.activeName) 
+                ? {
                     CurrentIndex:1,
-                    PageSize:1000
-                }) 
-                : await operateAuthInterface.getNoticeList({
+                    PageSize:1000,
+                    DataType: this.activeName==='edb'?1:2
+                  }
+                : {
                     CurrentIndex:1,
-                    PageSize:1000
-                }) 
-                )
+                    PageSize:1000,
+                  }  
+            const res = await apiMap[this.activeName](params)
 
             if(res.Ret!==200) return 
             this.msgList = res.Data.List||[]
@@ -444,6 +465,10 @@ export default {
         right:0;
         box-sizing: border-box;
     }
+
+    .el-tabs__header {
+        padding-right: 40px;
+    }
 }
 .msg-btn{
     cursor: pointer;

+ 49 - 19
src/views/approve_manage/approveDetail.vue

@@ -57,9 +57,11 @@
 
         <!-- 指标 图表审批 -->
         <EdbChartApproveWrapper
-            v-else
+            v-else-if="['edb','chart'].includes(mainType)&&setPublicDetailInfo"
+            :info="setPublicDetailInfo"
             :mainType="mainType"
             :formType="formType"
+            :approveInfo="approveInfo"
         />
 
         <RejectDialog 
@@ -113,6 +115,8 @@ export default {
             },
             waterMarkStr:'',//水印
             boardDataList:[],
+
+            setPublicDetailInfo: null
         };
     },
     computed:{
@@ -318,17 +322,16 @@ export default {
             }
             let res = null
             if(type==='return'){ 
-                res = this.mainType == 'report' ?  await approveInterence.cancelApprove({ReportApproveId:Number(approveId)})
-                                                :  await approveInterence.cancelBiApprove({BiApproveId:Number(approveId)});
+                res = this.mainType === 'bi' 
+                    ?  await approveInterence.cancelBiApprove({BiApproveId:Number(approveId)})
+                    :  await approveInterence.cancelPublicApprove({DataApproveId: Number(approveId)})
             }
             if(type==='pass'){ 
-                res = this.mainType == 'report' ?  await approveInterence.passApprove({
-                                                    ReportApproveId:Number(approveId),
-                                                    ReportUrl:this.generatePdfLinks(this.reportInfo.reportCode,this.reportInfo.type)
-                                                })
-                                                :   await approveInterence.passBiApprove({
-                                                    BiApproveId:Number(approveId),
-                                                })
+                res = this.mainType === 'bi' 
+                    ? await approveInterence.passBiApprove({
+                        BiApproveId:Number(approveId),
+                      })
+                    : await approveInterence.passPublicApprove({DataApproveId: Number(approveId)})
             }
             if(res.Ret!==200) return 
             this.$message.success( type==='return'?this.$t('AprrovalPage.revoke_success') :this.$t('AprrovalDetailPage.passed_success'));
@@ -347,15 +350,17 @@ export default {
             }
         },
         rejectApprove(reason){
-            this.isDetailDialogShow = false
-            let req = this.mainType == 'report' ? approveInterence.rejectApprove({
-                                                    ReportApproveId:Number(this.$route.query.approveId),
-                                                    ApproveRemark:reason||''
-                                                })
-                                                : approveInterence.rejectBiApprove({
-                                                    BiApproveId:Number(this.$route.query.approveId),
-                                                    ApproveRemark:reason||''
-                                                });
+            this.isDetailDialogShow = false;
+            let req = this.mainType === 'bi' 
+                ? approveInterence.rejectBiApprove({
+                    BiApproveId:Number(this.$route.query.approveId),
+                    ApproveRemark:reason||''
+                  })
+                : approveInterence.refusePublicApprove({
+                    DataApproveId: Number(this.$route.query.approveId),
+                    ApproveRemark:reason||''
+                  });
+
             req.then(res=>{
                 if(res.Ret!==200) return 
                 this.$message.success(this.$t('AprrovalDetailPage.rejected_success') )
@@ -377,6 +382,29 @@ export default {
                 }
             })
         },
+
+
+        /* 指标图表公开详情 */
+        async getPublicApproveDetail() {
+            const res = await approveInterence.getPublicApproveDetail({
+                DataApproveId: Number(this.$route.query.approveId)
+            })
+            if(res.Ret !== 200) return
+            
+            const { ApproveFlowNodes,Approve } = res.Data;
+            this.setPublicDetailInfo = res.Data;
+         
+            this.formType = this.$route.query.type||'detail';
+            this.approveInfo.state=Approve.State;
+            this.approveInfo.stateText=['','pending','passed','reject','return'][Approve.State];
+
+            let isApproveUser = ApproveFlowNodes[0].Users.some(_ => _.UserId === this.UserId);
+            this.approveInfo = {
+                state:Approve.State,
+                stateText:['','pending','passed','reject','return'][Approve.State],
+                isCurrentApprover:Approve.State===1&&isApproveUser,
+            };
+        }
     },
     mounted(){
         this.mainType = this.$route.query.mainType || 'report';
@@ -385,6 +413,8 @@ export default {
           this.getSystemUserInfo();
         }
         if(this.mainType == 'bi') this.getBiApproveDetail();
+        
+        ['edb','chart'].includes(this.mainType) && this.getPublicApproveDetail()
     },
     components: { TimeLine, ReportDetail, Reportdtl, RejectDialog, BIBoardContent,EdbChartApproveWrapper }
 };

+ 37 - 33
src/views/approve_manage/approveList.vue

@@ -10,13 +10,13 @@
             <el-tabs v-model="activeTab" @tab-click="handleClick">
                 <el-tab-pane :label="$t('AprrovalPage.be_processed_tab')" name="pending"></el-tab-pane>
                 <el-tab-pane :label="$t('AprrovalPage.processed_tab')" name="processed"></el-tab-pane>
-                <el-tab-pane :label="$t('AprrovalPage.i_initiated_tab')" name="originate" v-if="activeMainTab==='bi'"></el-tab-pane>
+                <el-tab-pane :label="$t('AprrovalPage.i_initiated_tab')" name="originate"></el-tab-pane>
             </el-tabs>
         </div>
         <div class="approve-list">
             <div class="select-box">
-                <!--  -->
-                <cascader
+                <!-- 公开指标图表分类 -->
+                <el-cascader
                     v-if="['edb','chart'].includes(activeMainTab)"
                     v-model="classify"
                     :options="classifyOptions"
@@ -24,8 +24,15 @@
                     collapse-tags
                     placeholder="选择分类"
                     cascaderWidth="width: 240px"
-                    @changeVal="handleFilter"
-                    :config="{ multiple: true, emitPath: false }"
+                    @change="handleCurrentChange(1)"
+                    :props="{
+                        label: 'ClassifyName',
+                        value: 'ClassifyId',
+                        children: 'Children',
+                        multiple:true,
+                        emitPath: false,
+                        checkStrictly:false
+                    }"
                 />
                 
                 <!-- bi分类 -->
@@ -180,12 +187,13 @@ export default {
     computed:{
         edbTableColumns() {
             const columns = [
-                { label: '审批名称',key:'ApproveName',show: true },
-                { label: '提交人',key:'ApplyUserName',show: true },
-                { label: '提交时间',key:'CreateTime',show: true },
+                { label: '审批名称',key:'Title',show: true },
+                { label: '提交人',key:'ApplyUserName',show: ['processed','pending'].includes(this.activeTab) },
+                { label: '申请至公开目录',key:'ApplyUserName',show: this.activeTab==='originate' },
+                { label: '提交时间',key:'CreateTime',show: true,sortable:true },
                 { label: '审批状态',key:'RecordState',show: this.activeTab==='pending' },
-                { label: '处理时间',key:'HandleTime',show: this.activeTab==='processed' },
-                { label: '处理状态',key:'RecordState',show: this.activeTab==='processed' },
+                { label: '处理时间',key:'HandleTime',show: ['processed','originate'].includes(this.activeTab) },
+                { label: '处理状态',key:'RecordState',show: ['processed','originate'].includes(this.activeTab) },
             ]
 
             let resultCols = columns.filter(_ => _.show);
@@ -278,8 +286,18 @@ export default {
                     ...biApproveParams,
                 })
                   
-            }else {
-                res = null
+            }else { //指标图表list
+                res = await approveInterence.getPublicApproveList({
+                    ...baseParams,
+                    DataType: this.activeMainTab === 'edb' ? 1 : 2,
+                    ClassifyId:this.classify || [],
+                    TimeType:this.timeType,
+                    StartTime:this.timeDate?this.timeDate[0]||'':'',
+                    EndTime:this.timeDate?this.timeDate[1]||'':'',
+                    SortRule:this.SortRule,
+                    SortField:this.SortField,
+                    ApproveState:this.ApproveState,
+                })
             }
 
             this.tableLoading=false
@@ -333,13 +351,15 @@ export default {
                 query:{
                     mainType:this.activeMainTab,
                     type,
-                    approveId:this.activeMainTab == 'report' ? data.ReportApproveId : data.BiApproveId,
+                    approveId:this.activeMainTab == 'bi' ? data.BiApproveId : data.DataApproveId,
                 }
             })
         },
         cancelApprove(item){ 
-            let req = this.activeMainTab == 'report' ? approveInterence.cancelApprove({ReportApproveId:Number(item.ReportApproveId)})
-                      : approveInterence.cancelBiApprove({BiApproveId:Number(item.BiApproveId)});
+            let req = this.activeMainTab === 'bi' 
+                ? approveInterence.cancelBiApprove({BiApproveId:Number(item.BiApproveId)})
+                : approveInterence.cancelPublicApprove({ DataApproveId: item.DataApproveId })
+
             req.then(res=>{
                 if(res.Ret!==200) return 
                 this.$message.success(this.$t('AprrovalPage.revoke_success') )
@@ -348,23 +368,6 @@ export default {
         },
         // 语言切换
         getContentMenuOptText(e){
-            // if(e==='报告标题') return this.$t('AprrovalPage.report_title_lable') 
-            // if(e==='关联报告') return this.$t('AprrovalPage.associated_report_lable') 
-            // if(e==='提交人') return this.$t('AprrovalPage.submitter_lable') 
-            // if(e==='提交时间') return this.$t('AprrovalPage.submission_time_lable') 
-            // if(e==='审批状态') return this.$t('AprrovalPage.approval_status_lable') 
-            // if(e==='处理时间') return this.$t('AprrovalPage.processing_time_lable') 
-            // if(e==='处理结果') return this.$t('AprrovalPage.processing_result_lable') 
-            // if(e==='审批时间') return this.$t('AprrovalPage.approval_time') 
-            // if(e==='BI看板名称') return this.$t('AprrovalPage.kanban_name') 
-            // if(e==='关联分类') return this.$t('AprrovalPage.associative_classification') 
-            // if(e==='关联看板') return this.$t('AprrovalPage.association_kanban') 
-            // if(e==='处理状态') return this.$t('AprrovalPage.processing_state') 
-            // if(e==='已通过') return this.$t('AprrovalPage.approved_option') 
-            // if(e==='已驳回') return this.$t('AprrovalPage.rejected_option') 
-            // if(e==='已撤销') return this.$t('AprrovalPage.revoked_option') 
-            // if(e==='待审批') return this.$t('AprrovalPage.awaiting_approval_option') 
-            // if(e==='已同意') return this.$t('AprrovalPage.agreed_option') 
             return e
         },
         downloadPdfImg(row,type){
@@ -403,10 +406,11 @@ export default {
            this.activeTab = formTypeMap[formType]||'pending'
            this.tableColumns = ['edb','chart'].includes(this.activeMainTab) ? this.edbTableColumns : columnsMap[`${this.activeTab}_${this.activeMainTab}`];
            this.getTableData()
+           
+            this.getClassifyOptions()
         },
     },
     mounted(){
-        this.getClassifyOptions()
     },
     components: { RejectDialog }
 };

+ 158 - 44
src/views/approve_manage/approveSetting.vue

@@ -27,13 +27,26 @@
                                 emitPath: false,
                                 multiple: true,
                             }"
+                            ref="approveUserRef"
                             collapse-tags
                             :show-all-levels="false"
                             clearable
                             filterable
-                            :placeholder="this.$t('SystemManage.OperateAuth.ph_see_user')" 
+                            placeholder="选择用户" 
                             style="width:300px"
+                            @change="checkUser(1)"
                         />
+
+                        <div class="checked-user" v-if="selectApproveUsers.length">
+                            <el-tag
+                                v-for="tag in selectApproveUsers"
+                                :key="tag.label"
+                                closable
+                                @close="removeUser(tag.value,1)"
+                            >
+                                {{tag.label}}
+                            </el-tag>
+                        </div>
                     </el-form-item>
                     <el-form-item label="审批方式" style="width:100%">
                         <el-select v-model="approveForm.approveType" style="width:300px">
@@ -46,19 +59,32 @@
                             v-model="approveForm.noApproveUsers"
                             :options="usersOptions"
                             :props="{
-                            value: 'NodeIdKey',
-                            label: 'NodeName',
-                            children: 'Children',
-                            emitPath: false,
-                            multiple: true,
+                                value: 'NodeIdKey',
+                                label: 'NodeName',
+                                children: 'Children',
+                                emitPath: false,
+                                multiple: true,
                             }"
+                            ref="noApproveUserRef"
                             collapse-tags
                             :show-all-levels="false"
                             clearable
                             filterable
-                            :placeholder="this.$t('SystemManage.OperateAuth.ph_see_user')" 
+                            placeholder="选择用户" 
                             style="width:300px"
+                            @change="checkUser(2)"
                         />
+
+                        <div class="checked-user" v-if="selectNoApproveUsers.length">
+                            <el-tag
+                                v-for="tag in selectNoApproveUsers"
+                                :key="tag.label"
+                                closable
+                                @close="removeUser(tag.value,2)"
+                            >
+                                {{tag.label}}
+                            </el-tag>
+                        </div>
                     </el-form-item>
                 </el-form>
                 <div class="bot">
@@ -176,7 +202,9 @@ export default {
             ],
             activeMainTab:'', //report-研报审批  bi-bi看板审批
             dataLoading:false,
-
+            
+            selectApproveUsers: [],
+            selectNoApproveUsers: [],
             usersOptions: [],
             approveOption: ['或签','会签'],
             approveForm: {
@@ -203,11 +231,14 @@ export default {
           tabName == 'bi' && this.getBIClassifyTree();
           tabName == 'bi' && this.getTableData();
           
-          this.approveForm = {
-            approveUsers:[],
-            approveType:'或签',
-            noApproveUsers:[]
-          }
+            this.approveForm = {
+                approveUsers:[],
+                approveType:'或签',
+                noApproveUsers:[]
+            };
+            this.selectApproveUsers = [];
+            this.selectNoApproveUsers = [];
+            ['edb','chart'].includes(this.activeMainTab) && this.getApproveDetail();
         },
         handleCurrentChange(page){
             this.page = page
@@ -327,55 +358,124 @@ export default {
                 this.activeMainTab = valid ? valid.name : this.mainTabs[0].name;
            }
 
-           this.getTableData();
+           this.IsBIApprove && this.getTableData();
+            ['edb','chart'].includes(this.activeMainTab) && this.getApproveDetail();
         },
 
         /* 获取用户列表 */
         async getUserList() {
         
-        const res = await departInterence.getSystemUser();
-        if (res.Ret !== 200) return
-        
-        this.usersOptions = res.Data || []
-        //遍历加上唯一的key
-        traverseTree(
-            {Children:this.usersOptions},
-            {
-                childKey:'Children',
-                nodeKey:'NodeIdKey',
-                cb:(node)=>node.NodeType===3,
-                cb2:(node)=>node.NodeId+''
-            }
-        )
-        
-        this.filterTreeEmpty({Children:this.usersOptions})
+            const res = await departInterence.getSystemUser();
+            if (res.Ret !== 200) return
+            
+            this.usersOptions = res.Data || []
+            //遍历加上唯一的key
+            traverseTree(
+                {Children:this.usersOptions},
+                {
+                    childKey:'Children',
+                    nodeKey:'NodeIdKey',
+                    cb:(node)=>node.NodeType===3,
+                    cb2:(node)=>node.NodeId+''
+                }
+            )
+            
+            this.filterTreeEmpty({Children:this.usersOptions})
         },
 
         // 递归处理数组
         filterTreeEmpty(arr) {
-        function dfs(node) {
-            if (Array.isArray(node.Children)) {
-                for (let child of node.Children) {
-                    dfs(child);
+            function dfs(node) {
+                if (Array.isArray(node.Children)) {
+                    for (let child of node.Children) {
+                        dfs(child);
+                    }
+                    if(node.Children.length===0) delete node.Children
+                }
+                //若为叶子节点,且不为用户,禁止选中
+                if(!node.Children||!Array.isArray(node.Children)){
+                    if(node.NodeType!==3) node.disabled = true
                 }
-                if(node.Children.length===0) delete node.Children
             }
-            //若为叶子节点,且不为用户,禁止选中
-            if(!node.Children||!Array.isArray(node.Children)){
-                if(node.NodeType!==3) node.disabled = true
+            dfs(arr); 
+        },
+
+        /* 选择用户 */
+        checkUser(type) {
+            let selectUser = this.$refs[type===1?'approveUserRef':'noApproveUserRef'].getCheckedNodes(true);
+            let arr = []
+            arr = selectUser.length?selectUser.map(_ => ({
+                label: _.label,
+                value: _.value
+            })):[]
+            
+            if(type === 1) {
+                this.selectApproveUsers = arr.filter(_ => this.approveForm.approveUsers.includes(_.value))
+            }else {
+                this.selectNoApproveUsers = arr.filter(_ => this.approveForm.noApproveUsers.includes(_.value))
+            }
+        },
+
+        removeUser(val,type) {
+            if(type===1) {
+                let index = this.selectApproveUsers.findIndex(_ => _.value===val)
+                this.selectApproveUsers.splice(index,1)
+    
+                this.approveForm.approveUsers = this.approveForm.approveUsers.filter(_ => _!==val)
+            }else {
+                let index = this.selectNoApproveUsers.findIndex(_ => _.value===val)
+                this.selectNoApproveUsers.splice(index,1)
+    
+                this.approveForm.noApproveUsers = this.approveForm.noApproveUsers.filter(_ => _!==val)
+            }
+        },
+
+        async getApproveDetail() {
+            const res = await approveInterence.getSetPublicApproveDetail({
+                DataType: this.activeMainTab === 'edb' ? 1 : 2,
+            })
+
+            if(res.Ret !== 200 ) return
+            let approveInfo = res.Data.Nodes[0];
+            if(approveInfo) {
+                this.approveForm = {
+                    approveUsers:approveInfo.Users.map(_ => String(_.UserId)),
+                    approveType:approveInfo.ApproveType===3?'或签':'会签',
+                    noApproveUsers:res.Data.IgnoreApproveUserIdList 
+                        ? res.Data.IgnoreApproveUserIdList.map(_ => String(_))
+                        : []
+                };
+                this.$nextTick(() => {
+                    this.approveForm.approveUsers && this.checkUser(1);
+                    this.approveForm.noApproveUsers && this.checkUser(2);
+                })
             }
-        }
-        dfs(arr); 
         },
 
-        /* 审批设置 */
+        /* 指标图表审批设置 */
         async handleApproveSetConfirm() {
-            this.activeMainTab === 'edb'
+            const res = await approveInterence.setPublicApprove({
+                DataType: this.activeMainTab === 'edb' ? 1 : 2,
+                IgnoreApproveUserIdList: this.approveForm.noApproveUsers.map(_ => Number(_)),
+                Nodes: [{
+                    ApproveType: this.approveForm.approveType==='或签'?3:2,
+                    Users: this.selectApproveUsers.map(_ => ({
+                        UserId: Number(_.value),
+                        UserName: _.label,
+                        UserType: 'user'
+                    }))
+                }]
+            })
+
+            if(res.Ret !== 200) return 
+            this.$message.success('设置成功')
         }
     },
+    created() {
+        this.getUserList();
+    },
     mounted(){
         this.getBIClassifyTree();
-        this.getUserList()
     },
 };
 </script>
@@ -392,7 +492,7 @@ export default {
     }
 
     .edb-approve-wrapper {
-        width: 50%;
+        width: 80%;
         padding: 30px 0;
         .bot {
             display: flex;
@@ -400,5 +500,19 @@ export default {
             margin: 40px 0;
         }
     }
+
+    .checked-user {
+        width: 100%;
+        display: flex;
+        gap: 10px;
+        align-content: flex-start;
+        flex-wrap: wrap;
+        margin-top: 15px;
+        padding: 15px;
+        border: 1px solid #ddd;
+        border-radius: 4px;
+        overflow-y: auto;
+        max-height: 300px;
+    }
 }
 </style>

+ 48 - 27
src/views/approve_manage/components/EdbChartApproveWrapper.vue

@@ -4,14 +4,10 @@
     <div class="top">
       <div class="left">
         <div class="item">
-          <label class="el-form-item__label">待审批图表数量</label>
+          <label class="el-form-item__label">待审批{{titleLabel}}数量:{{approvelistOption.length}}</label>
           <el-select
-            v-model="selectItem"
+            v-model="checkId"
             style="width: 240px"
-            clearable
-            multiple
-            collapse-tags
-            @change="handleChange"
           >
             <el-option
               v-for="item in approvelistOption"
@@ -24,7 +20,7 @@
         </div>
         <div class="item">
           <label class="el-form-item__label">公开目录</label>
-          一级/二级/三级
+          {{selectItem.classifyName}}
         </div>
       </div>
     </div>
@@ -32,31 +28,36 @@
     <div class="container">
       <div class="preview-wrapper">
           <div class="edb-detail" v-if="mainType==='edb'">
+            <!-- 指标渲染 -->
             <chart-trend-render
-              :edbid="102179"
+              :edbid="selectItem.value"
               :isShowChartBasis="true"
-              :isAllowSwitchSeason="true"
-              :isAllowEditLimit="true"
+              :isAllowSwitchSeason="false"
+              :isAllowEditLimit="false"
               ref="createChart"
             />
           </div>
 
           <div class="chart-detail" v-if="LINK_CHART_URL&&mainType==='chart'">
-      
-						<iframe :src='`${LINK_CHART_URL}?code=f7067484afd24ffd26904ceddbba98ab`' width='100%' height='450' style='border-width:0px; min-height:450px;'></iframe>
+            <!-- 图表渲染 -->
+						<iframe :src='`${LINK_CHART_URL}?code=${selectItem.code}`' width='100%' height='450' style='border-width:0px; min-height:450px;'></iframe>
           </div>
       </div>
       <div class="right">
         <div>
           <label>公开理由</label>
-          <p class="reason">动物气得我经济法几千万if服务器】服务器【;【; </p>
+          <p class="reason">{{info.Approve.ApproveRemark}} </p>
         </div>
+
         <div class="tool-btn">
             <el-button type="danger" @click="$parent.changeApprove('reject')"
-                v-if="permissionBtn.isShowBtn('approvePermission','reportApprove_reject')">{{$t('AprrovalDetailPage.rejected_btn')}}</el-button>
+                v-if="formType==='approve'&&approveInfo.isCurrentApprover&&permissionBtn.isShowBtn('approvePermission','reportApprove_reject')">驳回</el-button>
             <el-button type="primary" @click="$parent.changeApprove('pass')"
-                v-if="permissionBtn.isShowBtn('approvePermission','reportApprove_agree')">{{$t('AprrovalDetailPage.agree_btn')}}</el-button>
-            <el-button type="primary" plain @click="$router.replace(`/approveList?formType=${formType}&mainType=${mainType}`)">{{$t('AprrovalDetailPage.back_btn')}}</el-button>
+                v-if="formType==='approve'&&approveInfo.isCurrentApprover&&permissionBtn.isShowBtn('approvePermission','reportApprove_agree')">同意</el-button>
+
+            <el-button type="primary" @click="$parent.changeApprove('return')"
+              v-if="formType==='myself'&&approveInfo.state!==4&&permissionBtn.isShowBtn('approvePermission','reportApprove_repeal')">撤销</el-button>
+            <el-button type="primary" plain @click="$router.replace(`/approveList?formType=${formType}&mainType=${mainType}`)">返回</el-button>
         </div>
       </div>
     </div>
@@ -71,6 +72,25 @@ export default {
       LINK_CHART_URL() {
         let url = localStorage.getItem('dynamicOutLinks') ? JSON.parse(localStorage.getItem('dynamicOutLinks')).ChartViewUrl+'/chartshow' : '';
         return url
+      },
+
+      titleLabel() {
+        return this.mainType==='edb'?'指标':'图表';
+      },
+
+      //要公开的指标图表列表
+      approvelistOption() {
+        let arr = this.info.DataList.map(_ => ({
+          label: _.DataName,
+          value: _.DataId,
+          code: _.DataCode,
+          classifyName: _.DataClassifyName
+        }))
+        return arr
+      },
+
+      selectItem() {
+        return this.approvelistOption.find(_=>_.value===this.checkId) || {}
       }
   },
   props: {
@@ -80,20 +100,23 @@ export default {
     mainType: {
       type: String,
     },
-    detail: {
+    info: {
+      type: Object
+    },
+    approveInfo: {
       type: Object
     }
+    
   },
   data() {
     return {
-      selectItem:'',
-      approvelistOption: []
+      checkId:'',
     }
   },
+  mounted() {
+    this.checkId = this.approvelistOption[0].value;
+  },
   methods:{
-    handleChange() {
-
-    }
   },
 }
 </script>
@@ -108,13 +131,9 @@ export default {
     .left,.item {
       display: flex;
       align-items: center;
-      flex-wrap: wrap;
     }
     .left {
-      gap: 30px;
-    }
-    .item {
-      max-width: 350px;
+      gap: 50px;
     }
   }
 
@@ -145,6 +164,8 @@ export default {
       }
 
       .reason {
+        height: 200px;
+        overflow-y: auto;
         margin-top: 20px;
         padding: 10px 20px;
         border: 1px solid #DCDFE6;

+ 4 - 10
src/views/approve_manage/mixins/approveMixins.js

@@ -1,5 +1,6 @@
 import {approveInterence} from '@/api/modules/approve.js'
 import { dataBaseInterface } from '@/api/api.js';
+import { chartBaseV2Interface,edbBaseV2Interface } from '@/api/modules/chartApi';
 
 const filterNodes = (arr,hasDisabled)=>{
     arr.length &&arr.forEach((item) => {
@@ -40,20 +41,13 @@ export default{
 
         async getClassifyOptions() {
             const res = this.activeMainTab==='edb'
-                ?  await dataBaseInterface.targetCatalog({
-                    IsOnlyMe:true,
-                    ParentId:0,
-                    ClassifyType:  2
-                  }) 
-                :  await dataBaseInterface.targetCatalog({
-                    IsOnlyMe:true,
-                    ParentId:0,
-                    ClassifyType:  2
-                  }) 
+                ?  await edbBaseV2Interface.getPublicClassifyBase() 
+                :  await chartBaseV2Interface.getPublicClassifyBase()
           
             if(res.Ret!==200) return 
     
             this.classifyOptions = res.Data.AllNodes || [];
+            filterNodes(this.classifyOptions,false)
         }
     }
 }

+ 5 - 2
src/views/dataEntry_manage/chartSetting.vue

@@ -207,6 +207,7 @@
                       :data="collectClassifys"
                       @change="getCollectClassifys"
                       ref="collectEdbMenuRef"
+                      source="chart"
                     />
                   </div>
 
@@ -227,7 +228,7 @@
             <div class="tree-cont"
               v-else-if="classifyShowType==='shared'"
             >
-                <sharedMenu/>
+                <sharedMenu source="chart"/>
             </div>
           </div>
           
@@ -744,6 +745,7 @@
 
     <!-- 图表收藏弹窗 -->
 		<edbCollectDia
+      source="chart"
 			ref="edbCollectRef"
 			:show.sync="isOpenEdbCollectDia"
 			:edbId="collectEdbForm.edbId"
@@ -753,6 +755,7 @@
 
     <!-- 添加收藏分类弹窗 -->
 		<addCollectClassifyDia
+      source="chart"
 			:show.sync="isOpenCollectClassifyDia"
 			:form="collectClassifyForm"
 			@confirm="getTreeData();isOpenEdbCollectDia&&$refs.edbCollectRef.getClassify()"
@@ -760,9 +763,9 @@
 
 		<!-- 设置公开共享列表弹窗 -->
 		<setSharedListDialog
+      source="chart"
 			:show.sync="isOpenSetSharedDia"
 			:type="sharedType"
-      source="chart"
 			@change="getTreeData"
 		/>
   </div>

+ 1 - 0
src/views/dataEntry_manage/components/addMarkerDialog.vue

@@ -704,6 +704,7 @@ export default {
             KeyWord:keyword,
             CurrentIndex:1,
             PageSize:100,
+            EdbType: '1,2,3'
         }).then(res=>{
             if(res.Ret!==200) return 
             this.searchOptions = res.Data.List||[]

+ 592 - 0
src/views/dataEntry_manage/components/batchMoveDialog.vue

@@ -0,0 +1,592 @@
+<template>
+  <el-dialog
+		:visible.sync="show"
+		:close-on-click-modal="false"
+		:modal-append-to-body="false"
+		@close="handleClose"
+		custom-class="batch-move-dialog fit-screen-dialog"
+		center
+		top="2vh"
+		v-dialogDrag
+    :title="`批量移动${sourceLabel}`"
+	>
+      <div class="list-wrap">
+          <div class="filter-wrap">
+            <div>
+                <el-cascader
+                    style="width: 240px"
+                    v-model="filterObj.classify"
+                    :options="classifyOption"
+                    clearable
+                    collapse-tags
+                    placeholder="选择分类"
+                    @change="handleFilter"
+                    :props="cascaderProps"
+                    :show-all-levels="false"
+                    :key="cascaderKey"
+                    ref="classifyRef"
+                />
+
+                <div>
+                  关联子分类
+                  <el-switch
+                    v-model="filterObj.relevanceChild"
+                    :active-value="true"
+                    :inactive-value="false"
+                    style="margin-left: 5px;"
+                    @change="cascaderKey++"
+                  />
+                </div>
+                
+                <el-select
+                  v-if="source==='edb'"
+                  v-model="filterObj.source"
+                  style="width: 200px"
+                  placeholder="请选择计算方式"
+                  clearable
+                  multiple
+                  collapse-tags
+                  @change="handleFilter"
+                >
+                  <el-option
+                    v-for="item in sourceOption"
+                    :key="item.type"
+                    :label="item.name"
+                    :value="item.type"
+                  >
+                  </el-option>
+                </el-select>
+
+                <el-select
+                  v-if="source==='chart'"
+                  v-model="filterObj.chartTypes"
+                  style="width: 200px"
+                  placeholder="图表类型"
+                  clearable
+                  multiple
+                  collapse-tags
+                  @change="handleFilter"
+                >
+                  <el-option
+                    v-for="item in sourceOption"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+
+                <el-input 
+                  v-model="filterObj.keyWord" 
+                  :placeholder="`${sourceLabel}名称`"
+                  style="width: 200px;"
+                  @change="handleFilter"
+                  clearable
+                >
+                  <i slot="prefix" class="el-input__icon el-icon-search"/>
+                </el-input>
+                
+                <el-checkbox 
+                    label="列表全选" 
+                    v-model="filterObj.checkAll" 
+                    :indeterminate="filterObj.checkSome" 
+                    style="margin-left:10px"
+                    @change="listCheckAllChange"
+                />
+            </div>
+          </div>
+          <div class="table-wrap">
+              <el-table 
+                  :data="list" 
+                  border
+                  ref="table"
+                  height="50vh"
+                  v-loading="listLoading"
+                  @selection-change="selectionChange"
+                  @select="selectHandle" 
+                  @select-all="selectAllPageHandle"
+              >
+                <el-table-column type="selection" min-width="50" align="center" :selectable="filterEdbAuth"/>
+
+                <el-table-column 
+                  :label="item.label" 
+                  align="center" 
+                  v-for="item in tableColumns" 
+                  :key="item.key" 
+                  :width="item.widthsty"
+                  :min-width="item.minwidthsty"
+                >
+                  <template slot-scope="{row}">
+                      <!-- 公开状态 -->
+                      <span v-if="item.key==='PublicStatus'">
+                         {{ publicStatusLabel.get(row.PublicStatus) }}
+                      </span>
+
+                      <span v-else>{{ row[item.key] }}</span>
+                  </template>
+                </el-table-column>
+              </el-table>
+
+              <div style="height:40px;margin:20px 0;">
+                <m-page
+                    class="table-page"
+                    :total="total" 
+                    :pageSize="pageSize"
+                    :page_no="pageNo"
+                    @handleCurrentChange="pageChange"
+                />
+              </div>
+          </div>
+
+          <div class="type-wrap">
+            <label class="el-form-item__label">移动至新分类</label>
+            <cascader
+								v-model="filterObj.newClassify"
+								:options="classifyOption"
+								clearable
+								placeholder="选择新分类"
+                style="width: 240px"
+								:config="{ checkStrictly: true,emitPath:false }"
+							/>
+          </div>
+
+          <div class="bot">
+            <el-button type="primary" plain @click="handleClose">取消</el-button>
+            <el-button type="primary" @click="handleConfirm">确定</el-button>
+          </div>
+      </div>
+  </el-dialog>
+</template>
+
+<script>
+import mPage from '@/components/mPage.vue'
+import { dataBaseInterface } from '@/api/api.js';
+import { edbBaseV2Interface,chartBaseV2Interface } from '@/api/modules/chartApi';
+import { getComputedTypes } from '../databaseComponents/util';
+export default {
+    components:{ mPage, },
+    props:{
+      show:{
+          type: Boolean
+      },
+      source: { //指标或图库
+        type: String,
+        default: 'edb'
+      },
+      type: { //设置类型 设置共享shared 设置公开public
+			  type: Number
+		  },
+      classifyShowType: { //分类类型 own  public
+        type: String
+      }
+    },
+    computed:{
+      // 最大添加指标的上限
+      MAXAddNUM(){
+          let num=100
+          return num
+      },
+
+      tableColumns() {
+        let columns = [
+          {
+            label: '指标名称',
+            key: 'EdbName',
+            minwidthsty: '250px',
+            show: this.source==='edb'
+          },
+          {
+            label: '图表名称',
+            key: 'ChartName',
+            minwidthsty: '250px',
+            show: this.source==='chart'
+          },
+          {
+            label: '分类',
+            key: 'ClassifyName',
+            show: true
+          },
+          {
+            label: '图表类型',
+            key: 'Source',
+            show: this.source==='chart'
+          },
+          {
+            label: '计算方式',
+            key: 'SourceName',
+            widthsty:'100px',
+            show: this.source==='edb'
+          },
+        ]
+
+        let filterColumns = columns.filter(_ => _.show);
+
+        return filterColumns;
+      },
+
+      sourceLabel() {
+        return this.source==='edb'?'指标':'图表';
+      },
+
+      cascaderProps() {
+        return {
+            label: 'ClassifyName',
+            value: 'ClassifyId',
+            children: 'Children',
+            multiple: true,
+            emitPath: false,
+            checkStrictly: !this.filterObj.relevanceChild
+        }
+      },
+      
+      Idkey() {
+        return this.source==='edb'?'EdbInfoId':'ChartInfoId';
+      },
+    },
+    watch: {
+      show(n){
+        if(!n) return
+        
+        this.getClassifyOpts();
+        this.$nextTick(() => {
+          this.getList('init');
+        })
+      }
+    },
+    data() {
+      return {
+        filterObj: {
+          classify: [],
+          relevanceChild:true,
+          pageNo: 1,
+          pageSize: 20,
+          source: [],
+          chartTypes: [],
+          keyWord: '',
+          checkAll: false, //控制全选显示状态
+          checkSome: false,
+          newClassify: ''
+        },
+        sourceOption: getComputedTypes(),
+        classifyOption: [],
+        cascaderKey:0,
+
+        list: [],
+        isSelectAll: false, //真正意义上的全选或不全选
+        checkedList: [], //不全选勾选中的 或 全选取消勾的项
+        selectionReactCancel:false,//手动设置选中中
+      }
+    },
+    
+    methods: {
+
+      //目录 指标/图库
+      async getClassifyOpts() {
+        let res;
+        if(this.source === 'edb') { //指标
+          res = this.classifyShowType==='own'
+              ? await dataBaseInterface.menuListV3({ClassifyType: 2})
+              : await edbBaseV2Interface.getPublicClassifyBase()
+        }else {//图库
+          res = this.classifyShowType==='own'
+              ? await dataBaseInterface.chartClassify()
+              : await chartBaseV2Interface.getPublicClassifyBase()
+        }
+
+        if(res.Ret!==200) return 
+
+        this.classifyOption = res.Data.AllNodes || [];
+        this.filterNodes(this.classifyOption)
+      },
+
+      filterNodes(arr) {
+        arr.length && arr.forEach(item => {
+          item.Children && item.Children.length && this.filterNodes(item.Children)
+          if(!item.Children.length) {
+            delete item.Children
+          }
+        })
+      },
+
+      async getList(type='pageChange') {
+        let apiMap = {
+          'edb': this.getEdbList,
+          'chart': this.getChartList
+        }
+        apiMap[this.source](type)
+      },
+
+      //指标列表
+      async getEdbList(type) {
+        const { 
+          pageNo,
+          pageSize,
+          source,
+          keyWord,
+        } = this.filterObj;
+
+        let checkedClassify = this.$refs.classifyRef.getCheckedNodes();
+        let ClassifyIdList = checkedClassify.length 
+          ? checkedClassify.map(_ => _.data.ClassifyId)
+          : []
+
+        const res = this.classifyShowType === 'own'
+          ? await dataBaseInterface.targetSearchByPage({
+              PageSize:pageSize,
+              Source: source.join(','),
+              CurrentIndex:pageNo,
+              ClassifyId:ClassifyIdList.join(','),
+              KeyWord: keyWord,
+              EdbType: 2,
+              EdbAuth: 1
+          })
+          : await edbBaseV2Interface.getPublicSearchList({
+              EdbPublicList: [3],
+              SourceList:source,
+              Keyword: keyWord,
+              ClassifyIdList,
+              CurrentIndex: pageNo,
+              PageSize: pageSize
+          })
+
+        if(res.Ret !== 200) return
+        this.list = res.Data.List||[];
+        this.total = res.Data.Paging.Totals;
+
+        if(type==='filter'){
+          this.listCheckAllChange(true)
+        }else {
+          //页码变化 选中项不做清空
+          this.checkedSomeSelection()
+        }
+
+      },
+
+      //图表列表
+      async getChartList() {
+
+      },
+
+      handleFilter(val) {
+        this.filterObj.pageNo = 1;
+        if(!val||!val.length) {
+          this.isSelectAll = false;
+          this.checkedList = [];
+          this.filterObj.checkAll = false;
+          this.filterObj.checkSome = false;
+        }
+        this.getList((val.length)?'filter':'');
+      },
+
+      async handleConfirm() {
+        const {
+          source,
+          keyWord,
+          newClassify
+        } = this.filterObj;
+        let checkedClassify = this.$refs.classifyRef.getCheckedNodes();
+        let ClassifyIdList = checkedClassify.length 
+          ? checkedClassify.map(_ => _.data.ClassifyId)
+          : [];
+        
+        let res;
+        if(this.source === 'edb') { //指标
+
+          let params = {
+            SourceList:source,
+            Keyword: keyWord,
+            ClassifyIdList,
+            IsSelectAll: this.isSelectAll,
+            NoEdbIdList: this.isSelectAll ? this.checkedList.map(_ =>_.EdbInfoId) : [],
+            EdbIdList: this.isSelectAll ? [] : this.checkedList.map(_ =>_.EdbInfoId),
+            NewClassifyId: newClassify
+          }
+          res = this.classifyShowType==='own'
+              ? await edbBaseV2Interface.moveOwnBatch(params)
+              : await edbBaseV2Interface.movePublicBatch(params)
+        }else {//图库
+          let params = {
+            Keyword: keyWord,
+            ClassifyIdList,
+            IsSelectAll: this.isSelectAll,
+            NoChartIdList: this.isSelectAll ? this.checkedList.map(_ =>_.ChartInfoId) : [],
+            ChartIdList: this.isSelectAll ? [] : this.checkedList.map(_ =>_.ChartInfoId),
+            NewClassifyId: newClassify
+          }
+          res = this.classifyShowType==='own'
+              ? await chartBaseV2Interface.moveOwnBatch(params)
+              : await chartBaseV2Interface.movePublicBatch(params)
+        }
+
+        if(res.Ret!==200) return 
+        this.$message.success('移动成功')
+        this.handleClose();
+        this.$emit('confirm')
+      },
+
+      /* 设置当页数据勾选状态 */
+      checkedSomeSelection() {
+        this.selectionReactCancel=true
+
+        if(!this.isSelectAll){
+            this.checkedList.map(_ =>{
+                let row = this.list.find(item => item[this.Idkey]==_[this.Idkey])
+                if(row){ //设置部分选中
+                    setTimeout(()=>{
+                        this.$refs.table.toggleRowSelection(row,true)
+                    },20)
+                }
+            })
+        }else{
+            this.$refs.table &&this.$refs.table.toggleAllSelection()
+            this.checkedList.map(_ =>{
+                let row = this.list.find(item => item[this.Idkey]==_[this.Idkey])
+                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(_ => _[this.Idkey] === row[this.Idkey]);
+
+          //全选取消选和不全选选中才有意义
+          if((haveChecked&&!this.isSelectAll) || (!haveChecked&&this.isSelectAll)) {
+            this.checkedList.push(row)
+          }else {
+            this.checkedList=this.checkedList.filter(_ => _[this.Idkey]!==row[this.Idkey])
+          }
+      },
+
+      //整列选
+      selectAllPageHandle(selection){
+          if(this.selectionReactCancel) return 
+          
+          //当前页是选中还是取消
+          let haveChecked = selection && selection.length>0;
+
+          //全选取消选和不全选选中才有意义
+          if((haveChecked&&!this.isSelectAll) || (!haveChecked&&this.isSelectAll)) {
+            this.checkedList = [...this.checkedList,...this.list]
+          }else {
+
+            let pageIds = this.list.map(_ => _[this.Idkey]);
+            this.checkedList = this.checkedList.filter(_ => !pageIds.includes(_[this.Idkey]))
+          }
+      },
+
+      // 页码改变
+      pageChange(page) {
+        this.filterObj.pageNo = page;
+        this.getList('pageChange')
+      },
+
+      handleClose() {
+        this.filterObj = {
+          classify: [],
+          relevanceChild:true,
+          pageNo: 1,
+          pageSize: 10,
+          source: [],
+          chartTypes: [],
+          keyWord: '',
+          checkAll: false, //控制全选显示状态
+          checkSome: false,
+          newClassify:''
+        }
+        this.list = [];
+        this.isSelectAll = false;
+        this.checkedList = [];
+        this.selectionReactCancel =false;
+        this.$emit('update:show',false)
+      }
+    },
+}
+</script>
+
+<style lang="scss" scoped>
+.batch-move-dialog{
+    max-width: 1200px;
+    width:90vw;
+	  overflow: hidden;
+}
+.list-wrap{
+    .type-wrap{
+        display: flex;
+    }
+    .table-wrap{
+        margin-top: 20px;
+    }
+    .filter-wrap {
+      margin-top: 20px;
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      flex-wrap: wrap;
+      gap: 10px;
+      >div {
+        display: flex;
+        align-items: center;
+        gap: 10px;
+      }
+    }
+
+    .bot {
+      margin: 50px 0;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      gap: 30px;
+      .el-button {
+        width: 120px;
+      }
+    }
+}
+</style>

+ 4 - 1
src/views/dataEntry_manage/databaseComponents/chartTrendRender.vue

@@ -39,7 +39,7 @@
 			</el-button>
 		</div>
 		<div class="min-wrapper">
-			<div class="chartWrapper" id="chartWrapper" v-if="showChart">
+			<div :class="['chartWrapper',{'base': onlyShowDetail}]" id="chartWrapper" v-if="showChart">
 				<Chart :options="options" :chartInfo="chartInfo" ref="chartRef"/>
 
 				<template v-if="!onlyShowDetail">
@@ -844,6 +844,9 @@ export default {
 		.chartWrapper {
 			position: relative;
 			padding: 0 105px 0 100px;
+			&.base {
+				padding: 0;
+			}
 			.range-cont {
 				position: absolute;
 				top: 8%;

+ 4 - 4
src/views/dataEntry_manage/databaseComponents/collectEdbMenu.vue

@@ -1,8 +1,8 @@
 <template>
     <el-tree
         ref="catalogTree "
-        class="catalog-tree target_tree"
-        empty-text="暂无图库"
+        :class="['catalog-tree',{'target_tree': source==='chart'}]"
+        empty-text="暂无收藏"
         :data="data"
         :allow-drop="canDropHandle"
         draggable
@@ -11,7 +11,7 @@
           children:'Children'
         }"
         :expand-on-click-node="false"
-        @current-change="(data,node)=>{$parent.nodeChange(data,node)}"
+        @current-change="(data,node)=>{$parent.nodeChange({data,node,treeName:'collect'})}"
         @node-drop="handleDropClassify"
         >
         <div class="custom-tree-node" slot-scope="{ data }">
@@ -44,7 +44,7 @@ export default {
     data: {
       type: Object
     },
-    soure: {
+    source: {
       type: String,
       default: 'edb'
     }

+ 5 - 4
src/views/dataEntry_manage/databaseComponents/edbCollectDia.vue

@@ -29,10 +29,11 @@
         </span>
       </div>
       <div class="dia-bot">
-        <el-button type="primary" style="margin-right: 20px" @click="saveHandle"
+        <el-button type="primary" style="margin-right: 20px" plain @click="cancelHandle">{{$t('Dialog.cancel_btn')}}</el-button>
+        
+        <el-button type="primary" @click="saveHandle"
           >{{$t('Dialog.confirm_save_btn')}}</el-button
         >
-        <el-button type="primary" plain @click="cancelHandle">{{$t('Dialog.cancel_btn')}}</el-button>
       </div>
     </el-dialog>
   </div>
@@ -130,13 +131,13 @@ export default {
         padding: 0 20px;
         cursor: pointer;
         &.act {
-          background: #409eff;
+          background: #0052D9;
           color: #fff;
         }
       }
     }
     .add-cont {
-      color: #409eff;
+      color: #0052D9;
       cursor: pointer;
     }
   }

+ 10 - 11
src/views/dataEntry_manage/databaseComponents/edbTableList.vue

@@ -52,24 +52,23 @@
           <el-button 
             v-if="$parent.isEdbBtnShow('update')"
             type="text" 
-            @click="$emit('refresh','')" 
+            @click="$emit('refresh',row)" 
           >刷新</el-button>
           <el-button 
-            v-if="$parent.isEdbBtnShow('edit')"
+            v-if="$parent.isEdbBtnShow('edit')&&row.Button.OpButton"
             type="text"
-            @click="editNode({},row)"
+            @click="$emit('edit',row)"
           >编辑</el-button>
           <el-button 
             v-if="$parent.isEdbBtnShow('edbData_edbCollect_collect')"
             type="text"
-            :style="classifyShowType==='own'?'color:#D54941':''"
-            @click="handleCollectEdb() "
+            @click="$emit('collect',row)"
           >收藏</el-button>
 
           <el-button 
-            v-if="$parent.isEdbBtnShow('deleteEdb')"
+            v-if="$parent.isEdbBtnShow('deleteEdb')&&row.Button.DeleteButton"
             type="text" 
-            @click="removeNode(_,row)"
+            @click="$emit('remove',row)"
             style="color:#C54322;"
           >删除</el-button>
         </template>
@@ -77,7 +76,7 @@
 
       <el-table-column label="收藏状态" key="CollectStatu" align="center" v-else min-width="150">
         <template slot-scope="{row}">
-          <span v-if="row.CollectClassifyIdList">已收藏至{{'宏观'}},继续</span>
+          <span v-if="row.CollectClassifyIdList&&row.CollectClassifyIdList.length">已收藏至{{row.CollectClassifyNameList.join(',')}},继续</span>
           <span class="editsty" @click="$emit('collect',row)">收藏</span>
         </template>
       </el-table-column>
@@ -200,12 +199,12 @@ export default {
 
     /* 设置当页数据勾选状态 */
     checkedSomeSelection() {
-      this.selectionReactCancel=true
-
+      this.selectionReactCancel=true;
       if(!this.isSelectAll){
           this.checkedList.map(_ =>{
               let row = this.list.find(item => item.EdbInfoId==_.EdbInfoId)
               if(row){ //设置部分选中
+              console.log(row)
                   setTimeout(()=>{
                       this.$refs.tableRef.toggleRowSelection(row,true)
                   },20)
@@ -233,7 +232,7 @@ export default {
       this.isSelectAll = value
       this.$refs.tableRef && this.$refs.tableRef.clearSelection()
 
-      value && this.$refs.tableRef && this.$refs.tableRef.toggleAllSelection()
+      value && this.$refs.tableRef.toggleAllSelection()
     },
 
     selectionChange() {

+ 49 - 20
src/views/dataEntry_manage/databaseComponents/openDialog.vue

@@ -84,6 +84,7 @@
 
 <script>
 import { dataBaseInterface } from '@/api/api.js';
+import { edbBaseV2Interface } from '@/api/modules/chartApi';
 import { unitArr } from '@/utils/defaultOptions';
 import { frequencyArr } from './util'
 import apiIntervalAnalysis from '@/api/modules/intervalAnalysis'
@@ -103,8 +104,9 @@ export default {
 		isBasicBase: {
 			type: Boolean
 		},
-		classifyShowType: { //分类类型
-			type: String
+		classifyShowType: { //分类类型 own public
+			type: String,
+			default:''
 		}
 	},
 	watch: {
@@ -125,6 +127,11 @@ export default {
 			})
 			
 			return strArr.join('/')
+		},
+
+		/* 是否在操作指标加工公共指标模块 */
+		isOperaPublicClassify() {
+			return this.classifyShowType==='public' && !this.isBasicBase;
 		}
 	},
 	data () {
@@ -170,12 +177,19 @@ export default {
 						Level: this.formData.level
           })
         }else{
-          res = await dataBaseInterface.nodeAdd({
-						ClassifyName: this.formData.levelVal||'',
-						ParentId:this.formData.parent_id || 0,
-						Level: this.formData.level,
-						ClassifyType: this.isBasicBase ? 0 : 2
-					})
+					
+          res = this.isOperaPublicClassify
+						? await edbBaseV2Interface.addPublicedClassify({
+								ClassifyName: this.formData.levelVal||'',
+								ParentId:this.formData.parent_id || 0,
+								Level: this.formData.level,
+							})
+					  : await dataBaseInterface.nodeAdd({
+								ClassifyName: this.formData.levelVal||'',
+								ParentId:this.formData.parent_id || 0,
+								Level: this.formData.level,
+								ClassifyType: this.isBasicBase ? 0 : 2
+							})
         }
 				
 			}else if(this.title==='编辑') {
@@ -186,18 +200,17 @@ export default {
             ChartClassifyName: this.formData.levelVal||''
           })
         }else{
-          res = this.formData.isEDB
-					? await dataBaseInterface.targetEdit({
-							ClassifyId: this.formData.level_menu[this.formData.level_menu.length - 1],
-							EdbInfoId: this.formData.edbinfo_id,
-							EdbName: this.formData.levelVal,
-							Frequency: this.formData.frequency,
-							Unit: this.formData.unit
-						})
-					: await dataBaseInterface.nodeEdit({
-							ClassifyName: this.formData.levelVal||'',
-							ClassifyId:this.formData.classify_id || 0
-						})
+					if(this.formData.isEDB) return this.handleEditEdb();
+					
+          res = this.isOperaPublicClassify
+						? await edbBaseV2Interface.editPublicedClassify({
+								ClassifyName: this.formData.levelVal||'',
+								ClassifyId:this.formData.classify_id || 0
+							})
+					  : await dataBaseInterface.nodeEdit({
+								ClassifyName: this.formData.levelVal||'',
+								ClassifyId:this.formData.classify_id || 0
+							})
         }
 				
 			}
@@ -210,6 +223,22 @@ export default {
 
 				
 		},
+		
+		async handleEditEdb() {
+			const res = await dataBaseInterface.targetEdit({
+				ClassifyId: this.formData.level_menu[this.formData.level_menu.length - 1],
+				EdbInfoId: this.formData.edbinfo_id,
+				EdbName: this.formData.levelVal,
+				Frequency: this.formData.frequency,
+				Unit: this.formData.unit
+			})
+
+			if(res.Ret !== 200) return
+			this.$message.success(res.Msg);
+
+		 	this.callbackHandle('update');
+		},
+		
 		/* 成功回调 */
 		callbackHandle(type) {
 			this.$refs.diaForm.resetFields();

+ 166 - 98
src/views/dataEntry_manage/databaseList.vue

@@ -35,16 +35,10 @@
 						:key="item.EdbInfoId"
 						:value="item.EdbInfoId"
 					>
-						<div>
-							<img 
-								:src="$icons.lock_ico2" 
-								width="18" 
-								height="18" 
-								style="vertical-align:middle" 
-								v-if="!item.HaveOperaAuth"
-							/>
-							{{item.EdbName}}
-						</div>
+						<div class="edb-search-item">
+								{{item.EdbName}}
+								<i class="el-icon-star-on" style="color: #0052D9;font-size:18px;" v-if="item.CollectClassifyIdList"/>
+							</div>
 					</el-option>
 				</el-select>
 			</div>
@@ -91,18 +85,11 @@
 						<el-option
 							v-for="item in searchOptions"
 							:key="item.EdbInfoId"
-							:label="currentLang==='en'?(item.EdbNameEn||item.EdbName):item.EdbName"
 							:value="item.EdbInfoId"
 						>
-							<div>
-								<img 
-									:src="$icons.lock_ico2" 
-									width="18" 
-									height="18" 
-									style="vertical-align:middle" 
-									v-if="!item.HaveOperaAuth"
-								/>
-								{{currentLang==='en'?(item.EdbNameEn||item.EdbName):item.EdbName}}
+							<div class="edb-search-item">
+								{{item.EdbName}}
+								<i class="el-icon-star-on" style="color: #0052D9;font-size:18px;" v-if="item.CollectClassifyIdList&&item.CollectClassifyIdList.length"/>
 							</div>
 						</el-option>
 					</el-select>
@@ -135,7 +122,7 @@
 									:load="getLazyTreeData"
 									@node-expand="handleNodeExpand"
 									@node-collapse="handleNodeCollapse"
-									@current-change="nodeChange"
+									@current-change="(data,node)=>{nodeChange({data,node,treeName:classifyShowType})}"
 									@node-drop="dropOverHandle"
 									@node-drag-end="dropMouseLeave"
 									@node-drag-leave="dropMouseLeave"
@@ -210,7 +197,7 @@
 										<span>{{$t('EtaBasePage.add_first_menu_btn')}}</span>
 									</div>
 									<!-- 移动指标 -->
-									<div class="opt-item" v-if="!isBasicBase">
+									<div class="opt-item" v-if="!isBasicBase" @click="isOpenBatchMoveDialog=true">
 										<img
 											src="~@/assets/img/set_m/move_batch_ico.png"
 											alt=""
@@ -218,6 +205,7 @@
 										/>
 										<span>批量移动指标</span>
 									</div>
+
 									<template v-if="classifyShowType==='own'&&!isBasicBase">
 										<!-- 共享指标 -->
 										<div class="opt-item" @click="handleOpenSetShared('shared')">
@@ -295,7 +283,8 @@
 			
 			<!-- 指标图表列表 -->
 			<div class="main-right right list" id="right" v-show="isShowList">
-				<edbTableList 
+				<edbTableList
+					ref="edbTableListRef"
 					:isBasicBase="isBasicBase"
 					:tableLoading="tableLoading"
 					:list="chartList"
@@ -304,6 +293,10 @@
 					:pageNo="CurrentIndex"
 					@click-detail="detailShowHandle"
 					@page-change="handleListPageChange"
+					@refresh="refreshTargetHandle"
+					@edit="item =>{editNode({},item)}"
+					@collect="handleCollectEdb"
+					@remove="item =>{removeNode({},item)}"
 				/>
 			</div>
 
@@ -328,13 +321,12 @@
 							<el-button 
 								v-if="isEdbBtnShow('edbData_edbCollect_collect')"
 								type="text"
-								:style="EdbData.CollectClassifyIdList.length?'color:#D54941':''"
-								@click="EdbData.CollectClassifyIdList.length?handleRemoveCollect():handleCollectEdb(EdbData)" 
-							>{{EdbData.CollectClassifyIdList.length?'移出':'收藏'}}</el-button>
+								@click="handleCollectEdb(EdbData)" 
+							>收藏</el-button>
 							<el-button 
 								v-if="isEdbBtnShow('update')"
 								type="text" 
-								@click="refreshTargetHandle" 
+								@click="refreshTargetHandle(EdbData)" 
 							>{{$t('Edb.detail_refresh_btn')}}<!-- 刷新 --></el-button>
 							<el-button 
 								v-if="isEdbBtnShow('edit')"
@@ -406,7 +398,7 @@
 									<el-button 
 										v-if="EdbData.Button.DeleteButton&&isEdbBtnShow('deleteEdb')"
 										type="text" 
-										@click="removeNode(_,EdbData)" 
+										@click="removeNode({},EdbData)" 
 										style="color:#C54322;"
 									>{{$t('Edb.detail_del_btn')}}<!-- 删除 --></el-button>
 								</div>
@@ -656,28 +648,34 @@
 			:show.sync="isOpenEdbCollectDia"
 			:edbId="collectEdbForm.edbId"
 			:add_ids="collectEdbForm.collectClassifyIdList"
-			@success="arr=>{tableData[0].CollectClassifyIdList = arr}"
+			@success="handleCollectSuccess"
 		/>
 
 		<!-- 添加收藏分类弹窗 -->
 		<addCollectClassifyDia
 			:show.sync="isOpenCollectClassifyDia"
 			:form="collectClassifyForm"
-			@confirm="getTreeData();isOpenEdbCollectDia&&$refs.edbCollectRef.getClassify()"
+			@confirm="getCollectClassifys();isOpenEdbCollectDia&&$refs.edbCollectRef.getClassify()"
 		/>
 
 		<!-- 设置公开共享列表弹窗 -->
 		<setSharedListDialog
 			:show.sync="isOpenSetSharedDia"
 			:type="sharedType"
-			@change="getTreeData"
+		/>
+
+		<!-- 批量移动接口 -->
+		<batchMoveDialog 
+			:show.sync="isOpenBatchMoveDialog"
+			:classifyShowType="classifyShowType"
+			@confirm="getTreeData"
 		/>
 	</div>
 </template>
 
 <script>
 import { dataBaseInterface } from '@/api/api.js';
-import { edbCollectInterface } from '@/api/modules/chartApi';
+import { edbCollectInterface,edbBaseV2Interface } from '@/api/modules/chartApi';
 import { getComputedTypes,getBatchComputedTypes,getFormulaTip } from './databaseComponents/util';
 
 import openDialog from './databaseComponents/openDialog';
@@ -708,6 +706,7 @@ import addCollectClassifyDia from './databaseComponents/addCollectClassifyDia.vu
 import edbTableList from './databaseComponents/edbTableList.vue';
 import sharedMenu from './sharedComponents/sharedMenu.vue';
 import setSharedListDialog from './sharedComponents/setSharedListDialog.vue';
+import batchMoveDialog from './components/batchMoveDialog.vue';
 export default {
 	name: '',
 	components: {
@@ -738,7 +737,8 @@ export default {
 		addCollectClassifyDia,
 		edbTableList,
 		sharedMenu,
-		setSharedListDialog
+		setSharedListDialog,
+		batchMoveDialog
 	},
 	directives: {
 		drag(el, bindings,vnode) {
@@ -829,7 +829,6 @@ export default {
 			search_page: 1,
 			search_have_more: false,
 			current_search:'',
-			// currentLang:'ch', // 语言 ch 中文 en 英文
 			// -----------------设置英文指标弹窗
 			setEnName:false,
 			// 传入的formItem所需内容
@@ -883,6 +882,7 @@ export default {
 				{ label: '公共指标',key: 'public' },
 			],
 			classifyShowType:'own',
+			currentTreeName: 'own',//当前点击的分类树 4块 列表请求接口不同  own public collect sharedReceive sharedSend
 			
 			collectClassifys:[],//收藏目录
 			//指标收藏弹窗
@@ -895,6 +895,9 @@ export default {
 			/* 设置共享弹窗 */
 			isOpenSetSharedDia: false,
 			sharedType:'',//shared/public
+
+			//批量移动弹窗
+			isOpenBatchMoveDialog: false
 		};
 	},
 	watch: {
@@ -1083,13 +1086,15 @@ export default {
 			}
 			return checkPermissionBtn(BtnMap[type])
 		},
-		/* 获取树分类数据 */
+		/* 获取树分类数据 我的 公共指标*/
 		async getTreeData(params) {
-			const res = await dataBaseInterface.targetCatalog({
-				IsOnlyMe:this.IsOnlyMe,
-				ParentId:0,
-				ClassifyType: this.isBasicBase ? 0 : 2
-			})
+			const res = this.classifyShowType === 'public'
+				? await edbBaseV2Interface.getPublicClassifyBase()
+				: await dataBaseInterface.targetCatalog({
+						IsOnlyMe:this.IsOnlyMe,
+						ParentId:0,
+						ClassifyType: this.isBasicBase ? 0 : 2
+					})
 
 
 			if(res.Ret!==200) return 
@@ -1164,7 +1169,6 @@ export default {
 						this.$refs.menuTree.setCurrentKey(null)
 						// 清除当前的label
 						this.$message.warning('该图表已删除,自动查看下一图表')
-						// this.deleteLabel({code:this.select_node,id:this.selected_edbid,classifyId:''})
 						
 					}
 					if(type==='refresh') {
@@ -1195,30 +1199,58 @@ export default {
 			})
 		}),
 		//获取指标图表列表
-		async getEdbChartList(){
+		async getEdbChartList(type=''){
 			this.tableLoading = true;
-			const res = this.classifyShowType === 'collect' 
-				? await edbCollectInterface.getCollectEdb({
-						PageSize:this.PageSize,
-						CurrentIndex:this.CurrentIndex,
-						ClassifyId:this.select_classifyId,
-						Keyword: ''
-					})
- 				:	await dataBaseInterface.getEdbChartList({
-						PageSize:this.PageSize,
-						CurrentIndex:this.CurrentIndex,
-						ClassifyId:this.select_classifyId,
-						IsOnlyMe:this.IsOnlyMe,
-						EdbType: this.isBasicBase?1:2
-					})
 
-				this.tableLoading = false;
-				if(res.Ret!==200) return
-				if(res.Data){
-					this.chartList = res.Data.List || [];
-					this.Total = res.Data.Paging.Totals||0
-					this.IsListEnd = res.Data.Paging.IsEnd
+			let res = null;
+
+			
+			if(this.classifyShowType==='shared') { //共享列表
+				res = await edbBaseV2Interface.getSharedEdbList({
+					FilterSource: this.currentTreeName==='sharedReceive' ? 1 : 0
+				})
+			}else{// 列表走es
+
+				let EdbAuth = 0;
+				if(this.classifyShowType==='own'&&this.currentTreeName==='own'&&!this.isBasicBase) { //我的
+					EdbAuth = 1;
+				}else if(this.classifyShowType==='public'&&!this.isBasicBase) {//公共
+					EdbAuth = 2;
+				}
+
+				let EdbCollect = 0;
+				if(this.classifyShowType==='own'&&this.currentTreeName==='collect') {
+					EdbCollect = 1
 				}
+				let params = {
+					PageSize:this.PageSize,
+					CurrentIndex:this.CurrentIndex,
+					ClassifyId:this.select_classifyId,
+					KeyWord: this.search_txt,
+					EdbType: EdbCollect===1 ? '0' : (this.isBasicBase?'1':'2'),
+					EdbCollect,
+					EdbAuth
+				}
+
+				res = await dataBaseInterface.targetSearchByPage(params)
+			}
+			
+
+			this.tableLoading = false;
+			if(res.Ret!==200) return
+
+			if(res.Data){
+				this.chartList = res.Data.List || [];
+				this.Total = res.Data.Paging.Totals||0
+				this.IsListEnd = res.Data.Paging.IsEnd
+			}
+
+			if(type==='pageChange'){
+				//页码变化 选中项不做清空
+				this.$refs.edbTableListRef && this.$nextTick(() => {
+					this.$refs.edbTableListRef.checkedSomeSelection()
+				})
+			}
 		},
 		// 切换刷新状态
 		async toggleEdbRefreshStatus(item,type='list'){
@@ -1247,7 +1279,7 @@ export default {
 		//指标图表列表-加载更多
 		handleListPageChange(page) {
 			this.CurrentIndex = page;
-			this.getEdbChartList();
+			this.getEdbChartList('pageChange');
 		},
 		/* 搜索 */
 		searchHandle(query) {
@@ -1260,7 +1292,7 @@ export default {
 			dataBaseInterface.targetSearchByPage({
 				KeyWord:query,
 				CurrentIndex: page,
-				EdbType: this.isBasicBase?1:2,
+				EdbType: this.isBasicBase?'1':'2',
 				EdbAuth: this.isBasicBase?0:(this.classifyShowType==='own'?1:2)
 			}).then(res => {
 				if(res.Ret !== 200) return
@@ -1361,8 +1393,13 @@ export default {
 			this.isComplete = false
 			this.add_params = {}
 		},
-		/* 节点变化时 */
-		nodeChange(data,node) {
+		/* 节点变化时  treeName记录点击的是哪块的分类 own public collect sharedReceive shared*/ 
+		nodeChange({data,node,treeName}) { 
+			// if(this.classifyShowType === 'shared') { //点的是收到共享的用户名 过滤
+
+			// }
+			
+			this.currentTreeName=treeName;
 			this.search_txt = '';
 			this.select_classifyId = !data.EdbInfoId?data.ClassifyId:0;
 			this.select_node = data.UniqueCode;
@@ -1509,13 +1546,13 @@ export default {
 			}
 		},
 		/* 刷新获取指标最新数据 */
-		refreshTargetHandle: _.debounce(function() {
+		refreshTargetHandle: _.debounce(function(item) {
 			//如果该指标为暂停刷新,则提示
-			if(this.EdbData.NoUpdate){
+			if(item.NoUpdate){
 				this.$message.warning("该指标已暂停刷新")
 				return
 			}
-			if(this.selected_edbid) {
+			if(item.EdbInfoId) {
 				this.loading = this.$loading({
 					lock: true,
 					target:'.detail',
@@ -1524,7 +1561,7 @@ export default {
 					background: 'rgba(255, 255, 255, 0.8)'
 				});
 				dataBaseInterface.targetRefresh({
-					EdbInfoId: this.selected_edbid
+					EdbInfoId: item.EdbInfoId
 				}).then(res => {
 					if(res.Ret === 200) {
 						this.loading.close();
@@ -1541,12 +1578,18 @@ export default {
 			}
 		},500), 
 		/* 删除节点校验 */
-		removeNode(node,data) {
-			dataBaseInterface.nodeDelCheck({
-				ClassifyId: data.ClassifyId,
-				EdbInfoId: data.EdbInfoId
-			}).then(res => {
-				if(res.Ret === 200) {
+		async removeNode(node,data) {
+			let res = this.classifyShowType === 'public'
+				? await edbBaseV2Interface.delPublicedClassifyCheck({
+						ClassifyId: data.ClassifyId,
+						EdbInfoId: data.EdbInfoId
+					})
+				:	await dataBaseInterface.nodeDelCheck({
+						ClassifyId: data.ClassifyId,
+						EdbInfoId: data.EdbInfoId
+					})
+
+				if(res.Ret !== 200) return
 					/**
 					 * 0 可删除
 					 * 1 关联指标
@@ -1593,8 +1636,6 @@ export default {
 							this.delHandle(data.ClassifyId,data.EdbInfoId);
 						}).catch(() => {         
 						});
-				}
-			})
 
 		},
 		getRouteUrl(table){
@@ -1628,19 +1669,27 @@ export default {
 			return url
 		},
 		/* 删除方法 */
-		delHandle(ClassifyId,EdbInfoId) {
-			dataBaseInterface.nodeDelete({
-				ClassifyId,
-				EdbInfoId
-			}).then(res => {
-				if(res.Ret === 200) {
+		async delHandle(ClassifyId,EdbInfoId) {
+
+			const res = this.classifyShowType === 'public'
+				? await edbBaseV2Interface.delPublicedClassify({
+						ClassifyId,
+						EdbInfoId
+					})
+				:	await dataBaseInterface.nodeDelete({
+						ClassifyId,
+						EdbInfoId
+					})
+				if(res.Ret !== 200) return 
 					this.$message.success(this.$t('MsgPrompt.delete_msg'));
+
+					if(this.selected_edbid) {
+						this.selected_edbid = 0;
+					}else {
+						this.getEdbChartList();
+					}
 					this.getTreeData();
-					this.selected_edbid = 0;
-					// this.deleteLabel({code:this.select_node,id:EdbInfoId,classifyId:ClassifyId})
-					// this.getNewTargetList();
-				}
-			})
+
 		},
 		/* 判断节点是否能被拖拽 */
 		canDragHandle({data}) {
@@ -1785,7 +1834,6 @@ export default {
 			this.select_node = code;
 			this.selected_edbid = id;
 
-			//this.defaultShowNodes=this.findParentNodeForClassifyId(classifyId,code)
 			const containerDom = document.getElementById('detail-container')
 			containerDom&&(containerDom.scrollTop = 0)
 			
@@ -2100,11 +2148,15 @@ export default {
 				resolve(this.treeData)
 			}else{
 				let arr=[]
-				const res=await dataBaseInterface.targetCatalog({
-					ParentId:node.data.ClassifyId,
-					IsOnlyMe:this.IsOnlyMe,
-					ClassifyType: this.isBasicBase ? 0 : 2
-				})
+				const res = this.classifyShowType === 'public'
+					? await edbBaseV2Interface.getPublicClassifyExpand({
+							ParentId: node.data.ClassifyId,
+						})
+					:	await dataBaseInterface.targetCatalog({
+							ParentId:node.data.ClassifyId,
+							IsOnlyMe:this.IsOnlyMe,
+							ClassifyType: this.isBasicBase ? 0 : 2
+						})
 				if (res.Ret === 200) {
 					const temarr = res.Data.AllNodes || [];
 					arr=temarr.map(item=>{
@@ -2171,14 +2223,15 @@ export default {
 			this.defaultShowNodes = [];
 			this.chartList = [];
 			this.Total = 0;
-			this.CurrentIndex = 0;
+			this.CurrentIndex = 1;
 			this.selected_edbid = 0;
 			this.select_classifyId = 0;
 			this.search_txt = '';
+			this.select_node = '';
 			
-			['own','public'].includes(this.classifyShowType) && this.getTreeData()
-			// this.classifyShowType==='public'&&this.getEdbChartList()
+			['own','public'].includes(this.classifyShowType) && this.getTreeData();
 			this.classifyShowType==='own' && this.getCollectClassifys();
+			this.getEdbChartList();
 		},
 
 		//获取收藏指标分类
@@ -2197,6 +2250,15 @@ export default {
 			this.isOpenEdbCollectDia = true
 		},
 
+		//收藏成功
+		handleCollectSuccess(arr) {
+			if(this.selected_edbid) {
+				this.tableData[0].CollectClassifyIdList = arr;
+			}else{
+				this.getEdbChartList()
+			}
+		},
+
 		async handleRemoveCollect(item=null) {
 			const res = await edbCollectInterface.edbCollectCancel({
 				ClassifyId: this.select_classifyId,
@@ -2667,6 +2729,12 @@ export default {
 		}
 	}
 }
+
+.edb-search-item {
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+}
 .edb-tool-popover{
 	.edb-tool-wrap{
 		display: flex;

+ 76 - 18
src/views/dataEntry_manage/sharedComponents/batchSetPublicDia.vue

@@ -16,7 +16,7 @@
       <el-table 
         :data="tableData" 
         border
-        height="40vh"
+        height="50vh"
         ref="addTableRef"
       >
 
@@ -49,7 +49,7 @@
             </template>
             <template slot-scope="{row}">
                   <el-cascader
-                    v-model="row.EtaClassifyId"
+                    v-model="row.PublicClassifyId"
                     :options="classifyOption"
                     :props="{	
                       label: 'ClassifyName',
@@ -60,11 +60,12 @@
                     }"
                     :placeholder="$t('Edb.InputHolderAll.input_menu')"
                     :disabled="(classifyType===1)"
+                    size="small"
                   />
             </template>
         </el-table-column>
       </el-table>
-      <div class="reason-wrapper">
+      <div class="reason-wrapper" v-if="isNeedPublicApprove">
         <label class="el-form-item__label">公开理由</label>
          <el-input
             type="textarea"
@@ -84,8 +85,7 @@
 </div>
 </template>
 <script>
-import { dataBaseInterface } from '@/api/api.js';
-import { operateAuthInterface,departInterence } from '@/api/modules/setApi';
+import { edbBaseV2Interface } from '@/api/modules/chartApi';
 export default {
   props: {
     show: {
@@ -95,13 +95,16 @@ export default {
       type: String,
       default: 'edb'
     },
-    list: {
-      type: Array
+    checkedParams: {
+      type: Object
     }
   },
   watch: {
     show(nval) {
       if(!nval) return
+
+      this.getList()
+      this.getApproveAuth()
       this.getClassifyOpts()
     }
   },
@@ -112,18 +115,34 @@ export default {
       classifyOption: [],
       classifyType:0,//目录方式
       selectClassify: 0,//选择的分类
+
+      isNeedPublicApprove: true,//是否需要公开走审批
     }
   },
   methods:{
     handleClose() {
-      this.formData = {
-        classifyId: '',
-        reason: ''
-      };
+      this.tableData = [];
+      this.reason = '';
+      this.isNeedPublicApprove = true;
+      this.classifyType = 0;//目录方式
+      this.selectClassify = 0;//选择的分类
       this.$emit('update:show',false);
     },
 
-    handleConfirm() {
+    async handleConfirm() {
+      const res = this.source === 'edb'
+        ? await edbBaseV2Interface.setEdbPublic({
+            EdbInfoList: this.tableData.map(_ => ({
+              EdbInfoId: _.EdbInfoId,
+              ClassifyId: _.PublicClassifyId
+            })),
+            Description: this.reason
+          })
+        : null
+
+      if(res.Ret !== 200) return
+      this.$message.success(this.isNeedPublicApprove?'已提交申请,请等待审批':'设置成功')
+
       this.handleClose()
       this.$emit('confirm')
     },
@@ -131,21 +150,54 @@ export default {
 
     handleClassifyAllChange(e){
       this.tableData.forEach(item=>{
-        item.ClassifyId = this.selectClassify
+        item.PublicClassifyId = this.selectClassify;
       })
     },
 
+    async getList() {
+      const res = this.source === 'edb'
+        ? await edbBaseV2Interface.getPublicSearchListAll({
+            ...this.checkedParams
+          })
+        : null
+
+      if(res.Ret !== 200) return
+      this.tableData = res.Data.List && res.Data.List.map(_ =>({
+        ..._,
+        PublicClassifyId: 0,
+        Name: this.source==='edb' ? _.EdbName : _.ChartName
+      }));
+    },
+
+    //获取是否需要审批
+    async getApproveAuth() {
+      const res = await edbBaseV2Interface.getSetPublicApprove({
+        DataType: this.source==='edb'?1:2
+      })
+
+      if(res.Ret !== 200) return
+      this.isNeedPublicApprove = res.Data;
+    },
+
     //公开目录
     async getClassifyOpts() {
-      const res = await dataBaseInterface.targetCatalog({
-        IsOnlyMe:true,
-        ParentId:0,
-        ClassifyType:  2
-      })
+      const res = this.source === 'edb'
+        ? await edbBaseV2Interface.getPublicClassifyBase()
+        : null
 
       if(res.Ret!==200) return 
 
       this.classifyOption = res.Data.AllNodes || [];
+      this.filterNodes(this.classifyOption)
+    },
+
+    filterNodes(arr) {
+      arr.length && arr.forEach(item => {
+        item.Children && item.Children.length && this.filterNodes(item.Children)
+        if(!item.Children.length) {
+          delete item.Children
+        }
+      })
     },
 
   },
@@ -156,6 +208,12 @@ export default {
   display: flex;
   margin: 20px 0;
 }
+.header-cascader {
+  width: 160px;
+}
+.cascader-wrapper {
+  width: 340px;
+}
 .dia-bot {
   margin: 30px 0;
   display: flex;

+ 43 - 12
src/views/dataEntry_manage/sharedComponents/setPublicDia.vue

@@ -23,11 +23,11 @@
             :options="classifyOption"
             clearable
             :placeholder="$t('Edb.InputHolderAll.input_menu')"
-            :config="{ checkStrictly: true }"
+            :config="{ checkStrictly: true,emitPath:false }"
             cascaderWidth="width: 400px"
           />
         </el-form-item>
-        <el-form-item label="共享权限">
+        <el-form-item label="公开理由" v-if="isNeedPublicApprove">
           <el-input
             type="textarea"
             :rows="5"
@@ -47,8 +47,7 @@
 </div>
 </template>
 <script>
-import { dataBaseInterface } from '@/api/api.js';
-import { operateAuthInterface,departInterence } from '@/api/modules/setApi';
+import { edbBaseV2Interface } from '@/api/modules/chartApi';
 export default {
   props: {
     show: {
@@ -58,13 +57,15 @@ export default {
       type: String,
       default: 'edb'
     },
-    list: {
-      type: Array
+    checkedParams: {
+      type: Object
     }
   },
   watch: {
     show(nval) {
       if(!nval) return
+
+      this.getApproveAuth()
       this.getClassifyOpts()
     }
   },
@@ -75,6 +76,7 @@ export default {
         reason: ''
       },
       classifyOption: [],
+      isNeedPublicApprove: true,//是否需要公开走审批
     }
   },
   methods:{
@@ -83,25 +85,54 @@ export default {
         classifyId: '',
         reason: ''
       };
+      this.isNeedPublicApprove = true;
       this.$emit('update:show',false);
     },
 
-    handleConfirm() {
+    async handleConfirm() {
+      const res = await edbBaseV2Interface.setEdbPublic({
+        EdbInfoList: [{
+          EdbInfoId: this.checkedParams.EdbInfoId,
+          ClassifyId: this.formData.classifyId||0
+        }],
+        Description: this.formData.reason
+      })
+      if(res.Ret !== 200) return
+      this.$message.success(this.isNeedPublicApprove?'已提交申请,请等待审批':'设置成功')
+
       this.handleClose()
       this.$emit('confirm')
     },
 
+    //获取是否需要审批
+    async getApproveAuth() {
+      const res = await edbBaseV2Interface.getSetPublicApprove({
+        DataType: this.source==='edb'?1:2
+      })
+
+      if(res.Ret !== 200) return
+      this.isNeedPublicApprove = res.Data;
+    },
+
     //公开目录
     async getClassifyOpts() {
-      const res = await dataBaseInterface.targetCatalog({
-        IsOnlyMe:true,
-        ParentId:0,
-        ClassifyType:  2
-      })
+      const res = this.source === 'edb'
+        ? await edbBaseV2Interface.getPublicClassifyBase()
+        : null
 
       if(res.Ret!==200) return 
 
       this.classifyOption = res.Data.AllNodes || [];
+      this.filterNodes(this.classifyOption)
+    },
+
+    filterNodes(arr) {
+      arr.length && arr.forEach(item => {
+        item.Children && item.Children.length && this.filterNodes(item.Children)
+        if(!item.Children.length) {
+          delete item.Children
+        }
+      })
     },
 
   },

+ 50 - 5
src/views/dataEntry_manage/sharedComponents/setSharedDia.vue

@@ -20,7 +20,7 @@
         <el-form-item label="共享权限">
           <el-radio-group v-model="formData.type">
             <el-radio :label="1">仅查看</el-radio>
-            <el-radio :label="2">编辑</el-radio>
+            <el-radio :label="2">编辑</el-radio>
           </el-radio-group>
         </el-form-item>
         <el-form-item label="共享用户">
@@ -86,7 +86,8 @@
 </div>
 </template>
 <script>
-import { traverseTree } from "@/utils/commonOptions"
+import { edbBaseV2Interface,chartBaseV2Interface } from '@/api/modules/chartApi';
+import { traverseTree } from "@/utils/commonOptions";
 import { operateAuthInterface,departInterence } from '@/api/modules/setApi';
 export default {
   props: {
@@ -97,14 +98,19 @@ export default {
       type: String,
       default: 'edb'
     },
-    list: {
-      type: Array
+    checkedParams: {
+      type: Object
     }
   },
   watch: {
     show(nval) {
       if(!nval) return
       this.getUserList()
+
+      //单设置回显用户
+      if(this.checkedParams.EdbInfoId || this.checkedParams.ChartInfoId ) {
+        this.getSharedUser()
+      }
     }
   },
   computed: {
@@ -118,7 +124,7 @@ export default {
         <p style='margin-bottom:15px'>注意:<span style='color:#f00'>若选中${sourceLabel}中存在已共享${sourceLabel},则此操作(不选任何用户)会取消共享!</span></p>
         <p>是否确认?</p>
       `
-     return this.list.length>1 ? batchStr : str;
+     return !this.checkedParams.EdbInfoId ? batchStr : str;
     }
   },
   data() {
@@ -140,6 +146,7 @@ export default {
         users: []
       };
       this.selectUserList = [];
+      this.isOpenHintDia = false;
       this.$emit('update:show',false);
     },
 
@@ -149,10 +156,48 @@ export default {
     },
 
     async handleSetApi() {
+      let params = {
+        ...this.checkedParams,
+        UserIdList: this.formData.users.map(_ => Number(_)),
+        ShareType: this.formData.type
+      }
+
+      let res;
+      if(this.source==='edb') { //指标
+        res = this.checkedParams.EdbInfoId 
+          ? await edbBaseV2Interface.setEdbSharedSingle(params)
+          : await edbBaseV2Interface.setEdbSharedBatch(params)
+      }else { //图表
+        res = this.checkedParams.ChartInfoId 
+          ? await chartBaseV2Interface.setEdbSharedSingle(params)
+          : await chartBaseV2Interface.setEdbSharedBatch(params)
+      }
+
+      if(res.Ret !== 200) return
+      this.$message.success('设置成功') 
+
       this.handleClose()
       this.$emit('confirm')
     },
 
+    /* 获取已共享用户 */
+    async getSharedUser() {
+      const res = this.source === 'edb'
+        ? await edbBaseV2Interface.getEdbSharedUser({EdbInfoId: this.checkedParams.EdbInfoId})
+        : await chartBaseV2Interface.getEdbSharedUser({ChartInfoId: this.checkedParams.ChartInfoId})
+
+      if(res.Ret !== 200) return
+      
+      this.formData = {
+        type: res.Data.ShareType,
+        users: res.Data.List ? res.Data.List.map(_ => String(_.SysUserId)) : []
+      };
+
+      this.$nextTick(() => {
+        this.checkUser()
+      })
+    },
+
       /* 获取用户列表 */
     async getUserList() {
       

+ 268 - 61
src/views/dataEntry_manage/sharedComponents/setSharedListDialog.vue

@@ -17,32 +17,35 @@
           </p>
           <div class="filter-wrap">
             <div>
-                <cascader
-                    style="display:inline-block"
+                <el-cascader
+                    style="width: 240px"
                     v-model="filterObj.classify"
                     :options="classifyOption"
                     clearable
                     collapse-tags
                     placeholder="选择分类"
-                    cascaderWidth="width: 240px"
-                    @changeVal="handleFilter"
-                    :config="{ multiple: true, emitPath: false }"
+                    @change="handleFilter"
+                    :props="cascaderProps"
+                    :show-all-levels="false"
+                    :key="cascaderKey"
+                    ref="classifyRef"
                 />
 
                 <div>
                   关联子分类
                   <el-switch
                     v-model="filterObj.relevanceChild"
-                    :active-value="1"
-                    :inactive-value="2"
+                    :active-value="true"
+                    :inactive-value="false"
                     style="margin-left: 5px;"
+                    @change="cascaderKey++"
                   />
                 </div>
                 
                 <el-select
                   v-if="source==='edb'"
                   v-model="filterObj.source"
-                  style="width: 140px"
+                  style="width: 200px"
                   clearable
                   multiple
                   collapse-tags
@@ -50,9 +53,9 @@
                 >
                   <el-option
                     v-for="item in sourceOption"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
+                    :key="item.type"
+                    :label="item.name"
+                    :value="item.type"
                   >
                   </el-option>
                 </el-select>
@@ -60,7 +63,7 @@
                 <el-select
                   v-if="source==='chart'"
                   v-model="filterObj.chartTypes"
-                  style="width: 140px"
+                  style="width: 200px"
                   placeholder="图表类型"
                   clearable
                   multiple
@@ -77,13 +80,18 @@
                 </el-select>
 
                 <el-select
-                  v-model="filterObj.sharedStatus"
+                  v-model="filterObj.listStatus"
                   style="width: 140px"
                   clearable
+                  multiple
                   @change="handleFilter"
                 >
-                  <el-option label="未共享" :value="1"/>
-                  <el-option label="已共享" :value="2"/>
+                  <el-option 
+                    :label="item.label" 
+                    :value="item.value" 
+                    v-for="item in statusOptions" 
+                    :key="item.value"
+                  />
                 </el-select>
 
                 <el-input 
@@ -129,14 +137,22 @@
                   :min-width="item.minwidthsty"
                 >
                   <template slot-scope="{row}">
-                      <span >{{ row[item.key] }}</span>
+                      <!-- 公开状态 -->
+                      <span v-if="item.key==='PublicStatus'">
+                         {{ publicStatusLabel.get(row.PublicStatus) }}
+                      </span>
+
+                      <span v-else>{{ row[item.key] }}</span>
                   </template>
                 </el-table-column>
 
                 <el-table-column label="操作" align="center">
                   <template slot-scope="{row}">
                     <el-button type="text" @click="handleSetShare(row)" v-if="type==='shared'">设置共享</el-button>
-                    <el-button type="text" @click="handleSetPublic(row)" v-else-if="type==='public'">设置公开</el-button>
+
+                    <el-button type="text" @click="handleSetPublic(row)" v-else-if="type==='public'&&row.PublicStatus===0">设置公开</el-button>
+
+                    <el-button type="text" @click="handleCancelPublic(row)" v-else-if="type==='public'&&row.PublicStatus!==0">撤销</el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -146,8 +162,8 @@
                     class="table-page"
                     :total="total" 
                     :pageSize="pageSize"
-                    :page_no="page"
-                    @handleCurrentChange="pageNumberChange"
+                    :page_no="pageNo"
+                    @handleCurrentChange="pageChange"
                 />
               </div>
           </div>
@@ -157,7 +173,7 @@
   <!-- 设置共享 -->
   <setSharedDia
     :show.sync="isSetSharedDia"
-    :list="chooseSetList"
+    :checkedParams="checkedParams"
     :source="source"
     @confirm="handleSetConfirm"
   />
@@ -165,7 +181,7 @@
   <!-- 设置公开 -->
   <setPublicDia
     :show.sync="isSetPublicDia"
-    :list="chooseSetList"
+    :checkedParams="checkedParams"
     :source="source"
     @confirm="handleSetConfirm"
   />
@@ -173,7 +189,7 @@
   <!-- 批量设置公开 -->
   <batchSetPublicDia
     :show.sync="isBatchSetPublicDia"
-    :list="chooseSetList"
+    :checkedParams="checkedParams"
     :source="source"
     @confirm="handleSetConfirm"
   />
@@ -183,7 +199,8 @@
 <script>
 import mPage from '@/components/mPage.vue'
 import { dataBaseInterface } from '@/api/api.js';
-import { edbCollectInterface } from '@/api/modules/chartApi';
+import { edbBaseV2Interface,chartBaseV2Interface } from '@/api/modules/chartApi';
+import { getComputedTypes } from '../databaseComponents/util';
 import setSharedDia from './setSharedDia.vue';
 import setPublicDia from './setPublicDia.vue';
 import batchSetPublicDia from './batchSetPublicDia.vue';
@@ -197,7 +214,7 @@ export default {
         type: String,
         default: 'edb'
       },
-      type: { //设置共享shared 设置公开public
+      type: { //设置类型 设置共享shared 设置公开public
 			  type: Number
 		  },
     },
@@ -247,9 +264,15 @@ export default {
           },
           {
             label: '共享用户',
-            key: 'Shareduser',
+            key: 'SharedUserName',
+            minwidthsty: '180px',
+            show: this.type==='shared'
+          },
+          {
+            label: '公开状态',
+            key: 'PublicStatus',
             minwidthsty: '180px',
-            show: true
+            show: this.type==='public'
           },
         ]
 
@@ -260,40 +283,83 @@ export default {
 
       sourceLabel() {
         return this.source==='edb'?'指标':'图表';
+      },
+
+      cascaderProps() {
+        return {
+            label: 'ClassifyName',
+            value: 'ClassifyId',
+            children: 'Children',
+            multiple: true,
+            emitPath: false,
+            checkStrictly: !this.filterObj.relevanceChild
+        }
+      },
+      
+      Idkey() {
+        return this.source==='edb'?'EdbInfoId':'ChartInfoId';
+      },
+
+      //公开状态
+      publicStatusLabel() {
+        return new Map([
+          [0,''],
+          [1,'未公开'],
+          [2,'已提交'],
+          [3,'已公开'],
+        ])
+      },
+
+      /* 状态下拉 */
+      statusOptions() {
+        const statusMap = new Map([
+          ['shared',[
+            { label: '未共享',value: 1 },
+            { label: '已共享',value: 2 },
+          ]],
+          ['public',[
+            { label: '未公开',value: 1 },
+            { label: '已公开',value: 3 },
+          ]],
+        ])
+
+        return statusMap.get(this.type)||[]
       }
     },
     watch: {
       show(n){
         if(!n) return
         
-        this.getSourceOpts();
         this.getClassifyOpts();
-        this.getList();
+        this.$nextTick(() => {
+          this.getList('init');
+        })
       }
     },
     data() {
       return {
         filterObj: {
-          classify: '',
-          relevanceChild:1,
+          classify: [],
+          relevanceChild:true,
           pageNo: 1,
           pageSize: 10,
           source: [],
           chartTypes: [],
-          sharedStatus:'未共享',
+          listStatus:[1],
           keyWord: '',
           checkAll: false, //控制全选显示状态
           checkSome: false
         },
-        sourceOption: [],
+        sourceOption: getComputedTypes(),
         classifyOption: [],
+        cascaderKey:0,
 
         list: [],
         isSelectAll: false, //真正意义上的全选或不全选
-        checkedList: [], //不全选勾选中的 或 全选取消勾的
+        checkedList: [], //不全选勾选中的 或 全选取消勾的
         selectionReactCancel:false,//手动设置选中中
 
-        chooseSetList:[],
+        checkedParams: {},//选项入参
         /* 设置共享弹窗 */
         isSetSharedDia: false,
         /* 设置公开弹窗 */
@@ -304,54 +370,179 @@ export default {
     },
     
     methods: {
-      async getSourceOpts() {
-        const res = await dataBaseInterface.getDataSource({IsBase:2})
-        if(res.Ret !== 200) return
-
-        this.sourceOption = res.Data.map(_ => ({
-          label: _.SourceName,
-          value: _.EdbSourceId
-        })) || []
-      },
 
-      //个人目录
+      //个人目录 指标/图库
       async getClassifyOpts() {
-        const res = await dataBaseInterface.targetCatalog({
-          IsOnlyMe:true,
-          ParentId:0,
+        const res = await dataBaseInterface.menuListV3({
           ClassifyType:  2
         })
 
         if(res.Ret!==200) return 
 
         this.classifyOption = res.Data.AllNodes || [];
+        this.filterNodes(this.classifyOption)
       },
 
-      async getList() {
-        
+      filterNodes(arr) {
+        arr.length && arr.forEach(item => {
+          item.Children && item.Children.length && this.filterNodes(item.Children)
+          if(!item.Children.length) {
+            delete item.Children
+          }
+        })
       },
 
-      handleFilter() {
+      async getList(type='pageChange') {
+        let apiMap = {
+          'edb': this.getEdbList,
+          'chart': this.getChartList
+        }
+        apiMap[this.source](type)
+      },
+
+      //指标列表
+      async getEdbList(type) {
+        const { 
+          classify,
+          relevanceChild,
+          pageNo,
+          pageSize,
+          source,
+          chartTypes,
+          listStatus,
+          keyWord,
+        } = this.filterObj;
+
+        let checkedClassify = this.$refs.classifyRef.getCheckedNodes();
+        let ClassifyIdList = checkedClassify.length 
+          ? checkedClassify.map(_ => _.data.ClassifyId)
+          : []
+
+        let params = {
+          SourceList:source,
+          Keyword: keyWord,
+          ClassifyIdList,
+          CurrentIndex: pageNo,
+          PageSize: pageSize
+        }
+
+        const res = this.type === 'shared'
+          ? await edbBaseV2Interface.getSharedSearchList({
+              EdbShareList: listStatus,
+              ...params
+            })
+          : await edbBaseV2Interface.getPublicSearchList({
+              EdbPublicList: listStatus,
+              ...params
+          })
+
+        if(res.Ret !== 200) return
+        this.list = res.Data.List||[];
+        this.total = res.Data.Paging.Totals;
+
+        if(type==='filter'){
+          this.listCheckAllChange(true)
+        }else {
+          //页码变化 选中项不做清空
+          this.checkedSomeSelection()
+        }
+
+      },
+
+      //图表列表
+      async getChartList() {
+
+      },
+
+      handleFilter(val) {
         this.filterObj.pageNo = 1;
-        this.getList()
+        if(!val||!val.length) {
+          this.isSelectAll = false;
+          this.checkedList = [];
+          this.filterObj.checkAll = false;
+          this.filterObj.checkSome = false;
+        }
+        this.getList(val.length?'filter':'');
       },
+
       //设置共享
       handleSetShare(item=null) {
+        if(item) {
+          this.checkedParams = {
+            EdbInfoId: item.EdbInfoId
+          }
+        }else {
+          if(!this.checkedList.length && !this.isSelectAll) return this.$message.warning('请选择指标')
+
+          const {
+            source,
+            listStatus,
+            keyWord,
+          } = this.filterObj;
+
+          let checkedClassify = this.$refs.classifyRef.getCheckedNodes();
+          let ClassifyIdList = checkedClassify.length 
+            ? checkedClassify.map(_ => _.data.ClassifyId)
+            : []
+
+          this.checkedParams = {
+            EdbShareList: listStatus,
+            SourceList:source,
+            Keyword: keyWord,
+            ClassifyIdList,
+            IsSelectAll: this.isSelectAll,
+            NoEdbIdList: this.isSelectAll ? this.checkedList.map(_ =>_.EdbInfoId) : [],
+            EdbIdList: this.isSelectAll ? [] : this.checkedList.map(_ =>_.EdbInfoId)
+          }
+        }
         this.isSetSharedDia = true;
       },
 
       //设置公开
       handleSetPublic(item=null,type="single") {
         if(type==='single') {
+          this.checkedParams = {
+            EdbInfoId: item.EdbInfoId
+          }
           this.isSetPublicDia = true;
         }else { //批量
+          if(!this.checkedList.length && !this.isSelectAll) return this.$message.warning('请选择指标')
+
+          const {
+            source,
+            listStatus,
+            keyWord,
+          } = this.filterObj;
+
+          let checkedClassify = this.$refs.classifyRef.getCheckedNodes();
+          let ClassifyIdList = checkedClassify.length 
+            ? checkedClassify.map(_ => _.data.ClassifyId)
+            : []
+
+          this.checkedParams = {
+            EdbPublicList: listStatus,
+            SourceList:source,
+            Keyword: keyWord,
+            ClassifyIdList,
+            IsSelectAll: this.isSelectAll,
+            NoEdbIdList: this.isSelectAll ? this.checkedList.map(_ =>_.EdbInfoId) : [],
+            EdbIdList: this.isSelectAll ? [] : this.checkedList.map(_ =>_.EdbInfoId)
+          }
           this.isBatchSetPublicDia = true;
         }
       },
 
+      /* 撤销公开 */
+      async handleCancelPublic(item) {
+        // const res = this.source === 'edb'
+      },
+
       handleSetConfirm() {
-        this.handleClose();
-        this.$emit('change')
+        this.isSelectAll = false;
+        this.checkedList = [];
+        this.filterObj.checkAll = false;
+        this.filterObj.checkSome = false;
+        this.getList();
       },
 
       /* 设置当页数据勾选状态 */
@@ -360,7 +551,7 @@ export default {
 
         if(!this.isSelectAll){
             this.checkedList.map(_ =>{
-                let row = this.list.find(item => item.IndexCode==_.IndexCode)
+                let row = this.list.find(item => item[this.Idkey]==_[this.Idkey])
                 if(row){ //设置部分选中
                     setTimeout(()=>{
                         this.$refs.table.toggleRowSelection(row,true)
@@ -370,7 +561,7 @@ export default {
         }else{
             this.$refs.table &&this.$refs.table.toggleAllSelection()
             this.checkedList.map(_ =>{
-                let row = this.list.find(item => item.IndexCode==_.IndexCode)
+                let row = this.list.find(item => item[this.Idkey]==_[this.Idkey])
                 if(row){ //设置部分不勾选
                     setTimeout(()=>{
                         this.$refs.table.toggleRowSelection(row,false)
@@ -425,13 +616,13 @@ export default {
           if(this.selectionReactCancel) return 
 
           //当前项是选中还是取消选
-          let haveChecked = selection.some(_ => _[Idkey] === row[Idkey]);
+          let haveChecked = selection.some(_ => _[this.Idkey] === row[this.Idkey]);
 
           //全选取消选和不全选选中才有意义
           if((haveChecked&&!this.isSelectAll) || (!haveChecked&&this.isSelectAll)) {
             this.checkedList.push(row)
           }else {
-            this.checkedList=this.checkedList.filter(_ => _[Idkey]!==row[Idkey])
+            this.checkedList=this.checkedList.filter(_ => _[this.Idkey]!==row[this.Idkey])
           }
       },
 
@@ -447,18 +638,34 @@ export default {
             this.checkedList = [...this.checkedList,...this.list]
           }else {
 
-            let pageIds = this.list.map(_ => _[Idkey]);
-            this.checkedList = this.checkedList.filter(_ => !pageIds.includes(_[Idkey]))
+            let pageIds = this.list.map(_ => _[this.Idkey]);
+            this.checkedList = this.checkedList.filter(_ => !pageIds.includes(_[this.Idkey]))
           }
       },
 
       // 页码改变
       pageChange(page) {
-        this.filterObj.page_no = page;
-        this.getlist('pageChange')
+        this.filterObj.pageNo = page;
+        this.getList('pageChange')
       },
 
       handleClose() {
+        this.filterObj = {
+          classify: [],
+          relevanceChild:true,
+          pageNo: 1,
+          pageSize: 10,
+          source: [],
+          chartTypes: [],
+          listStatus:[1],
+          keyWord: '',
+          checkAll: false, //控制全选显示状态
+          checkSome: false
+        }
+        this.list = [];
+        this.isSelectAll = false;
+        this.checkedList = [];
+        this.selectionReactCancel =false;
         this.$emit('update:show',false)
       }
     },

+ 21 - 11
src/views/dataEntry_manage/sharedComponents/sharedMenu.vue

@@ -5,12 +5,15 @@
       <div class="shared-tree">
         <el-tree
           ref="sharedTree"
-          class="catalog-tree target_tree"
+          :class="['catalog-tree',{'target_tree': source==='chart'}]"
           empty-text="暂无数据"
           :data="sharedClassifys"
+          :props="{
+            children: 'Children'
+          }"
           node-key="UniqueCode"
           :expand-on-click-node="false"
-          @current-change="(data,node)=>{$parent.nodeChange(data,node)}"
+          @current-change="(data,node)=>{$parent.nodeChange({data,node,treeName:'shared'})}"
         >
             <div class="custom-tree-node" slot-scope="{ data }">
                 <span class="tree-label">{{ data.ClassifyName }}</span>
@@ -24,12 +27,15 @@
       <div class="shared-tree">
         <el-tree
           ref="receiveTree"
-          class="catalog-tree target_tree"
+          :class="['catalog-tree',{'target_tree': source==='chart'}]"
           empty-text="暂无数据"
           :data="receiveSharedClassifys"
+          :props="{
+            children: 'Children'
+          }"
           node-key="UniqueCode"
           :expand-on-click-node="false"
-          @current-change="(data,node)=>{$parent.nodeChange(data,node)}"
+          @current-change="(data,node)=>{$parent.nodeChange({data,node,treeName:'sharedReceive'})}"
         >
             <div class="custom-tree-node" slot-scope="{ data }">
                 <span class="tree-label">{{ data.ClassifyName }}</span>
@@ -41,6 +47,7 @@
 </template>
 <script>
 import { dataBaseInterface } from '@/api/api.js';
+import { edbBaseV2Interface } from '@/api/modules/chartApi';
 export default {
   props: {
     source: { //指标或图库
@@ -59,14 +66,17 @@ export default {
   },
   methods:{
     async getSharedClassify() {
-        const res = await dataBaseInterface.targetCatalog({
-				IsOnlyMe:this.IsOnlyMe,
-				ParentId:0,
-				ClassifyType:  2
-			})
+      const res = this.source === 'edb'
+        ? await edbBaseV2Interface.getSharedClassify()
+        : await dataBaseInterface.targetCatalog({
+            IsOnlyMe:this.IsOnlyMe,
+            ParentId:0,
+            ClassifyType:  2
+          })
+      if(res.Ret !== 200) return
 
-      this.sharedClassifys = res.Data.AllNodes || [];
-      this.receiveSharedClassifys = res.Data.AllNodes || [];
+      this.sharedClassifys = res.Data.Send || [];
+      this.receiveSharedClassifys = res.Data.Received || [];
     }
   },
 }

+ 2 - 1
src/views/sandbox_manage/sandFlowNew/components/addLInkDia.vue

@@ -370,7 +370,8 @@ import * as preDictEdbInterface from '@/api/modules/predictEdbApi.js';
         if(this.addLinkSearchParams.linkType==1){
           sheetInterface.searchTarget({
             KeyWord:query,
-            CurrentIndex: page
+            CurrentIndex: page,
+            EdbType: '1,2,3'
           }).then(res => {
             if(res.Ret !== 200) return
             const { List,Paging } = res.Data;