Quellcode durchsuchen

Merge branch 'gn2.3' into debug

shanbinzhang vor 1 Woche
Ursprung
Commit
0f0232cd74
45 geänderte Dateien mit 5437 neuen und 1498 gelöschten Zeilen
  1. 97 0
      src/api/modules/approve.js
  2. 534 1
      src/api/modules/chartApi.js
  3. 2 1
      src/api/modules/sheetApi.js
  4. 2 1
      src/api/modules/toolBoxApi.js
  5. BIN
      src/assets/img/set_m/add_ico.png
  6. BIN
      src/assets/img/set_m/move_batch_ico.png
  7. BIN
      src/assets/img/set_m/public_ico.png
  8. BIN
      src/assets/img/set_m/shared_ico.png
  9. 128 0
      src/components/edb/edbSelectSearch.vue
  10. 50 25
      src/components/notificationMsg.vue
  11. 4 0
      src/styles/element-ui.scss
  12. 30 0
      src/utils/buttonConfig.js
  13. 4 0
      src/utils/registryComponents.js
  14. 107 64
      src/views/approve_manage/approveDetail.vue
  15. 108 74
      src/views/approve_manage/approveList.vue
  16. 305 54
      src/views/approve_manage/approveSetting.vue
  17. 177 0
      src/views/approve_manage/components/EdbChartApproveWrapper.vue
  18. 15 0
      src/views/approve_manage/mixins/approveMixins.js
  19. 3 3
      src/views/chartRelevance_manage/crossVarietyAnalysis/list.vue
  20. 3 3
      src/views/chartRelevance_manage/fittingEquation/fittingEquationList.vue
  21. 3 3
      src/views/chartRelevance_manage/relevance/list.vue
  22. 3 3
      src/views/chartRelevance_manage/statistic/statisticFeatureList.vue
  23. 7 0
      src/views/dataEntry_manage/addChart.vue
  24. 607 715
      src/views/dataEntry_manage/chartSetting.vue
  25. 1 0
      src/views/dataEntry_manage/components/addMarkerDialog.vue
  26. 617 0
      src/views/dataEntry_manage/components/batchMoveDialog.vue
  27. 71 53
      src/views/dataEntry_manage/components/chartDialog.vue
  28. 8 8
      src/views/dataEntry_manage/css/chartfit.scss
  29. 27 10
      src/views/dataEntry_manage/databaseComponents/addCollectClassifyDia.vue
  30. 66 54
      src/views/dataEntry_manage/databaseComponents/chartTrendRender.vue
  31. 46 20
      src/views/dataEntry_manage/databaseComponents/collectEdbMenu.vue
  32. 35 22
      src/views/dataEntry_manage/databaseComponents/edbCollectDia.vue
  33. 315 0
      src/views/dataEntry_manage/databaseComponents/edbTableList.vue
  34. 50 18
      src/views/dataEntry_manage/databaseComponents/openDialog.vue
  35. 379 353
      src/views/dataEntry_manage/databaseList.vue
  36. 241 0
      src/views/dataEntry_manage/sharedComponents/batchSetPublicDia.vue
  37. 185 0
      src/views/dataEntry_manage/sharedComponents/setPublicDia.vue
  38. 289 0
      src/views/dataEntry_manage/sharedComponents/setSharedDia.vue
  39. 799 0
      src/views/dataEntry_manage/sharedComponents/setSharedListDialog.vue
  40. 100 0
      src/views/dataEntry_manage/sharedComponents/sharedMenu.vue
  41. 6 1
      src/views/datasheet_manage/sheetList.vue
  42. 3 3
      src/views/intervalAnalysis/list.vue
  43. 3 3
      src/views/predictEdb_manage/predictEdb.vue
  44. 2 1
      src/views/sandbox_manage/sandFlowNew/components/addLInkDia.vue
  45. 5 5
      src/views/system_manage/dataOperaAuth.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)
+    },
 }

+ 534 - 1
src/api/modules/chartApi.js

@@ -1470,9 +1470,542 @@ const edbCollectInterface = {
 		},
 }
 
+
+/* 指标库拆分我的 共享 公共后新接口 */
+const edbBaseV2Interface = {
+	/**
+	 * 共享 收到共享分类树
+	 * @param {*} params 
+	 * ClassifyType
+	 * @returns 
+	 */
+	getSharedClassify: params => {
+		return http.get('/datamanage/edb_info/share/tree',params)
+	},
+
+	/**
+	 * 分享指标列表
+	 * @param {*} params ClassifyId 
+	 * FilterSource 0:我共享的;1:别人共享给我的
+	 * @returns 
+	 */
+	getSharedEdbList: params => {
+		return http.get('/datamanage/edb_info/share/list',params)
+	},
+
+	/**
+	 * 设置共享弹窗列表
+	 * @param {*} params 
+	 *  "EdbShareList": [],
+			"SourceList":[37,62],
+			"Keyword": "拟合残差",
+			"ClassifyIdList":[2386,1389],
+			"CurrentIndex": 1,
+	 * @returns 
+	 */
+	getSharedSearchList: params => {
+		return http.post('/datamanage/edb_info/share/list/es',params)
+	},
+	
+	/**
+	 * 设置单指标共享
+	 * @param {*} params 
+	 * EdbInfoId  UserIdList  ShareType1:仅查看;2:可编辑
+	 * @returns 
+	 */
+	setEdbSharedSingle: params => {
+		return http.post('/datamanage/edb_info/share/save',params)
+	},
+
+	/**
+	 * 批量设置共享
+	 * @param {*} params 
+	 * "EdbShareList": [],
+    "SourceList":[37,62],
+    "Keyword": "拟合残差",
+    "ClassifyIdList":[2386,1389],
+    "IsSelectAll": true,
+    "NoEdbIdList": [],
+    "UserIdList": [],
+    "ShareType": 2
+	 * @returns 
+	 */
+	setEdbSharedBatch: params => {
+		return http.post('/datamanage/edb_info/share/batch_save',params)
+	},
+
+	/**
+	 * 指标共享用户
+	 * @param {*} params 
+	 * EdbInfoId
+	 * @returns 
+	 */
+	getEdbSharedUser: params => {
+		return http.get('/datamanage/edb_info/share/user_list',params)
+	},
+
+	/**
+	 * 公共指标分类树
+	 * @param {*} params 
+	 * @returns 
+	 */
+	getPublicClassifyBase: params => {
+		return http.get('/datamanage/edb_public/classify/tree',params)
+	},
+
+	/**
+	 * 公共指标分类树展开
+	 * @param {*} params  ParentId
+	 * @returns 
+	 */
+	getPublicClassifyExpand: params => {
+		return http.get('/datamanage/edb_public/classify/simple',params)
+	},
+	
+	/**
+	 * 新增公开分类
+	 * @param {*} params 
+	 * "ClassifyName": "国内宏观",
+		"ParentId": 4,
+		"Level": 1
+	 * @returns 
+	 */
+	addPublicedClassify: params => {
+		return http.post('/datamanage/edb_public/classify/add',params)
+	},
+
+	/**
+	 * 编辑公开分类
+	 * @param {*} params 
+	 * @returns 
+	 */
+	editPublicedClassify: params => {
+		return http.post('/datamanage/edb_public/classify/edit',params)
+	},
+
+	/**
+	 * 删除公开分类校验
+	 * @param {*} params ClassifyId
+	 * @returns 
+	 */
+	delPublicedClassifyCheck: params => {
+		return http.post('/datamanage/edb_public/classify/delete/check',params)
+	},
+
+	/**
+	 * 删除公开分类
+	 * @param {*} params 
+	 * @returns 
+	 */
+	delPublicedClassify: params => {
+		return http.post('/datamanage/edb_public/classify/delete',params)
+	},
+
+	/**
+	 * 设置公开指标列表
+	 * @param {*} params 
+	 * "EdbPublicList": [],
+    "SourceList":[37,62],
+     "Keyword": "拟合残差",
+    "ClassifyIdList":[2386,1389],
+    "CurrentIndex": 1,
+    "PageSize": 20
+	 * @returns 
+	 */
+	getPublicSearchList: params => {
+		return http.post('/datamanage/edb_info/public/list/es',params)
+	},
+
+	/**
+	 * 已选择的公开指标列表
+	 * @param {*} params 
+	 * "EdbPublicList": [],
+    "SourceList":[37,62],
+     "Keyword": "拟合残差",
+    "ClassifyIdList":[2386,1389],
+	 * @returns 
+	 */
+	getPublicSearchListAll: params => {
+		return http.post('/datamanage/edb_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 
+	 * "EdbInfoList": [
+        {
+            "EdbInfoId": 102174,
+            "ClassifyId": 5
+        }
+    	],
+    "Description": "测试审批"
+	 * @returns 
+	 */
+	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 ChartClassifyId
+	 * @returns 
+	 */
+	delPublicedClassifyCheck: params => {
+		return http.post('/datamanage/chart_public/classify/delete/check',params)
+	},
+
+	/**
+	 * 删除公开分类
+	 * @param {*} params ChartClassifyId
+	 * @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/batch_move',params)
+	},
+
+	/**
+	 * 批量移动我的
+	 * @param {*} params 
+	 * @returns 
+	 */
+	moveOwnBatch: params => {
+		return http.post('/datamanage/chart_info/batch_move',params)
+	},
+
+
+	/* ====收藏==== */
+
+	/**
+	 * 获取收藏分类
+	 * @param {*} params  ParentId
+	 * @returns 
+	 */
+	getChartCollectClassify: params => {
+		return http.get('/datamanage/chart_collect/classify/list',params)
+	},
+
+	/**
+	 * 获取一级收藏分类
+	 * @param {*} params  ParentId
+	 * @returns 
+	 */
+	getChartCollectClassifyOne: params => {
+		return http.get('/datamanage/chart_collect/classify/tree',params)
+	},
+
+	/**
+	 * 新增收藏分类
+	 * @param {*} params  ClassifyName ParentId Level
+	 * @returns 
+	 */
+	addCollectClassify: params => {
+		return http.post('/datamanage/chart_collect/classify/add',params)
+	},
+
+	/**
+	 * 编辑收藏分类
+	 * @param {*} params  ClassifyName ClassifyId
+	 * @returns 
+	 */
+	editCollectClassify: params => {
+		return http.post('/datamanage/chart_collect/classify/edit',params)
+	},
+
+	/**
+	 * 删除收藏分类
+	 * @param {*} params ClassifyId
+	 * @returns 
+	 */
+	delCollectClassify: params => {
+		return http.post('/datamanage/chart_collect/classify/remove',params)
+	},
+
+	/**
+	 * 移动收藏
+	 * @param {*} params ClassifyId
+	 * ChartInfoId NextChartInfoId  PrevChartInfoId
+	 * @returns 
+	 */
+	moveCollectChart: params => {
+		return http.post('/datamanage/chart_collect/move',params)
+	},
+
+	/**
+	 * 移动收藏分类
+	 * @param {*} params ClassifyId
+	 * PrevClassifyId NextClassifyId
+	 * @returns 
+	 */
+	moveCollectClassify: params => {
+		return http.post('/datamanage/chart_collect/classify/move',params)
+	},
+
+	/**
+	 * 收藏图表
+	 * @param {*} params ClassifyIdList ChartInfoId
+	 * @returns 
+	 */
+	chartCollect: params => {
+		return http.post('/datamanage/chart_collect/collect',params)
+	},
+	
+	/**
+	 * 取消收藏
+	 * @param {*} params ClassifyId ChartInfoId
+	 * @returns 
+	 */
+	chartCollectCancel: params => {
+		return http.post('/datamanage/chart_collect/cancel_collect',params)
+	},
+
+	/**
+	 * 收藏列表
+	 * @param {*} params PageSize CurrentIndex ClassifyId Keyword
+	 * @returns 
+	 */
+	getCollectChart: params => {
+		return http.get('/datamanage/chart_collect/list',params)
+	},
+}
+
 export {
 	dataBaseInterface,
 	mychartInterface,
 	chartFrameInterface,
-	edbCollectInterface
+	edbCollectInterface,
+	edbBaseV2Interface,
+	chartBaseV2Interface
 }

+ 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)
     }
 }
 

BIN
src/assets/img/set_m/add_ico.png


BIN
src/assets/img/set_m/move_batch_ico.png


BIN
src/assets/img/set_m/public_ico.png


BIN
src/assets/img/set_m/shared_ico.png


+ 128 - 0
src/components/edb/edbSelectSearch.vue

@@ -0,0 +1,128 @@
+<template>
+  <!-- 不包含预测指标 -->
+  <!-- 调用指标搜索的下拉样式,暂时还不统一;各处交互不一样;先把一样的地方公用下吧 -->
+  <el-select
+    v-model="search_txt"
+    v-loadMore="searchLoad"
+    ref="searchRef"
+    :filterable="!search_txt"
+    remote
+    clearable
+    :placeholder="$t('Edb.InputHolderAll.input_name_orid')"
+    :style="style"
+    :remote-method="searchHandle"
+    @click.native="inputFocusHandle"
+    @change="handleSelectTarget"
+    class="edbSelectSearch-select"
+  >
+    <i slot="prefix" class="el-input__icon el-icon-search"></i>
+    <div class="fixed-top">
+      <el-radio-group v-model="searchType" size="mini" @input="searchApi(current_search)">
+        <el-radio-button label="0">全部</el-radio-button>
+        <el-radio-button label="1">收藏</el-radio-button>
+      </el-radio-group>
+    </div>
+    <el-option
+      v-for="item in searchOptions"
+      :key="item.EdbInfoId"
+      :label="
+        $i18nt.locale === 'en' ? item.EdbNameEn || item.EdbName : item.EdbName
+      "
+      :value="item.EdbInfoId"
+      :disabled="!item.HaveOperaAuth"
+    >
+      <edbDetailPopover :info="item">
+        <div slot="reference">
+          <img
+            :src="$icons.lock_ico2"
+            width="18"
+            height="18"
+            style="vertical-align: middle"
+            v-if="!item.HaveOperaAuth"
+          />
+          {{
+            $i18nt.locale === "en"
+              ? item.EdbNameEn || item.EdbName
+              : item.EdbName
+          }}
+        </div>
+      </edbDetailPopover>
+    </el-option>
+  </el-select>
+</template>
+<script>
+import { dataBaseInterface } from '@/api/api.js';
+export default {
+  props: {
+    style: {
+      type: String,
+      default:''
+    }
+  },
+  data() {
+    return {
+      searchType: 0,
+      search_txt: '',
+      searchOptions: [],
+      search_have_more: true,
+      search_page: 1,
+      current_search: '',
+    }
+  },
+  mounted(){
+
+  },
+  methods:{
+
+    // 指标选择
+    handleSelectTarget(e){
+        let edb=this.searchOptions.find(_item=>_item.EdbInfoId==e);
+        this.$emit('change',edb);
+    },
+
+    /* 搜索 */
+		searchHandle(query) {
+			this.search_page = 1;
+			this.current_search = query;
+			this.searchApi(this.current_search)
+		},
+
+		searchApi(query,page=1) {
+
+			dataBaseInterface.targetSearchByPage({
+				KeyWord:query,
+				CurrentIndex: page,
+        EdbCollect: this.searchType
+			}).then(res => {
+				if(res.Ret !== 200) return
+
+				const { List,Paging } = res.Data;
+				this.search_have_more = page < Paging.Pages;
+				this.searchOptions = page === 1 ? List : this.searchOptions.concat(List);
+					
+			})
+		},
+
+		/* 聚焦获取当前检索 */
+		inputFocusHandle(e) {
+			this.search_page = 1;
+			this.current_search = e.target.value;
+			this.searchApi(this.current_search);
+		},
+
+		searchLoad() {
+			if(!this.search_have_more) return;
+			this.searchApi(this.current_search,++this.search_page);
+		},
+  },
+}
+</script>
+<style scoped lang='scss'>
+.fixed-top {
+  position: sticky;
+  top: 0;
+  background: #fff;
+  padding: 10px 20px;
+  z-index: 9;
+}
+</style>

+ 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;

+ 4 - 0
src/styles/element-ui.scss

@@ -74,3 +74,7 @@ $--font-path: '~element-ui/lib/theme-chalk/fonts';
     color: $--color-success;
   }
 }
+
+.el-dialog .el-pagination__editor.el-input {
+  width: 50px;
+}

+ 30 - 0
src/utils/buttonConfig.js

@@ -375,6 +375,16 @@ export const edbDataPermission = {
     edbData_edbCollectClassify_save:'edbData:edbCollectClassify:save',//收藏分类编辑
     edbData_edbCollectClassify_remove:'edbData:edbCollectClassify:remove',//收藏分类删除
     edbData_edbCollectClassify_move:'edbData:edbCollectClassify:move',//收藏分类移动
+
+
+    /* 指标加工 批量移动 设置共享 设置公开 公开指标目录 */
+    edbData_set_shared: 'edbData:set:shared', //设置共享
+    edbData_set_public: 'edbData:set:public', //设置公开
+    edbData_batch_move: 'edbData:batch:move', //个人批量移动
+    edbData_publicClassifyOpt_add: 'edbData:publicClassifyOpt:add', //公开目录新建编辑分类
+    // edbData_publicClassifyOpt_edit: 'edbData:publicClassifyOpt:edit',//公开目录编辑分类
+    edbData_publicClassifyOpt_del: 'edbData:publicClassifyOpt:del',//公开目录删除分类
+    edbData_publicClassifyOpt_batch_move: 'edbData:publicClassifyOpt:batch:move',//公开目录批量移动
 }
 /*
  * ---------------------------------------------------------------------------ETA预测指标------------------------------------------------
@@ -434,6 +444,15 @@ export const chartLibPermission = {
     chartLib_updateToForum:'chartLib:updateToForum',//同步至社区
     chartLib_withdrawfromForum:'chartLib:withdrawfromForum',//从社区撤回
     chartLib_sourceEdit:'chartLib:sourceEdit',//编辑数据来源
+
+    /* 图表 批量移动 设置共享 设置公开 公开目录 */
+    chartLib_set_shared: 'chartLib:set:shared', //设置共享
+    chartLib_set_public: 'chartLib:set:public', //设置公开
+    chartLib_batch_move: 'chartLib:batch:move', //个人批量移动
+    chartLib_publicClassifyOpt_add: 'chartLib:publicClassifyOpt:add', //公开目录新建编辑
+    // chartLib_publicClassifyOpt_edit: 'chartLib:publicClassifyOpt:edit',//公开目录编辑
+    chartLib_publicClassifyOpt_del: 'chartLib:publicClassifyOpt:del',//公开目录删除
+    chartLib_publicClassifyOpt_batch_move: 'chartLib:publicClassifyOpt:batch:move',//公开目录批量移动
 }
 
 /*
@@ -865,6 +884,11 @@ export const approveFlowPermission = {
     reportApprove_remove:'reportApprove:remove',//删除
     reportApprove_edit:'reportApprove:edit',//编辑审批流(按钮)
     reportApprove_add:'reportApprove:add',//添加审批流
+
+    /* 指标审批流 */
+    edbApproveFlow_edit:"edbApproveFlow:edit",
+    /* 图表审批流 */
+    chartApproveFlow_edit:"chartApproveFlow:edit",
 }
 /*
  * --------------------------------------------------------------------------审批管理------------------------------------------------
@@ -879,6 +903,12 @@ export const approvePermission = {
     reportApprove_repeal:'reportApprove:repeal',//撤回(列表中的按钮,审批详情-撤回按钮)
     reportApprove_download_pdf:'reportApprove:download:pdf',//下载PDF
     reportApprove_download_img:'reportApprove:download:img',//下载长图
+
+
+    /* 指标审批 */
+    edbApprove_edit: 'edbApprove:edit',
+    /* 图表审批 */
+    chartApprove_edit: 'chartApprove:edit',
 }
 
 /* 图表主题配置 */

+ 4 - 0
src/utils/registryComponents.js

@@ -54,3 +54,7 @@ Vue.component('chartTypeSelect',chartTypeSelect)
 // 级联选择器多语言展示
 import cascader from '@/components/edb/cascader.vue';
 Vue.component('cascader',cascader)
+
+//调用指标的搜索交互统一(选择收藏和全部)  不含预测指标
+import edbSelectSearch from '@/components/edb/edbSelectSearch.vue';
+Vue.component('edbSelectSearch',edbSelectSearch)

+ 107 - 64
src/views/approve_manage/approveDetail.vue

@@ -1,55 +1,69 @@
 <template>
     <!-- 审批详情:查看、进行审批操作 -->
     <div class="approve-detail-wrap" v-if="isETAApprove || IsBIApprove">
-        <div class="approve-detail">
-            <div class="approve-info">
-                <span>{{ mainType == 'report'?$t('AprrovalDetailPage.report_name_info'):$t('AprrovalPage.kanban_name')}}:{{reportInfo.title||''}}</span>
-                <span v-if="mainType == 'report'" style="margin-left: 60px;">{{$t('AprrovalDetailPage.classification_info')}}:{{reportInfo.classify||''}}</span>
-                <span style="min-width: 100px;margin-left: 60px;">{{$t('AprrovalPage.submitter_lable')}}:{{reportInfo.approver||''}}</span>
-            </div>
-            <div v-if="mainType == 'report'" class="approve-content" 
-                v-loading="isLoading"
-                element-loading-text="研报加载中...">
-                <component v-if="reportInfo.reportId&&!isError"
-                    :is="reportInfo.componentName"
-                    :reportId="reportInfo.reportId"
-                    :isPreview="true"
-                    :isEn="reportInfo.type===2"
-                    @reportStartLoading="isLoading=true"
-                    @reportEndLoading="isLoading=false"
-                    @reportError="isError=true"
-                ></component>
-                <tableNoData v-if="isError" text="无法获取到报告内容,该报告可能已被删除!"></tableNoData>
-            </div>
-            <div v-else class="approve-content" 
-                v-loading="isLoading"
-                element-loading-text="看板加载中...">
-                <BIBoardContent ref="boardContent" :knowList.sync="knowledgeList" :value="boardDataList" renderHeight="calc(100vh - 200px)" />
-            </div>
-        </div>
-        <div class="approve-tool">
-            <div class="tool-btn">
-                <!-- 根据审批的状态决定显示 -->
-                <el-button type="danger" @click="changeApprove('reject')"
-                    v-if="formType==='approve'&&approveInfo.isCurrentApprover&&permissionBtn.isShowBtn('approvePermission','reportApprove_reject')">{{$t('AprrovalDetailPage.rejected_btn')}}</el-button>
-                <el-button type="primary" @click="changeApprove('pass')"
-                    v-if="formType==='approve'&&approveInfo.isCurrentApprover&&permissionBtn.isShowBtn('approvePermission','reportApprove_agree')">{{$t('AprrovalDetailPage.agree_btn')}}</el-button>
-                <el-button type="primary" @click="changeApprove('return')"
-                    v-if="formType==='myself'&&approveInfo.state!==4&&permissionBtn.isShowBtn('approvePermission','reportApprove_repeal')">{{$t('AprrovalDetailPage.cancel_btn')}}</el-button>
-                <el-button type="primary" plain @click="$router.replace(`/approveList?formType=${formType}&mainType=${mainType}`)">{{$t('AprrovalDetailPage.back_btn')}}</el-button>
+
+        <!-- bi审批 -->
+        <template v-if="mainType==='bi'">
+            <div class="approve-detail">
+                <div class="approve-info">
+                    <span>{{ mainType == 'report'?$t('AprrovalDetailPage.report_name_info'):$t('AprrovalPage.kanban_name')}}:{{reportInfo.title||''}}</span>
+                    <span v-if="mainType == 'report'" style="margin-left: 60px;">{{$t('AprrovalDetailPage.classification_info')}}:{{reportInfo.classify||''}}</span>
+                    <span style="min-width: 100px;margin-left: 60px;">{{$t('AprrovalPage.submitter_lable')}}:{{reportInfo.approver||''}}</span>
+                </div>
+                <div v-if="mainType == 'report'" class="approve-content" 
+                    v-loading="isLoading"
+                    element-loading-text="研报加载中...">
+                    <component v-if="reportInfo.reportId&&!isError"
+                        :is="reportInfo.componentName"
+                        :reportId="reportInfo.reportId"
+                        :isPreview="true"
+                        :isEn="reportInfo.type===2"
+                        @reportStartLoading="isLoading=true"
+                        @reportEndLoading="isLoading=false"
+                        @reportError="isError=true"
+                    ></component>
+                    <tableNoData v-if="isError" text="无法获取到报告内容,该报告可能已被删除!"></tableNoData>
+                </div>
+                <div v-else class="approve-content" 
+                    v-loading="isLoading"
+                    element-loading-text="看板加载中...">
+                    <BIBoardContent :value="boardDataList" renderHeight="calc(100vh - 250px)" />
+                </div>
             </div>
-            <div class="approve-timeline-wrap">
-                <p>{{$t('AprrovalDetailPage.approval_process')}}</p>
-                <div class="timeline">
-                    <TimeLine 
-                        :TimeLineData="TimeLineData"
-                    />
+            <div class="approve-tool">
+                <div class="tool-btn">
+                    <!-- 根据审批的状态决定显示 -->
+                    <el-button type="danger" @click="changeApprove('reject')"
+                        v-if="formType==='approve'&&approveInfo.isCurrentApprover&&permissionBtn.isShowBtn('approvePermission','reportApprove_reject')">{{$t('AprrovalDetailPage.rejected_btn')}}</el-button>
+                    <el-button type="primary" @click="changeApprove('pass')"
+                        v-if="formType==='approve'&&approveInfo.isCurrentApprover&&permissionBtn.isShowBtn('approvePermission','reportApprove_agree')">{{$t('AprrovalDetailPage.agree_btn')}}</el-button>
+                    <el-button type="primary" @click="changeApprove('return')"
+                        v-if="formType==='myself'&&approveInfo.state!==4&&permissionBtn.isShowBtn('approvePermission','reportApprove_repeal')">{{$t('AprrovalDetailPage.cancel_btn')}}</el-button>
+                    <el-button type="primary" plain @click="$router.replace(`/approveList?formType=${formType}&mainType=${mainType}`)">{{$t('AprrovalDetailPage.back_btn')}}</el-button>
                 </div>
-                <div class="approve-status" >
-                    <img :src="require(`@/assets/img/approve_m/${approveInfo.stateText||'pending'}.png`)" alt="">
+                <div class="approve-timeline-wrap">
+                    <p>{{$t('AprrovalDetailPage.approval_process')}}</p>
+                    <div class="timeline">
+                        <TimeLine 
+                            :TimeLineData="TimeLineData"
+                        />
+                    </div>
+                    <div class="approve-status" >
+                        <img :src="require(`@/assets/img/approve_m/${approveInfo.stateText||'pending'}.png`)" alt="">
+                    </div>
                 </div>
             </div>
-        </div>
+        </template>
+
+        <!-- 指标 图表审批 -->
+        <EdbChartApproveWrapper
+            v-else-if="['edb','chart'].includes(mainType)&&setPublicDetailInfo"
+            :info="setPublicDetailInfo"
+            :mainType="mainType"
+            :formType="formType"
+            :approveInfo="approveInfo"
+        />
+
         <RejectDialog 
             :isDetailDialogShow="isDetailDialogShow"
             :isEdit="true"
@@ -72,6 +86,7 @@ import {departInterence} from '@/api/api.js'
 import reportApproveConfig from "@/mixins/reportApproveConfig.js"
 import apiBiBoard from '@/api/modules/BIBoard.js'
 import BIBoardContent from '@/views/BI_manage/components/BoardContent.vue';
+import EdbChartApproveWrapper from './components/EdbChartApproveWrapper.vue'
 
 const ApproveType = ['','依次审批','会签','或签']
 const ApproveState = ['','待审批','已同意','已驳回']
@@ -101,6 +116,8 @@ export default {
             waterMarkStr:'',//水印
             boardDataList:[],
             knowledgeList:[],//知识资源模块列表的全部数据
+
+            setPublicDetailInfo: null
         };
     },
     computed:{
@@ -324,17 +341,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'));
@@ -353,15 +369,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') )
@@ -383,6 +401,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';
@@ -391,8 +432,10 @@ export default {
           this.getSystemUserInfo();
         }
         if(this.mainType == 'bi') this.getBiApproveDetail();
+        
+        ['edb','chart'].includes(this.mainType) && this.getPublicApproveDetail()
     },
-    components: { TimeLine, ReportDetail, Reportdtl, RejectDialog, BIBoardContent }
+    components: { TimeLine, ReportDetail, Reportdtl, RejectDialog, BIBoardContent,EdbChartApproveWrapper }
 };
 </script>
 

+ 108 - 74
src/views/approve_manage/approveList.vue

@@ -1,11 +1,11 @@
 <template>
     <!-- 审批管理列表页 -->
     <div class="approve-list-wrap approve-page-wrap" v-if="isETAApprove || IsBIApprove">
-        <!-- <div class="head-tab">
+        <div class="head-tab">
             <el-radio-group v-model="activeMainTab" style="margin-bottom: 10px;" @input="handleMainClick">
                 <el-radio-button v-for="item in mainTabs" :key="item.name" :label="item.name">{{ item.label }}</el-radio-button>
             </el-radio-group>
-        </div> -->
+        </div>
         <div class="head-tab">
             <el-tabs v-model="activeTab" @tab-click="handleClick">
                 <el-tab-pane :label="$t('AprrovalPage.be_processed_tab')" name="pending"></el-tab-pane>
@@ -15,7 +15,23 @@
         </div>
         <div class="approve-list">
             <div class="select-box">
-                <el-cascader v-model="classify"
+                <!-- 公开指标图表分类 -->
+                <el-cascader
+                    v-if="['edb','chart'].includes(activeMainTab)"
+                    v-model="classify"
+                    :options="classifyOptions"
+                    clearable
+                    collapse-tags
+                    placeholder="选择分类"
+                    cascaderWidth="width: 240px"
+                    @change="handleCurrentChange(1)"
+                    :props="cascaderProps"
+                />
+                
+                <!-- bi分类 -->
+                <el-cascader 
+                    v-else-if="activeMainTab==='bi'"
+                    v-model="classify"
                     :placeholder="activeMainTab == 'report' ? $t('AprrovalPage.associated_report_ipt') : $t('AprrovalPage.select_associated_Kanban_tip')" clearable
                     :options="activeMainTab == 'report' ? classifyTree : biClassifyTree"
                     :props="activeMainTab == 'report' ? {value:'ClassifyId',label:'ClassifyName',children:'Children'} : {value:'BiDashboardClassifyId',label:'BiDashboardClassifyName',children:'Children'}"
@@ -56,7 +72,7 @@
                 </el-select>
 
                 <el-input v-model="keyword" prefix-icon="el-icon-search" clearable @input="handleCurrentChange(1)"
-                    :placeholder="activeMainTab == 'report'?$t('AprrovalPage.report_title_ipt'):$t('AprrovalPage.enter_Kanban_name_tip')" style="width:260px;margin-left: auto;"></el-input>
+                    :placeholder="searchPhLabel" style="width:260px;margin-left: auto;"></el-input>
             </div>
             <div class="list-box">
                 <el-table 
@@ -161,9 +177,57 @@ const tabMap = {
 }
 export default {
     mixins:[approveMixins,reportApproveConfig],
+    computed:{
+        edbTableColumns() {
+            const columns = [
+                { label: '审批名称',key:'Title',show: true },
+                { label: '提交人',key:'ApplyUserName',show: ['processed','pending'].includes(this.activeTab) },
+                { label: '提交时间',key:'CreateTime',show: true,sortable:true },
+                { label: '审批状态',key:'RecordState',show: this.activeTab==='pending' },
+                { label: '处理时间',key:'HandleTime',show: ['processed','originate'].includes(this.activeTab) },
+                { label: '处理状态',key:'RecordState',show: ['processed','originate'].includes(this.activeTab) },
+            ]
+
+            let resultCols = columns.filter(_ => _.show);
+            return resultCols;
+        },
+
+        searchPhLabel() {
+            const phLabel = {
+                'edb': '指标Id/名称',
+                'chart': '图表名称',
+                'bi': this.$t('AprrovalPage.enter_Kanban_name_tip')
+            }
+            return phLabel[this.activeMainTab] && phLabel[this.activeMainTab];
+        },
+
+        cascaderProps() {
+            let options = this.activeMainTab === 'chart'
+                ? {
+                    label: 'ChartClassifyName',
+                    value: 'ChartClassifyId',
+                    children: 'Children',
+                    multiple:true,
+                    emitPath: false
+                }
+                : {
+                    label: 'ClassifyName',
+                    value: 'ClassifyId',
+                    children: 'Children',
+                    emitPath: false,
+                    multiple:true,
+                }
+
+            return options
+        },
+    },
     data() {
         return {
             mainTabs:[],
+            allAuthTabs: [
+                { label:'指标审批',name:'edb',authCode: 'edbApprove_edit' },
+                { label:'图表审批',name:'chart',authCode: 'chartApprove_edit' },
+            ],
             activeMainTab:'',
             activeTab: 'pending',
             /* 筛选项 */
@@ -178,7 +242,7 @@ export default {
 
             tableLoading:false,
             tableData: [],
-            tableColumns: approve_pending_columns,
+            tableColumns: this.edbTableColumns,
             page: 1,
             pageSize: 10,
             total: 0,
@@ -210,7 +274,7 @@ export default {
 
             return ids
         },
-        getTableData(){
+        async getTableData(){
             this.tableLoading = true
             this.tableData=[]
             const baseParams = {
@@ -219,22 +283,6 @@ export default {
                 CurrentIndex:this.page,
                 Keyword:this.keyword,
             }
-            const selectParams = {
-                //关联报告
-                ReportType:this.classify[0]||0,
-                ClassifyFirstId:this.handleReportClassifyId().ClassifyFirstId||0,
-                ClassifySecondId:this.handleReportClassifyId().ClassifySecondId||0,
-                ClassifyThirdld:this.handleReportClassifyId().ClassifyThirdld||0,
-                //时间
-                TimeType:this.timeType,
-                StartTime:this.timeDate?this.timeDate[0]||'':'',
-                EndTime:this.timeDate?this.timeDate[1]||'':'',
-                //排序
-                SortRule:this.SortRule,
-                SortField:this.SortField,
-                //处理状态
-                ApproveState:this.ApproveState,
-            }
             const biApproveParams = {
                 ClassifyId:this.classify[0] || 0,
                 TimeType:this.timeType,
@@ -244,30 +292,32 @@ export default {
                 SortField:this.SortField,
                 ApproveState:this.ApproveState,
             }
-
-            if(this.activeMainTab == 'report'){
-                approveInterence.getApproveList({
-                    ...baseParams,
-                    ...selectParams
-                }).then(res=>{
-                    this.tableLoading=false
-                    if(res.Ret!==200) return 
-                    const {List=[],Paging={}} = res.Data||{}
-                    this.tableData = List||[]
-                    this.total = Paging.Totals||0
-                }).catch(err=>{this.tableLoading=false})
-            } else {
-                approveInterence.getBiApproveList({
+            let res = null;
+            if(this.activeMainTab === 'bi'){
+                res = await approveInterence.getBiApproveList({
                     ...baseParams,
                     ...biApproveParams,
-                }).then(res=>{
-                    this.tableLoading=false
-                    if(res.Ret!==200) return 
-                    const {List=[],Paging={}} = res.Data||{}
-                    this.tableData = List||[]
-                    this.total = Paging.Totals||0
-                }).catch(err=>{this.tableLoading=false})
+                })
+                  
+            }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
+            if(res.Ret!==200) return 
+            const {List=[],Paging={}} = res.Data||{}
+            this.tableData = List||[]
+            this.total = Paging.Totals||0
             
         },
         handleCurrentChange(page) {
@@ -291,7 +341,7 @@ export default {
           this.classify = '';
           this.keyword = '';
           this.activeTab = 'pending';
-          tabName == 'report' ? this.getClassifyTree() : this.getBIClassifyTree();
+          ['edb','chart'].includes(tabName) ? this.getClassifyOptions() : this.getBIClassifyTree();
           this.handleClick()
         },
         handleClick() {
@@ -300,7 +350,7 @@ export default {
             this.SortRule=0
             this.SortField=0
             this.ApproveState = '';
-            this.tableColumns = columnsMap[`${this.activeTab}_${this.activeMainTab}`];
+            this.tableColumns = ['edb','chart'].includes(this.activeMainTab) ? this.edbTableColumns : columnsMap[`${this.activeTab}_${this.activeMainTab}`];
             this.$refs.reftable&&this.$refs.reftable.clearSort()
             this.handleCurrentChange(1)
         },
@@ -314,13 +364,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') )
@@ -329,23 +381,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){
@@ -356,11 +391,10 @@ export default {
             }
         },
         afterGetBaseConfig(){  //执行完reportApproveConfig中getBaseConfig之后执行  mounted之后执行
-        //    if(this.isETAApprove) 
-        //     this.mainTabs.push({
-        //             label:this.$t('AprrovalPage.research_approval_btn'),
-        //             name:'report' 
-        //     });
+            const {approvePermission,checkPermissionBtn}=this.permissionBtn;
+            this.mainTabs = this.allAuthTabs.filter( _ => checkPermissionBtn(approvePermission[_.authCode]));
+
+
            if(this.IsBIApprove)
            this.mainTabs.push({
                 label:this.$t('SystemManage.BaseConfig.bIDashboard_approval'),
@@ -382,13 +416,13 @@ export default {
                 'myself':'originate'
            }
            this.activeTab = formTypeMap[formType]||'pending'
-           this.tableColumns = columnsMap[`${this.activeTab}_${this.activeMainTab}`] || approve_pending_columns;
-           this.getTableData()
+           this.tableColumns = ['edb','chart'].includes(this.activeMainTab) ? this.edbTableColumns : columnsMap[`${this.activeTab}_${this.activeMainTab}`];
+
+           ['edb','chart'].includes(this.activeMainTab) && this.getClassifyOptions()
+           this.getTableData();
         },
     },
     mounted(){
-        // this.getClassifyTree();
-        this.getBIClassifyTree();
     },
     components: { RejectDialog }
 };

+ 305 - 54
src/views/approve_manage/approveSetting.vue

@@ -1,56 +1,146 @@
 <template>
     <!-- 审批流配置列表 -->
     <div class="approve-setting-wrap approve-page-wrap" v-if="isETAApprove || IsBIApprove">
-        <!-- <div style="margin-bottom: 10px;">
+        <div style="margin-bottom: 10px;">
             <el-radio-group v-model="activeMainTab" style="margin-bottom: 10px;" @input="handleTabClick">
                     <el-radio-button v-for="item in mainTabs" :key="item.name" :label="item.name">{{ item.label }}</el-radio-button>
             </el-radio-group>
-        </div> -->
-        <div class="head-box">
-            <el-input v-model="Keyword" @input="handleCurrentChange(1)"
-                :placeholder="$t('SystemManage.ReportApprove.placeholder02')" prefix-icon="el-icon-search" clearable style="width:360px;"></el-input>
-            <el-cascader v-model="classify"
-                :placeholder="activeMainTab == 'report' ? $t('SystemManage.ReportApprove.placeholder01') : $t('AprrovalPage.select_associated_Kanban_tip')" clearable
-                :options="activeMainTab == 'report' ? classifyTree : biClassifyTree"
-                :props="activeMainTab == 'report' ? {value:'ClassifyId',label:'ClassifyName',children:'Children'} : {value:'BiDashboardClassifyId',label:'BiDashboardClassifyName',children:'Children'}"
-                @change="handleSearchChange"
-                style="margin-right: auto;margin-left: 25px;width: 240px;"></el-cascader>
-            <el-button v-permission="permissionBtn.approveFlowPermission.reportApprove_add"
-                type="primary" @click="handleAddFlow">{{$t('SystemManage.ReportApprove.add_btn')}}</el-button>
-            
         </div>
-        <div class="list-box" v-loading="dataLoading" element-loading-text="数据加载中...">
-            <el-table :data="tableData" @sort-change="sortChange" border ref="reftable">
-                <el-table-column
-                    v-for="item in tableColumns"
-                    :key="item.key"
-                    :label="item.label"
-                    :prop="item.key"
-                    :sortable="item.sortable"
-                    align="center"
-                ></el-table-column>
-                <el-table-column :label="$t('Table.column_operations')" align="center">
-                    <template slot-scope="{row}">
-                        <el-button v-permission="permissionBtn.approveFlowPermission.reportApprove_edit"
-                            type="text" style="padding:0;" @click="handleEditFlow(row)">{{$t('Table.edit_btn')}}</el-button>
-                        <el-button v-permission="permissionBtn.approveFlowPermission.reportApprove_remove"
-                            type="text" style="padding:0;color:red;" @click="handleDeleteFlow(row)">{{$t('Table.delete_btn')}}</el-button>
-                    </template>
-                    
-                </el-table-column>
-            </el-table>
-            <div style="text-align:right;margin-top:20px">
-                <el-pagination 
-                        layout="total,prev,pager,next,jumper" 
-                        background 
-                        :current-page="page"
-                        @current-change="handleCurrentChange"
-                        :page-size="pageSize"
-                        :total="total"
-                        style="display: inline-block"
-                    />
+        
+        <!-- 图表指标审批 -->
+        <template v-if="['edb','chart'].includes(activeMainTab)">
+            <div class="edb-approve-wrapper">
+                 <el-form
+                    :model="approveForm"
+                    inline
+                    label-width="120px"
+                    label-position="left"
+                >
+                    <el-form-item :label="`公开${activeMainTab==='edb'?'指标':'图表'}审批人`" style="width:100%">
+                        <el-cascader
+                            v-model="approveForm.approveUsers"
+                            :options="usersOptions"
+                            :props="{
+                                value: 'NodeIdKey',
+                                label: 'NodeName',
+                                children: 'Children',
+                                emitPath: false,
+                                multiple: true,
+                            }"
+                            ref="approveUserRef"
+                            collapse-tags
+                            :show-all-levels="false"
+                            clearable
+                            filterable
+                            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">
+                            <el-option v-for="item in approveOption" :key="item" :label="item"/>
+                        </el-select>
+                    </el-form-item>
+                    <div style="margin-bottom:20px">以下用户设置公开无需审批</div>
+                    <el-form-item style="padding-left:120px">
+                        <el-cascader
+                            v-model="approveForm.noApproveUsers"
+                            :options="usersOptions"
+                            :props="{
+                                value: 'NodeIdKey',
+                                label: 'NodeName',
+                                children: 'Children',
+                                emitPath: false,
+                                multiple: true,
+                            }"
+                            ref="noApproveUserRef"
+                            collapse-tags
+                            :show-all-levels="false"
+                            clearable
+                            filterable
+                            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">
+                    <el-button type="primary" style="width: 120px" @click="handleApproveSetConfirm">保存</el-button>
+                </div>
             </div>
-        </div>
+        </template>
+
+        <!-- bi审批 -->
+        <template v-else-if="activeMainTab==='bi'">
+            <div class="head-box">
+                <el-input v-model="Keyword" @input="handleCurrentChange(1)"
+                    :placeholder="$t('SystemManage.ReportApprove.placeholder02')" prefix-icon="el-icon-search" clearable style="width:360px;"></el-input>
+                <el-cascader v-model="classify"
+                    :placeholder="activeMainTab == 'report' ? $t('SystemManage.ReportApprove.placeholder01') : $t('AprrovalPage.select_associated_Kanban_tip')" clearable
+                    :options="activeMainTab == 'report' ? classifyTree : biClassifyTree"
+                    :props="activeMainTab == 'report' ? {value:'ClassifyId',label:'ClassifyName',children:'Children'} : {value:'BiDashboardClassifyId',label:'BiDashboardClassifyName',children:'Children'}"
+                    @change="handleSearchChange"
+                    style="margin-right: auto;margin-left: 25px;width: 240px;"></el-cascader>
+                <el-button v-permission="permissionBtn.approveFlowPermission.reportApprove_add"
+                    type="primary" @click="handleAddFlow">{{$t('SystemManage.ReportApprove.add_btn')}}</el-button>
+                
+            </div>
+            <div class="list-box" v-loading="dataLoading" element-loading-text="数据加载中...">
+                <el-table :data="tableData" @sort-change="sortChange" border ref="reftable">
+                    <el-table-column
+                        v-for="item in tableColumns"
+                        :key="item.key"
+                        :label="item.label"
+                        :prop="item.key"
+                        :sortable="item.sortable"
+                        align="center"
+                    ></el-table-column>
+                    <el-table-column :label="$t('Table.column_operations')" align="center">
+                        <template slot-scope="{row}">
+                            <el-button v-permission="permissionBtn.approveFlowPermission.reportApprove_edit"
+                                type="text" style="padding:0;" @click="handleEditFlow(row)">{{$t('Table.edit_btn')}}</el-button>
+                            <el-button v-permission="permissionBtn.approveFlowPermission.reportApprove_remove"
+                                type="text" style="padding:0;color:red;" @click="handleDeleteFlow(row)">{{$t('Table.delete_btn')}}</el-button>
+                        </template>
+                        
+                    </el-table-column>
+                </el-table>
+                <div style="text-align:right;margin-top:20px">
+                    <el-pagination 
+                            layout="total,prev,pager,next,jumper" 
+                            background 
+                            :current-page="page"
+                            @current-change="handleCurrentChange"
+                            :page-size="pageSize"
+                            :total="total"
+                            style="display: inline-block"
+                        />
+                </div>
+            </div>
+        </template>
     </div>
     <div class="approve-page-wrap" v-else>
         <tableNoData :text="pageLoading?'':$t('SystemManage.ReportApprove.tips01')"></tableNoData>
@@ -59,6 +149,8 @@
 
 <script>
 import {approveInterence} from '@/api/modules/approve.js'
+import { traverseTree } from "@/utils/commonOptions"
+import { departInterence } from '@/api/modules/setApi';
 import approveMixins from './mixins/approveMixins';
 import reportApproveConfig from "@/mixins/reportApproveConfig.js"
 export default {
@@ -105,8 +197,22 @@ export default {
             pageSize:10,
             total:0,
             mainTabs:[],
+            allAuthTabs: [
+                { label:'指标审批',name:'edb',authCode: 'edbApproveFlow_edit' },
+                { label:'图表审批',name:'chart',authCode: 'chartApproveFlow_edit' },
+            ],
             activeMainTab:'', //report-研报审批  bi-bi看板审批
             dataLoading:false,
+            
+            selectApproveUsers: [],
+            selectNoApproveUsers: [],
+            usersOptions: [],
+            approveOption: ['或签','会签'],
+            approveForm: {
+                approveUsers:[],
+                approveType:'或签',
+                noApproveUsers:[]
+            }
         };
     },
     methods: {
@@ -123,8 +229,17 @@ export default {
           this.ClassifyThirdld = 0;
           this.ClassifyId = 0;
           this.$refs.reftable&&this.$refs.reftable.clearSort();
-          tabName == 'report' ? this.getClassifyTree() : this.getBIClassifyTree();
-          this.getTableData();
+          tabName == 'bi' && this.getBIClassifyTree();
+          tabName == 'bi' && this.getTableData();
+          
+            this.approveForm = {
+                approveUsers:[],
+                approveType:'或签',
+                noApproveUsers:[]
+            };
+            this.selectApproveUsers = [];
+            this.selectNoApproveUsers = [];
+            ['edb','chart'].includes(this.activeMainTab) && this.getApproveDetail();
         },
         handleCurrentChange(page){
             this.page = page
@@ -226,16 +341,16 @@ export default {
             }).catch(()=>{})
         },
         afterGetBaseConfig(){ //执行完reportApproveConfig中getBaseConfig之后执行  mounted之后执行
-            // if(this.isETAApprove) 
-            //     this.mainTabs.push({
-            //             label:this.$t('AprrovalPage.research_approval_btn'),
-            //             name:'report' 
-            //     });
+            const {approveFlowPermission,checkPermissionBtn}=this.permissionBtn;
+
+            this.mainTabs = this.allAuthTabs.filter( _ => checkPermissionBtn(approveFlowPermission[_.authCode]));
+
            if(this.IsBIApprove)
                 this.mainTabs.push({
                     label:this.$t('SystemManage.BaseConfig.bIDashboard_approval'),
                     name:'bi'  
                 });
+
            this.activeMainTab = this.mainTabs.length > 0 ? this.mainTabs[0].name : '';
            if(!this.mainTabs.length) return;
            
@@ -244,11 +359,123 @@ 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})
+        },
+
+        // 递归处理数组
+        filterTreeEmpty(arr) {
+            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
+                }
+            }
+            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);
+                })
+            }
+        },
+
+        /* 指标图表审批流设置 */
+        async handleApproveSetConfirm() {
+            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.getClassifyTree();
         this.getBIClassifyTree();
     },
 };
@@ -264,5 +491,29 @@ export default {
     .list-box{
         margin-top:30px;
     }
+
+    .edb-approve-wrapper {
+        width: 80%;
+        padding: 30px 0;
+        .bot {
+            display: flex;
+            justify-content: center;
+            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>

+ 177 - 0
src/views/approve_manage/components/EdbChartApproveWrapper.vue

@@ -0,0 +1,177 @@
+<template>
+  <!-- 指标和图标审批页面 -->
+  <div class="approve-detail detail-wrapper">
+    <div class="top">
+      <div class="left">
+        <div class="item">
+          <label class="el-form-item__label">待审批{{titleLabel}}数量:{{approvelistOption.length}}</label>
+          <el-select
+            v-model="checkId"
+            style="width: 240px"
+          >
+            <el-option
+              v-for="item in approvelistOption"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </div>
+        <div class="item">
+          <label class="el-form-item__label">公开目录</label>
+          {{selectItem.classifyName}}
+        </div>
+      </div>
+    </div>
+
+    <div class="container">
+      <div class="preview-wrapper">
+          <div class="edb-detail" v-if="mainType==='edb'">
+            <!-- 指标渲染 -->
+            <chart-trend-render
+              :edbid="selectItem.value"
+              :isShowChartBasis="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=${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">{{info.Approve.ApproveRemark}} </p>
+        </div>
+
+        <div class="tool-btn">
+            <el-button type="danger" @click="$parent.changeApprove('reject')"
+                v-if="formType==='approve'&&approveInfo.isCurrentApprover&&permissionBtn.isShowBtn('approvePermission','reportApprove_reject')">驳回</el-button>
+            <el-button type="primary" @click="$parent.changeApprove('pass')"
+                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>
+  </div>
+</template>
+<script>
+import chartDetailDia from '@/views/mychart_manage/components/chartDetailDia.vue'
+import chartTrendRender from '@/views/dataEntry_manage/databaseComponents/chartTrendRender.vue';
+export default {
+  components: { chartTrendRender,chartDetailDia },
+  computed: {
+      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: {
+    formType: {
+      type: String
+    },
+    mainType: {
+      type: String,
+    },
+    info: {
+      type: Object
+    },
+    approveInfo: {
+      type: Object
+    }
+    
+  },
+  data() {
+    return {
+      checkId:'',
+    }
+  },
+  mounted() {
+    this.checkId = this.approvelistOption[0].value;
+  },
+  methods:{
+  },
+}
+</script>
+<style scoped lang='scss'>
+.detail-wrapper {
+  padding: 20px;
+  display: flex;
+  flex-direction: column;
+  .top {
+    display: flex;
+    justify-content: space-between;
+    .left,.item {
+      display: flex;
+      align-items: center;
+    }
+    .left {
+      gap: 50px;
+    }
+  }
+
+  .container {
+    display: flex;
+    margin-top: 20px;
+    flex: 1;
+    .preview-wrapper {
+      flex: 1;
+      border: 1px solid #E9E9EB;
+      padding: 30px 20px;
+      border-radius: 4px;
+    }
+    .right {
+      margin-left: 20px;
+      width: 350px;
+      border: 1px solid #E9E9EB;
+      padding: 30px 20px;
+      border-radius: 4px;
+      display: flex;
+      flex-direction: column;
+      justify-content: space-between;
+      .tool-btn {
+        display: flex;
+        justify-content: flex-end;
+        align-items: center;
+        margin-top: 40px;
+      }
+
+      .reason {
+        height: 200px;
+        overflow-y: auto;
+        margin-top: 20px;
+        padding: 10px 20px;
+        border: 1px solid #DCDFE6;
+        border-radius: 8px;
+      }
+    }
+  }
+}
+</style>

+ 15 - 0
src/views/approve_manage/mixins/approveMixins.js

@@ -1,4 +1,7 @@
 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) => {
         hasDisabled&&(item.disabled = (item.Children&&item.Children.length)?false:item.HasFlow)
@@ -14,6 +17,7 @@ export default{
         return {
             classifyTree:[],
             biClassifyTree:[],
+            classifyOptions: []
         }
     },
     methods:{
@@ -34,5 +38,16 @@ export default{
                 this.biClassifyTree = res.Data
             })
         },
+
+        async getClassifyOptions() {
+            const res = this.activeMainTab==='edb'
+                ?  await edbBaseV2Interface.getPublicClassifyBase() 
+                :  await chartBaseV2Interface.getPublicClassifyBase()
+          
+            if(res.Ret!==200) return 
+    
+            this.classifyOptions = res.Data.AllNodes || [];
+            filterNodes(this.classifyOptions,false)
+        }
     }
 }

+ 3 - 3
src/views/chartRelevance_manage/crossVarietyAnalysis/list.vue

@@ -16,9 +16,9 @@
 				</div>
 
 				<div class="search-cont">
-					<el-checkbox v-model="isShowMe"  
+					<!-- <el-checkbox v-model="isShowMe"  
 						v-permission="permissionBtn.statisticPermission.crossVariety_onlyMine"
-						@change="() => { getTreeData();getPublicList() }">{{$t('StatisticAnalysis.ChartRelevance.only_see_mine')}}</el-checkbox>
+						@change="() => { getTreeData();getPublicList() }">{{$t('StatisticAnalysis.ChartRelevance.only_see_mine')}}</el-checkbox> -->
 					<el-select
 						v-model="search_txt"
 						v-loadMore="searchLoad"
@@ -296,7 +296,7 @@ export default {
 		return {
 			showData: false,
 			refreshLoading: false,
-			isShowMe: false,
+			isShowMe: true,
 			search_txt: '',
 			searchOptions:[],
 			isSlideLeft: false,//左侧分类收起

+ 3 - 3
src/views/chartRelevance_manage/fittingEquation/fittingEquationList.vue

@@ -17,9 +17,9 @@
 				</div>
 
 				<div class="search-cont">
-					<el-checkbox v-model="isShowMe"  
+					<!-- <el-checkbox v-model="isShowMe"  
 						v-permission="permissionBtn.statisticPermission.fittingEq_onlyMine"
-						@change="() => { getTreeData();getPublicList() }">{{$t('Chart.only_see_mine')}}</el-checkbox>
+						@change="() => { getTreeData();getPublicList() }">{{$t('Chart.only_see_mine')}}</el-checkbox> -->
 					<el-select
 						v-model="search_txt"
 						v-loadMore="searchLoad"
@@ -263,7 +263,7 @@ export default {
 		return {
 			showData: false,
 			refreshLoading: false,
-			isShowMe: false,
+			isShowMe: true,
 			search_txt: '',
 			searchOptions:[],
 			isSlideLeft: false,//左侧分类收起

+ 3 - 3
src/views/chartRelevance_manage/relevance/list.vue

@@ -18,10 +18,10 @@
           style="padding: 0 20px; display: flex; justify-content: space-between"
         >
           <span>{{$t('StatisticAnalysis.ChartRelevance.catagory')}}</span>
-          <el-checkbox v-model="isOnlyMe" @change="onlyMeHandler"
+          <!-- <el-checkbox v-model="isOnlyMe" @change="onlyMeHandler"
             v-permission="permissionBtn.statisticPermission.corrAnalysis_onlyMine"
             >{{$t('StatisticAnalysis.ChartRelevance.only_see_mine')}}</el-checkbox
-          >
+          > -->
         </div>
         <div class="search-cont">
           <el-select
@@ -396,7 +396,7 @@ export default {
       search_have_more: false,
       current_search: "",
 
-      isOnlyMe: false, //仅仅看我的
+      isOnlyMe: true, //仅仅看我的
 
       classify_tab: 0, //分类类型
     };

+ 3 - 3
src/views/chartRelevance_manage/statistic/statisticFeatureList.vue

@@ -16,9 +16,9 @@
 				</div>
 
 				<div class="search-cont">
-					<el-checkbox v-model="isShowMe"  
+					<!-- <el-checkbox v-model="isShowMe"  
 						v-permission="permissionBtn.statisticPermission.statisticFeature_onlyMine"
-						@change="() => { getTreeData();getPublicList() }">{{$t('StatisticAnalysis.ChartRelevance.only_see_mine')}}</el-checkbox>
+						@change="() => { getTreeData();getPublicList() }">{{$t('StatisticAnalysis.ChartRelevance.only_see_mine')}}</el-checkbox> -->
 					<el-select
 						v-model="search_txt"
 						v-loadMore="searchLoad"
@@ -260,7 +260,7 @@ export default {
 		return {
 			showData: false,
 			refreshLoading: false,
-			isShowMe: false,
+			isShowMe: true,
 			search_txt: '',
 			searchOptions:[],
 			isSlideLeft: false,//左侧分类收起

+ 7 - 0
src/views/dataEntry_manage/addChart.vue

@@ -56,6 +56,7 @@
 								</el-radio-group>
 							</div>
 							<el-select
+								v-if="edbFromType===1"
 								v-model="search_txt"
 								v-loadMore="searchLoad"
 								ref="searchRef"
@@ -90,6 +91,12 @@
 									</edbDetailPopover>
 								</el-option>
 							</el-select>
+							
+							<edbSelectSearch 
+								v-else
+								style="width:90%;margin-top: 10px;display: block;"
+								@change="selectTarget"
+							/>
 						</div>
 					</el-form-item>
 

Datei-Diff unterdrückt, da er zu groß ist
+ 607 - 715
src/views/dataEntry_manage/chartSetting.vue


+ 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||[]

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

@@ -0,0 +1,617 @@
+<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"
+                  clearable
+                  multiple
+                  collapse-tags
+                  placeholder="请选择数据来源"
+                  @change="handleFilter"
+                >
+                  <el-option
+                    v-for="item in sourceOption"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+
+                <el-cascader
+                  v-if="source==='chart'"
+                  v-model="filterObj.chartTypes"
+                  :options="chartTypesOptions"
+                  :show-all-levels="false"
+                  clearable
+                  collapse-tags
+                  :props="{
+                    emitPath:false,
+                    label:'ChartTypeName',
+                    value:'ChartTypeId',
+                    children:'Child',
+                    multiple:true
+                  }"
+                  placeholder="图表类型"
+                  @change="handleFilter"
+                />
+
+                <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="filterObj.pageSize"
+                    :page_no="filterObj.pageNo"
+                    @handleCurrentChange="pageChange"
+                />
+              </div>
+          </div>
+
+          <div class="type-wrap">
+            <label class="el-form-item__label">移动至新分类</label>
+
+            <el-cascader
+              v-model="filterObj.newClassify"
+              :options="classifyOption"
+              clearable
+              placeholder="选择新分类"
+              style="width: 240px"
+              :props="cascaderProps"
+              ref="newClassifyRef"
+            />
+          </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';
+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: this.classifyShowType==='own'?'ClassifyNamePath':'PublicClassifyNamePath',
+            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() {
+        let options = this.source === 'chart'
+          ? {
+              label: 'ChartClassifyName',
+              value: 'ChartClassifyId',
+              children: 'Children',
+              emitPath: false
+            }
+          : {
+              label: 'ClassifyName',
+              value: 'ClassifyId',
+              children: 'Children',
+              emitPath: false,
+              checkStrictly: true
+            }
+
+        return options
+      },
+      
+      Idkey() {
+        return this.source==='edb'?'EdbInfoId':'ChartInfoId';
+      },
+    },
+    watch: {
+      show(n){
+        if(!n) return
+        
+        this.getClassifyOpts();
+        this.source==='chart' && this.getChartTypes();
+        this.source==='edb' && this.getEdbSources();
+        this.$nextTick(() => {
+          this.getList('init');
+        })
+      }
+    },
+    data() {
+      return {
+        filterObj: {
+          classify: [],
+          relevanceChild:true,
+          pageNo: 1,
+          pageSize: 20,
+          source: [],
+          chartTypes: [],
+          keyWord: '',
+          checkAll: false, //控制全选显示状态
+          checkSome: false,
+          newClassify: ''
+        },
+        sourceOption: [],
+        classifyOption: [],
+        cascaderKey:0,
+        chartTypesOptions: [],
+
+        list: [],
+        total: 0,
+        isSelectAll: false, //真正意义上的全选或不全选
+        checkedList: [], //不全选勾选中的 或 全选取消勾的项
+        selectionReactCancel:false,//手动设置选中中
+      }
+    },
+    
+    methods: {
+
+      /* 获取计算指标类型 */
+      async getEdbSources() {
+        const res = await dataBaseInterface.getDataSource({IsBase:2})
+
+        if(res.Ret !== 200) return
+
+        this.sourceOption = res.Data.map(i=>({
+            label:i.SourceName,
+            value:i.EdbSourceId
+        }))
+      },
+
+      /* 获取图表类型 */
+      getChartTypes() {
+        dataBaseInterface.chartTypeList().then(res=>{
+          if(res.Ret!==200) return 
+          this.chartTypesOptions=res.Data.List||[];
+        })
+      },
+
+      //目录 指标/图库
+      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') {
+
+        const { 
+          pageNo,
+          pageSize,
+          source,
+          keyWord,
+        } = this.filterObj;
+
+        let checkedClassify = this.$refs.classifyRef.getCheckedNodes();
+        let ClassifyIdList = checkedClassify.length 
+          ? checkedClassify.map(_ => _.data.ClassifyId)
+          : []
+
+        let params = {
+          SourceList:source,
+          Keyword: keyWord,
+          ClassifyIdList: this.classifyShowType === 'own' ? ClassifyIdList : [],
+          PublicClassifyIdList: this.classifyShowType === 'own' ? [] : ClassifyIdList,
+          CurrentIndex: pageNo,
+          PageSize: pageSize
+        }
+        const res = this.source === 'edb'
+          ? await edbBaseV2Interface.getPublicSearchList({
+              ...params,
+              EdbPublicList: this.classifyShowType === 'own' ? [] : [3],
+            })
+          : await chartBaseV2Interface.getPublicSearchList({
+              ...params,
+              ChartPublicList: this.classifyShowType === 'own' ? [] : [3],
+            })
+        
+          if(res.Ret !== 200) return
+
+          this.list = res.Data.List||[];
+          this.total = res.Data.Paging.Totals;
+
+          this.list.forEach(_ => {
+            _.ClassifyNamePath = _.ClassifyNamePath.replace(/\|/g,'/')
+            _.PublicClassifyNamePath = _.PublicClassifyNamePath.replace(/\|/g,'/')
+          });
+
+          if(type==='filter'){
+            this.listCheckAllChange(true)
+          }else {
+            //页码变化 选中项不做清空
+            this.checkedSomeSelection()
+          }
+      },
+
+      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,
+          chartTypes,
+          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 = {
+            ChartTypeList: chartTypes,
+            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>

+ 71 - 53
src/views/dataEntry_manage/components/chartDialog.vue

@@ -65,8 +65,9 @@
 				</el-form>
 			</div>
 			<div class="dia-bot">
-				<el-button type="primary" style="margin-right:20px" @click="saveHandle"><!-- 保存 -->{{$t('Dialog.confirm_save_btn')}}</el-button>
-				<el-button type="primary" plain @click="cancelHandle"><!-- 取消 -->{{$t('Dialog.cancel_btn')}}</el-button>
+				<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>
 			</div>
 		</el-dialog>
 	</div>
@@ -74,6 +75,7 @@
 
 <script>
 import { dataBaseInterface } from '@/api/api.js';
+import { chartBaseV2Interface } from '@/api/modules/chartApi';
 import { formRules } from '@/utils/defaultOptions'
 export default {
 	props: {
@@ -87,6 +89,9 @@ export default {
 		},
 		formData: {
 			type: Object,
+		},
+		classifyShowType: { //分类类型 own public
+			type: String,
 		}
 	},
 	watch: {
@@ -112,60 +117,73 @@ export default {
 		};
 	},
 	methods: {
-		saveHandle() {
-			this.$refs.diaForm.validate((valid) => {
-				if(valid) {
-					this.title==='添加' && dataBaseInterface.addChartClassify({
-						ChartClassifyName: this.formData.level === 0 
-							? this.formData.level_1
-							: this.formData.level === 1
-							? this.formData.level_2
-							: this.formData.level === 2
-							? this.formData.level_3
-							:'',
-						ParentId:this.formData.parent_id || 0,
-						Level: this.formData.level
-					}).then(res => {
-						if(res.Ret === 200) {
-							this.$message.success(res.Msg);
-							this.callbackHandle('add');
-						}
-					})
-					//修改图表
-					if(this.title==='编辑' && this.formData.level===4) {
-						dataBaseInterface.chartEdit({
-							ChartClassifyId: this.formData.level_menu[this.formData.level_menu.length - 1],
-							ChartInfoId: this.formData.chart_id,
-							ChartName: this.formData.level_4
-						}).then(res => {
-							if(res.Ret === 200) {
-								this.$message.success(res.Msg);
-								this.callbackHandle('update');
-							}
-						})
-					}else if(this.title==='编辑' && this.formData.level!==4) {
-						//修改目录
-						dataBaseInterface.editChartClassify({
-							ChartClassifyName: this.formData.level === 1
-								? this.formData.level_1
-								: this.formData.level === 2
-								? this.formData.level_2
-								:this.formData.level === 3
-								?this.formData.level_3
-								:'',
-							ChartClassifyId:this.formData.classify_id || 0
-						}).then(res => {
-							if(res.Ret === 200) {
-								this.$message.success(res.Msg);
-								this.callbackHandle();
-							}
-						})
+		async saveHandle() {
+			await this.$refs.diaForm.validate();
+
+			if(this.title==='添加') {
+				this.handleAddApi()
+			}else {
+				this.formData.level===4 ? this.handleEditChartApi() : this.handleEditClassifyApi();
+			}
+		},
+
+		async handleAddApi() {
+			let params = {
+				ChartClassifyName: this.formData.level === 0 
+					? this.formData.level_1
+					: this.formData.level === 1
+					? this.formData.level_2
+					: this.formData.level === 2
+					? this.formData.level_3
+					:'',
+				ParentId:this.formData.parent_id || 0,
+				Level: this.formData.level
+			}
+
+			const res = this.classifyShowType ==='own' 
+				? await dataBaseInterface.addChartClassify(params)
+				: await chartBaseV2Interface.addPublicedClassify(params)
+
+			if(res.Ret !== 200) return 
+			this.$message.success('添加成功');
+			this.callbackHandle('add');
+		},
+
+		handleEditChartApi() {
+				dataBaseInterface.chartEdit({
+					ChartClassifyId: this.formData.level_menu[this.formData.level_menu.length - 1],
+					ChartInfoId: this.formData.chart_id,
+					ChartName: this.formData.level_4
+				}).then(res => {
+					if(res.Ret === 200) {
+						this.$message.success(res.Msg);
+						this.callbackHandle('update');
 					}
+				})
+		},
 
-					// this.title === '选择分类' && this.$emit('addClassifyCallBack',this.formData.level_menu[2])
+		async handleEditClassifyApi() {
+				//修改目录
+				let params = {
+					ChartClassifyName: this.formData.level === 1
+						? this.formData.level_1
+						: this.formData.level === 2
+						? this.formData.level_2
+						:this.formData.level === 3
+						?this.formData.level_3
+						:'',
+					ChartClassifyId:this.formData.classify_id || 0
 				}
-			})
+
+			const res =	this.classifyShowType ==='own' 
+				? await dataBaseInterface.editChartClassify(params)
+				: await chartBaseV2Interface.editPublicedClassify(params)
+
+				if(res.Ret !== 200) return
+				this.$message.success('编辑成功');
+				this.callbackHandle();
 		},
+
 		/* 成功回调 */
 		callbackHandle(type) {
 			this.$refs.diaForm.resetFields();
@@ -174,7 +192,7 @@ export default {
 		/* 取消 */
 		cancelHandle() {
 			this.$refs.diaForm.resetFields();
-			this.$emit('closeDia')
+			this.$emit('update:isOpenDialog',false)
 		},
 		/* 获取目录结构 */
 		getMenu() {

+ 8 - 8
src/views/dataEntry_manage/css/chartfit.scss

@@ -36,13 +36,12 @@ $font-normal:14px;
 		}
 		.main-left {
 			width: 400px;
-			min-width: 300px;
+			min-width: 350px;
 			background: #fff;
 			margin-right: 20px;
 			border: 1px solid #ececec;
 			border-radius: 4px;
 			box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.05);
-			height: calc(100vh - 113px);
 			overflow: hidden;
 			position: relative;
 			box-sizing: border-box;
@@ -55,10 +54,11 @@ $font-normal:14px;
 				}
 			}
 			.tree-cont {
-				padding: 15px 20px 30px;
-				margin-right: 20px;
-				overflow: auto;
-				max-height: calc(100vh - 330px);
+				padding: 0 20px 30px;
+				height: calc(100vh - 320px);
+				&.shared-cont {
+					height: calc(100vh - 250px);
+				}
 			}
 			.target_tree {
 				font-size: 12px;
@@ -72,7 +72,7 @@ $font-normal:14px;
 					justify-content: space-between;
 					align-items: center;
 					display: block;
-					flex: 1;
+					width: 90%;
 					.node_label {
 						margin-right: 2px;
 					}
@@ -86,7 +86,7 @@ $font-normal:14px;
 					background-color: #409eff;
 				}
 				.el-tree-node__content {
-					margin-bottom: 14px !important;
+					margin-bottom: 5px !important;
 				}
 				.el-tree-node__children {
 					.el-tree-node {

+ 27 - 10
src/views/dataEntry_manage/databaseComponents/addCollectClassifyDia.vue

@@ -41,7 +41,7 @@
 </template>
 
 <script>
-import { edbCollectInterface } from '@/api/modules/chartApi'
+import { edbCollectInterface,chartBaseV2Interface } from '@/api/modules/chartApi'
 export default {
   props: {
     show: {
@@ -49,7 +49,11 @@ export default {
     },
     form: {
       type:Object
-    }
+    },
+    source: { //指标或图库 edb chart
+      type: String,
+      default: 'edb'
+    },
   },
   watch: {
     show(newVal) {
@@ -77,14 +81,27 @@ export default {
     async saveClassifyHandle() {
       await this.$refs.formRef.validate()
       
-      const res = this.form.classifyId
-        ? await edbCollectInterface.editCollectClassify({
-            ClassifyName: this.classifyForm.classifyName,
-            ClassifyId: this.form.classifyId
-          })
-        : await edbCollectInterface.addCollectClassify({
-            ClassifyName: this.classifyForm.classifyName,
-          })
+      let res;
+
+      if(this.source === 'edb') {
+        res = this.form.classifyId
+          ? await edbCollectInterface.editCollectClassify({
+              ClassifyName: this.classifyForm.classifyName,
+              ClassifyId: this.form.classifyId
+            })
+          : await edbCollectInterface.addCollectClassify({
+              ClassifyName: this.classifyForm.classifyName,
+            })
+      }else {
+        res = this.form.classifyId
+          ? await chartBaseV2Interface.editCollectClassify({
+              ClassifyName: this.classifyForm.classifyName,
+              ClassifyId: this.form.classifyId
+            })
+          : await chartBaseV2Interface.addCollectClassify({
+              ClassifyName: this.classifyForm.classifyName,
+            })
+      }
 
       if(res.Ret !== 200) return
       this.$message.success(this.form.classifyId?'编辑成功':'新增成功');

+ 66 - 54
src/views/dataEntry_manage/databaseComponents/chartTrendRender.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="chart-trend-render">
-		<div class="header">
+		<div class="header" v-if="!onlyShowDetail">
 			<template v-if="chart_type===1">
 				<el-popover 
 					placement="bottom" 
@@ -39,60 +39,63 @@
 			</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"/>
-				<div class="range-cont left" v-if="leftIndex != -1">
-					<el-input
-						style="width: 80px; display: block"
-						size="mini"
-						type="number"
-						placeholder="上限"
-						:disabled="!isAllowEditLimit"
-						v-model="chartInfo.MaxValue"
-						@change="() => { chart_type===1?setOptions():setSeasonOptions() }"
-					/>
-					<el-input
-						class="min-data-input"
-						size="mini"
-						type="number"
-						placeholder="下限"
-						:disabled="!isAllowEditLimit"
-						v-model="chartInfo.MinValue"
-						@change="() => { chart_type===1?setOptions():setSeasonOptions() }"
-					/>
-				</div>
-				<div class="range-cont right" v-if="isShowOnyearData">
-					<el-input
-						style="width: 80px; display: block"
-						size="mini"
-						type="number"
-						placeholder="上限"
-						v-model="limitData.rightMax"
-						:disabled="!isAllowEditLimit"
-						@change="changeLimit"
-					/>
-					<el-input
-						class="min-data-input"
-						size="mini"
-						type="number"
-						placeholder="下限"
-						v-model="limitData.rightMin"
-						:disabled="!isAllowEditLimit"
-						@change="changeLimit"
-					/>
-				</div>
-				<!-- 公历农历切换 只用于季节性图 -->
-				<div style="text-align:center;">
-					<el-radio-group
-							v-model="calendar_type"
-							class="calendar-cont"
-							v-if="chart_type===2"
-							@change="getDataByPath"
-					>
-							<el-radio-button label="公历">{{$t('Chart.calendar_gre')}}</el-radio-button>
-							<el-radio-button label="农历">{{$t('Chart.calendar_lunar_text')}}</el-radio-button>
-					</el-radio-group>
-				</div>
+
+				<template v-if="!onlyShowDetail">
+					<div class="range-cont left" v-if="leftIndex != -1">
+						<el-input
+							style="width: 80px; display: block"
+							size="mini"
+							type="number"
+							placeholder="上限"
+							:disabled="!isAllowEditLimit"
+							v-model="chartInfo.MaxValue"
+							@change="() => { chart_type===1?setOptions():setSeasonOptions() }"
+						/>
+						<el-input
+							class="min-data-input"
+							size="mini"
+							type="number"
+							placeholder="下限"
+							:disabled="!isAllowEditLimit"
+							v-model="chartInfo.MinValue"
+							@change="() => { chart_type===1?setOptions():setSeasonOptions() }"
+						/>
+					</div>
+					<div class="range-cont right" v-if="isShowOnyearData">
+						<el-input
+							style="width: 80px; display: block"
+							size="mini"
+							type="number"
+							placeholder="上限"
+							v-model="limitData.rightMax"
+							:disabled="!isAllowEditLimit"
+							@change="changeLimit"
+						/>
+						<el-input
+							class="min-data-input"
+							size="mini"
+							type="number"
+							placeholder="下限"
+							v-model="limitData.rightMin"
+							:disabled="!isAllowEditLimit"
+							@change="changeLimit"
+						/>
+					</div>
+					<!-- 公历农历切换 只用于季节性图 -->
+					<div style="text-align:center;">
+						<el-radio-group
+								v-model="calendar_type"
+								class="calendar-cont"
+								v-if="chart_type===2"
+								@change="getDataByPath"
+						>
+								<el-radio-button label="公历">{{$t('Chart.calendar_gre')}}</el-radio-button>
+								<el-radio-button label="农历">{{$t('Chart.calendar_lunar_text')}}</el-radio-button>
+						</el-radio-group>
+					</div>
+				</template>
 			</div>
 			<img src="~@/assets/img/icons/edb-stopping.png" class="stop-mark" v-if="([2,34].includes(chartInfo.Source) || chartInfo.EdbType==2) && ( chartInfo.IsSupplierStop==1 || (chartInfo.IsSupplierStop==0&&chartInfo.NoUpdate==1))" />
 		</div>
@@ -147,6 +150,11 @@ export default {
 		isOnlyShowBaseChart() {
 			/* return [6,12,13,35,37].includes(this.chartInfo.Source) */
 			return false
+		},
+
+		/* 只预览图 */
+		onlyShowDetail() {
+			return this.$route.path==='/approveDetail'
 		}
 	},
 	watch: {
@@ -209,6 +217,7 @@ export default {
 			const apiMap = {
 				'/edbBasicbase': this.getEdbData,
 				'/database': this.getEdbData,
+				'/approveDetail': this.getEdbData,
 				'/analyseVariety': this.getPlantEdbData
 			}
 
@@ -835,6 +844,9 @@ export default {
 		.chartWrapper {
 			position: relative;
 			padding: 0 105px 0 100px;
+			&.base {
+				padding: 0;
+			}
 			.range-cont {
 				position: absolute;
 				top: 8%;

+ 46 - 20
src/views/dataEntry_manage/databaseComponents/collectEdbMenu.vue

@@ -1,14 +1,17 @@
 <template>
     <el-tree
-        ref="catalogTree"
-        class="catalog-tree other-tree"
-        empty-text="暂无图库"
+        ref="catalogTree "
+        :class="['catalog-tree',{'target_tree': source==='chart'}]"
+        empty-text="暂无收藏"
         :data="data"
         :allow-drop="canDropHandle"
         draggable
         node-key="ClassifyId"
+        :props="{
+          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 }">
@@ -19,7 +22,7 @@
                   alt=""
                   style="width: 15px; height: 14px; margin-right: 8px"
                   @click.stop="$parent.handleOpenCollectClassify(data)"
-                  v-if="!data.EdbCode&&$parent.isEdbBtnShow('edbData_edbCollectClassify_save')"
+                  v-if="!data.EdbCode"
                 />
 
                 <img
@@ -27,7 +30,7 @@
                   alt=""
                   style="width: 14px; height: 14px;"
                   @click.stop="removeCollectNode(data)"
-                  v-if="!data.EdbCode&&$parent.isEdbBtnShow('edbData_edbCollectClassify_remove')"
+                  v-if="!data.EdbCode"
                 />
             </div>
         </div>
@@ -35,12 +38,16 @@
 </template>
 
 <script>
-import { edbCollectInterface } from '@/api/modules/chartApi'
+import { edbCollectInterface,chartBaseV2Interface } from '@/api/modules/chartApi'
 export default {
   props: {
     data: {
       type: Object
-    }
+    },
+    source: { //指标或图库 edb chart
+      type: String,
+      default: 'edb'
+    },
   },
   data() {
     return {
@@ -52,9 +59,13 @@ export default {
           '提示',
           { type: 'warning' }
       ).then(async () => {
-        const res = await edbCollectInterface.delCollectClassify({
-          ClassifyId
-        })
+        const res = this.source === 'edb'
+          ? await edbCollectInterface.delCollectClassify({
+              ClassifyId
+            })
+          : await chartBaseV2Interface.delCollectClassify({
+            ClassifyId
+          })
 
         if(res.Ret !== 200) return
         this.$message.success('删除成功')
@@ -90,7 +101,9 @@ export default {
         NextClassifyId
       }
 
-      const res = await edbCollectInterface.moveCollectClassify(params)
+      const res = this.source === 'edb'
+        ? await edbCollectInterface.moveCollectClassify(params)
+        : await chartBaseV2Interface.moveCollectClassify(params)
       if(res.Ret !== 200) return 
       this.$message.success('移动成功')
     },
@@ -99,16 +112,29 @@ export default {
       return dropNode.level===draggingNode.level&&type!=='inner'
     },
 
-    initSelect(id) {
-      console.log(id)
-      this.$nextTick(() => {
-        this.$refs.catalogTree.setCurrentKey(id);
-      })
-    }
+    // checkAuth(key) {
+    //   const {edbDataPermission,checkPermissionBtn}=this.permissionBtn
+    //   const checkAuthMap = {
+    //     'remove': edbDataPermission.edbData_edbCollectClassify_remove,
+    //     'save': edbDataPermission.edbData_edbCollectClassify_save
+    //   }
+
+    //   return checkPermissionBtn(checkAuthMap[key])
+    // },
   }
 }
 </script>
 
-<style>
-
+<style lang="scss" scoped>
+.custom-tree-node {
+  display: flex !important;
+  justify-content: space-between;
+  align-items: center;
+  display: block;
+  flex: 1;
+  max-width: 92%;
+  .node_label {
+    margin-right: 2px;
+  }
+}
 </style>

+ 35 - 22
src/views/dataEntry_manage/databaseComponents/edbCollectDia.vue

@@ -29,30 +29,35 @@
         </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>
 </template>
 
 <script>
-import { edbCollectInterface } from '@/api/modules/chartApi'
+import { edbCollectInterface,chartBaseV2Interface } from '@/api/modules/chartApi'
 export default {
 	name:'',
 	props: {
 		show: {
 			type: Boolean,
 		},
-    edbId: {
+    id: {
       type: Number,
     },
     add_ids: {
       type: Array,
       default: []
-    }
+    },
+    source: { //指标或图库 edb chart
+      type: String,
+      default: 'edb'
+    },
 	},
 	watch: {
 		show(newval) {
@@ -74,13 +79,15 @@ export default {
 	},
 	methods: {
 		/* 获取分类列表 */
-		getClassify() {
-			edbCollectInterface.getEdbCollectClassifyOne()
-				.then(res => {
-					if(res.Ret !== 200) return
-					this.classifyArr = res.Data || [];
-          this.checkedClassifys = _.cloneDeep(this.add_ids);
-				})
+		async getClassify() {
+			const res = this.source ==='edb'
+        ? await edbCollectInterface.getEdbCollectClassifyOne()
+        : await chartBaseV2Interface.getChartCollectClassifyOne();
+
+        if(res.Ret !== 200) return
+        this.classifyArr = res.Data || [];
+        this.checkedClassifys = _.cloneDeep(this.add_ids);
+
 		},
 
     chooseClassify(id) {
@@ -93,17 +100,23 @@ export default {
     },
 
     /* 加入收藏 */
-    saveHandle() {
+    async saveHandle() {
       if(!this.checkedClassifys.length) return this.$message.warning('请选择分类');
-      edbCollectInterface.edbCollect({
-        EdbInfoId: this.edbId,
-        ClassifyIdList: this.checkedClassifys
-      }).then(res => {
+
+      const res = this.source === 'edb'
+        ? await edbCollectInterface.edbCollect({
+            EdbInfoId: this.id,
+            ClassifyIdList: this.checkedClassifys
+          })
+        : await chartBaseV2Interface.chartCollect({
+            ChartInfoId: this.id,
+            ClassifyIdList: this.checkedClassifys
+          })
         if(res.Ret !== 200) return 
         this.$message.success('收藏成功')
-        this.$emit('success',this.checkedClassifys)
-        this.cancelHandle()
-      })
+
+        this.$emit('confirm',this.checkedClassifys);
+        this.cancelHandle();
     },
     
 		cancelHandle() {
@@ -130,13 +143,13 @@ export default {
         padding: 0 20px;
         cursor: pointer;
         &.act {
-          background: #409eff;
+          background: #0052D9;
           color: #fff;
         }
       }
     }
     .add-cont {
-      color: #409eff;
+      color: #0052D9;
       cursor: pointer;
     }
   }

+ 315 - 0
src/views/dataEntry_manage/databaseComponents/edbTableList.vue

@@ -0,0 +1,315 @@
+<template>
+  <div class="edb-table-wrapper">
+    <div class="table-top">
+		  <p>{{$t('EtaBasePage.total_show',{limit: total||0})}}</p>
+
+      <div class="right" v-if="isBasicBase">
+          <el-checkbox 
+            v-model="filterObj.checkAll"
+            :indeterminate="filterObj.checkSome"
+            :disabled="list.length===0"
+            style="margin-right:20px" 
+            @change="listCheckAllChange"
+          >列表全选</el-checkbox>
+          <el-button type="primary" size="medium" @click="handleBatchCollect">批量收藏</el-button>
+      </div>
+    </div>
+    <el-table
+      :data="list"
+      ref="tableRef"
+      v-loading="tableLoading"
+      element-loading-text="加载中..."
+      highlight-current-row
+      border
+      :height="tableH"
+      @selection-change="selectionChange"
+      @select="selectHandle" 
+      @select-all="selectAllPageHandle"
+    >
+      <el-table-column
+        v-if="isBasicBase"
+        type="selection"
+      />
+      <el-table-column
+        v-for="item in tableColums"
+        :key="item.label"
+        :label="item.label"
+        :width="item.widthsty"
+        :min-width="item.minwidthsty"
+        align="center"
+      >
+        <template slot-scope="{row}">
+          <span v-if="item.key==='EdbName'" class="editsty" @click="$emit('click-detail',row)">
+            {{ row.EdbName }}
+          </span>
+          <span v-else-if="item.key==='CreateTime'">{{ $moment(row.CreateTime).format('YYYY-MM-DD') }}</span>
+          <span v-else>{{ row[item.key] }}</span>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="操作" key="Opera" align="center" min-width="150" v-if="!isBasicBase">
+        <template slot-scope="{row}">
+          <el-button 
+            v-if="$parent.isEdbBtnShow('update')"
+            type="text" 
+            @click="$emit('refresh',row)" 
+          >刷新</el-button>
+          <el-button 
+            v-if="$parent.isEdbBtnShow('edit')&&row.Button.OpButton"
+            type="text"
+            @click="$emit('edit',row)"
+          >编辑</el-button>
+          <el-button
+            type="text"
+            @click="$emit('collect',row)"
+          >收藏</el-button>
+
+          <el-button 
+            v-if="$parent.isEdbBtnShow('deleteEdb')&&row.Button.DeleteButton"
+            type="text" 
+            @click="$emit('remove',row)"
+            style="color:#C54322;"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="收藏状态" key="CollectStatu" align="center" v-else min-width="150">
+        <template slot-scope="{row}">
+          <span v-if="row.CollectClassifyIdList&&row.CollectClassifyIdList.length">已收藏至{{row.CollectClassifyNameList.join(',')}},继续</span>
+          <span class="editsty" @click="$emit('collect',row)">收藏</span>
+        </template>
+      </el-table-column>
+      <div slot="empty">
+        <tableNoData :text="$t('Table.no_edb_msg')" />
+      </div>
+    </el-table>
+    
+    <div style="height:35px;margin-top:15px">
+      <m-page
+        :page_no="pageNo"
+        :pageSize="pageSize"
+        :total="total"
+        @handleCurrentChange="pageChange"
+      />
+    </div>
+  </div>
+</template>
+<script>
+import { dataBaseInterface } from '@/api/api.js';
+import mPage from '@/components/mPage.vue';
+export default {
+  components: { mPage },
+  props: {
+    isBasicBase: {
+      type: Boolean
+    },
+    list: {
+      type: Array
+    },
+    tableLoading: {
+      type: Boolean
+    },
+    total: {
+      type:Number
+    },
+    pageNo: {
+      type: Number
+    },
+    pageSize: {
+      type: Number
+    }
+  },
+  computed: {
+    tableColums() {
+      const columns = [
+				{
+					label: '指标名称',
+					key: 'EdbName',
+					minwidthsty: '200px',
+          isShow: true
+				},
+				{
+					label: '最新日期',
+					key: 'EndDate',
+					widthsty: '100px',
+          isShow: true
+				},
+				{
+					label: '最新值',
+					key: 'EndValue',
+          isShow: true
+				},
+				{
+					label: '频度',
+					key: 'Frequency',
+          isShow: true
+				},
+				{
+					label: '单位',
+					key: 'Unit',
+          isShow: true
+				},
+        {
+					label: this.isBasicBase ? '数据来源' : '计算方式',
+					key: 'SourceName',
+          isShow: true
+				},
+				{
+					label: '创建人',
+					key: 'SysUserRealName',
+          isShow: !this.isBasicBase
+				},
+				{
+					label: '创建日期',
+					key: 'CreateTime',
+					widthsty: '100px',
+          isShow: this.isBasicBase
+				},
+      ]
+      
+      let currentColumns = columns.filter(_ => _.isShow);
+      return currentColumns
+    },
+
+    tableH() {
+      return this.isBasicBase ? 'calc(100vh - 250px)' : 'calc(100vh - 360px)';
+    }
+  },
+  data() {
+    return {
+      filterObj: {
+        checkAll: false, //控制全选显示状态
+        checkSome: false
+      },
+
+      isSelectAll: false, //真正意义上的全选或不全选
+      checkedList: [], //不全选勾选中的 或 全选取消勾的
+      selectionReactCancel:false,//手动设置选中中
+    }
+  },
+  mounted(){
+    
+  },
+  methods:{
+
+    pageChange(page) {
+      this.$emit('page-change',page)
+    },
+
+    /* 设置当页数据勾选状态 */
+    checkedSomeSelection() {
+      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)
+              }
+          })
+      }else{
+          this.$refs.tableRef &&this.$refs.tableRef.toggleAllSelection()
+          this.checkedList.map(_ =>{
+              let row = this.list.find(item => item.EdbInfoId==_.EdbInfoId)
+              if(row){ //设置部分不勾选
+                  setTimeout(()=>{
+                      this.$refs.tableRef.toggleRowSelection(row,false)
+                  },20)
+              }
+          })
+      }
+      setTimeout(()=>{
+          this.selectionReactCancel=false
+      },30)
+    },
+
+    //列表全选或全不选
+    listCheckAllChange(value){
+      this.checkedList = []
+      this.isSelectAll = value
+      this.$refs.tableRef && this.$refs.tableRef.clearSelection()
+
+      value && this.$refs.tableRef.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(_ => _.EdbInfoId === row.EdbInfoId);
+
+        //全选取消选和不全选选中才有意义
+        if((haveChecked&&!this.isSelectAll) || (!haveChecked&&this.isSelectAll)) {
+          this.checkedList.push(row)
+        }else {
+          this.checkedList=this.checkedList.filter(_ => _.EdbInfoId!==row.EdbInfoId)
+        }
+    },
+
+    //整列选
+    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(_ => _.EdbInfoId);
+          this.checkedList = this.checkedList.filter(_ => !pageIds.includes(_.EdbInfoId))
+        }
+    },
+  },
+}
+</script>
+<style scoped lang='scss'>
+.edb-table-wrapper {
+  .table-top {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-bottom: 10px;
+  }
+}
+</style>
+<style lang="scss">
+.edb-table-wrapper {
+  .el-table td{
+    padding: 6px 0;
+  }
+}
+</style>

+ 50 - 18
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'
@@ -102,6 +103,10 @@ export default {
 		},
 		isBasicBase: {
 			type: Boolean
+		},
+		classifyShowType: { //分类类型 own public
+			type: String,
+			default:''
 		}
 	},
 	watch: {
@@ -122,6 +127,11 @@ export default {
 			})
 			
 			return strArr.join('/')
+		},
+
+		/* 是否在操作指标加工公共指标模块 */
+		isOperaPublicClassify() {
+			return this.classifyShowType==='public' && !this.isBasicBase;
 		}
 	},
 	data () {
@@ -167,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==='编辑') {
@@ -183,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
+							})
         }
 				
 			}
@@ -207,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();

Datei-Diff unterdrückt, da er zu groß ist
+ 379 - 353
src/views/dataEntry_manage/databaseList.vue


+ 241 - 0
src/views/dataEntry_manage/sharedComponents/batchSetPublicDia.vue

@@ -0,0 +1,241 @@
+<template>
+<div>
+  <el-dialog
+		:visible.sync="show"
+		:close-on-click-modal="false"
+		:modal-append-to-body="false"
+		@close="handleClose"
+		custom-class="set-shared-dialog"
+		center
+		top="2vh"
+    width="1200px"
+		v-dialogDrag
+    title="批量设置公开"
+	>
+    <div class="wrap">
+      <el-table 
+        :data="tableData" 
+        border
+        height="50vh"
+        ref="addTableRef"
+      >
+
+        <el-table-column :label="source==='edb'?'指标名称':'图表名称'" align="center">
+            <template slot-scope="{row}">{{row.Name}}</template>
+        </el-table-column>
+        <el-table-column align="center" width="350px">
+            <template slot="header" slot-scope="scope">
+                <el-radio-group 
+                  v-model="classifyType"
+                >
+                    <el-radio :label="0">{{ $t('EtaBasePage.subdirectory_radio') }}</el-radio>
+                    <el-radio :label="1">{{ $t('EtaBasePage.directory_radio') }}</el-radio>
+                </el-radio-group>
+                <el-cascader
+                  v-model="selectClassify"
+                  v-if="classifyType === 1"
+                  :options="classifyOption"
+                  clearable
+                  placeholder="选择分类"
+                  :props="cascaderProps"
+                  @change="handleClassifyAllChange(row)"
+                  class="header-cascader"
+                />
+            </template>
+            <template slot-scope="{row}">
+                <el-cascader
+                  v-model="row.PublicClassifyId"
+                  :options="classifyOption"
+                  clearable
+                  placeholder="选择分类"
+                  :props="cascaderProps"
+                  :disabled="classifyType===1"
+                  @change="handleClassifyAllChange(row)"
+                  size="small"
+                />
+            </template>
+        </el-table-column>
+      </el-table>
+      <div class="reason-wrapper" v-if="isNeedPublicApprove">
+        <label class="el-form-item__label">公开理由</label>
+         <el-input
+            type="textarea"
+            :rows="5"
+            placeholder="请输入公开理由"
+            v-model="reason"
+            style="width:500px"
+          />
+      </div>
+    </div>
+    <div class="dia-bot">
+      <el-button type="primary" plain @click="handleClose">取消</el-button>
+      <el-button type="primary" @click="handleConfirm">确定</el-button>
+    </div>
+  </el-dialog>
+
+</div>
+</template>
+<script>
+import { edbBaseV2Interface,chartBaseV2Interface } from '@/api/modules/chartApi';
+export default {
+  props: {
+    show: {
+      type: Boolean
+    },
+    source: { //指标或图库
+      type: String,
+      default: 'edb'
+    },
+    checkedParams: {
+      type: Object
+    }
+  },
+  computed: {
+    cascaderProps() {
+      let options = this.source === 'chart'
+        ? {
+            label: 'ChartClassifyName',
+            value: 'ChartClassifyId',
+            children: 'Children',
+            emitPath: false
+          }
+        : {
+            label: 'ClassifyName',
+            value: 'ClassifyId',
+            children: 'Children',
+            emitPath: false,
+            checkStrictly: true
+          }
+
+      return options
+    },
+  },
+  watch: {
+    show(nval) {
+      if(!nval) return
+
+      this.getList()
+      this.getApproveAuth()
+      this.getClassifyOpts()
+    }
+  },
+  data() {
+    return {
+      reason:'',
+      tableData:[],
+      classifyOption: [],
+      classifyType:0,//目录方式
+      selectClassify: 0,//选择的分类
+
+      isNeedPublicApprove: true,//是否需要公开走审批
+    }
+  },
+  methods:{
+    handleClose() {
+      this.tableData = [];
+      this.reason = '';
+      this.isNeedPublicApprove = true;
+      this.classifyType = 0;//目录方式
+      this.selectClassify = 0;//选择的分类
+      this.$emit('update:show',false);
+    },
+
+    async handleConfirm() {
+      const res = this.source === 'edb'
+        ? await edbBaseV2Interface.setEdbPublic({
+            EdbInfoList: this.tableData.map(_ => ({
+              EdbInfoId: _.EdbInfoId,
+              ClassifyId: _.PublicClassifyId
+            })),
+            Description: this.reason
+          })
+        : await chartBaseV2Interface.setChartPublic({
+            ChartInfoList: this.tableData.map(_ => ({
+              ChartInfoId: _.ChartInfoId,
+              ClassifyId: _.PublicClassifyId
+            })),
+            Description: this.reason
+          })
+
+      if(res.Ret !== 200) return
+      this.$message.success(this.isNeedPublicApprove?'已提交申请,请等待审批':'设置成功')
+
+      this.handleClose()
+      this.$emit('confirm')
+    },
+
+
+    handleClassifyAllChange(e){
+      this.tableData.forEach(item=>{
+        item.PublicClassifyId = this.selectClassify;
+      })
+    },
+
+    async getList() {
+      const res = this.source === 'edb'
+        ? await edbBaseV2Interface.getPublicSearchListAll(this.checkedParams)
+        : await chartBaseV2Interface.getPublicSearchListAll(this.checkedParams)
+
+      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 = this.source === 'edb'
+        ? await edbBaseV2Interface.getPublicClassifyBase()
+        : 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
+        }
+      })
+    },
+
+  },
+}
+</script>
+<style scoped lang='scss'>
+.reason-wrapper {
+  display: flex;
+  margin: 20px 0;
+}
+.header-cascader {
+  width: 160px;
+}
+.cascader-wrapper {
+  width: 340px;
+}
+.dia-bot {
+  margin: 30px 0;
+  display: flex;
+  justify-content: center;
+  gap: 20px;
+  .el-button {
+    width: 120px;
+  }
+}
+</style>

+ 185 - 0
src/views/dataEntry_manage/sharedComponents/setPublicDia.vue

@@ -0,0 +1,185 @@
+<template>
+<div>
+  <el-dialog
+		:visible.sync="show"
+		:close-on-click-modal="false"
+		:modal-append-to-body="false"
+		@close="handleClose"
+		custom-class="set-shared-dialog"
+		center
+		top="2vh"
+    width="650px"
+		v-dialogDrag
+    :title="`设置${source==='edb'?'指标':'图表'}公开`"
+	>
+    <div class="wrap">
+      <el-form
+        :model="formData"
+        inline
+      >
+        <el-form-item label="公共目录">
+          <el-cascader
+              v-model="formData.classifyId"
+              :options="classifyOption"
+              clearable
+              placeholder="选择公开分类"
+              style="width: 400px"
+              :props="cascaderProps"
+          />
+        </el-form-item>
+        <el-form-item label="公开理由" v-if="isNeedPublicApprove">
+          <el-input
+            type="textarea"
+            :rows="5"
+            placeholder="请输入公开理由"
+            v-model="formData.reason"
+            style="width:400px"
+          />
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="dia-bot">
+      <el-button type="primary" plain @click="handleClose">取消</el-button>
+      <el-button type="primary" @click="handleConfirm">确定</el-button>
+    </div>
+  </el-dialog>
+
+</div>
+</template>
+<script>
+import { edbBaseV2Interface,chartBaseV2Interface } from '@/api/modules/chartApi';
+export default {
+  props: {
+    show: {
+      type: Boolean
+    },
+    source: { //指标或图库
+      type: String,
+      default: 'edb'
+    },
+    checkedParams: {
+      type: Object
+    }
+  },
+  computed: {
+     cascaderProps() {
+        let options = this.source === 'chart'
+          ? {
+              label: 'ChartClassifyName',
+              value: 'ChartClassifyId',
+              children: 'Children',
+              emitPath: false
+            }
+          : {
+              label: 'ClassifyName',
+              value: 'ClassifyId',
+              children: 'Children',
+              emitPath: false,
+              checkStrictly: true
+            }
+
+        return options
+      },
+  },
+  watch: {
+    show(nval) {
+      if(!nval) return
+
+      this.getApproveAuth()
+      this.getClassifyOpts()
+    }
+  },
+  data() {
+    return {
+      formData: {
+        classifyId: '',
+        reason: ''
+      },
+      classifyOption: [],
+      isNeedPublicApprove: true,//是否需要公开走审批
+    }
+  },
+  methods:{
+    handleClose() {
+      this.formData = {
+        classifyId: '',
+        reason: ''
+      };
+      this.isNeedPublicApprove = true;
+      this.$emit('update:show',false);
+    },
+
+    async handleConfirm() {
+      const res = this.source === 'edb'
+        ? await edbBaseV2Interface.setEdbPublic({
+            EdbInfoList: [{
+              EdbInfoId: this.checkedParams.EdbInfoId,
+              ClassifyId: this.formData.classifyId||0
+            }],
+            Description: this.formData.reason
+          })
+        : await chartBaseV2Interface.setChartPublic({
+            ChartInfoList: [{
+              ChartInfoId: this.checkedParams.ChartInfoId,
+              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 = this.source === 'edb'
+        ? await edbBaseV2Interface.getPublicClassifyBase()
+        : 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
+        }
+      })
+    },
+
+  },
+}
+</script>
+<style scoped lang='scss'>
+.wrap {
+  .el-form {
+    padding: 0 50px;
+  }
+}
+
+.dia-bot {
+  margin: 30px 0;
+  display: flex;
+  justify-content: center;
+  gap: 20px;
+  .el-button {
+    width: 120px;
+  }
+}
+</style>

+ 289 - 0
src/views/dataEntry_manage/sharedComponents/setSharedDia.vue

@@ -0,0 +1,289 @@
+<template>
+<div>
+  <el-dialog
+		:visible.sync="show"
+		:close-on-click-modal="false"
+		:modal-append-to-body="false"
+		@close="handleClose"
+		custom-class="set-shared-dialog"
+		center
+		top="2vh"
+    width="650px"
+		v-dialogDrag
+    :title="`设置${source==='edb'?'指标':'图表'}共享`"
+	>
+    <div class="wrap">
+      <el-form
+        :model="formData"
+        inline
+      >
+        <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-group>
+        </el-form-item>
+        <el-form-item label="共享用户">
+          <el-cascader
+            v-model="formData.users"
+            ref="userRef"
+            :options="usersOptions"
+            :props="{
+              value: 'NodeIdKey',
+              label: 'NodeName',
+              children: 'Children',
+              emitPath: false,
+              multiple: true,
+            }"
+            collapse-tags
+            :show-all-levels="false"
+            clearable
+            @change="checkUser"
+            filterable
+            :placeholder="this.$t('SystemManage.OperateAuth.ph_see_user')" 
+            style="width:300px"
+          />
+        </el-form-item>
+
+      </el-form>
+
+      <div class="checked-user" v-if="selectUserList.length">
+        <el-tag
+          v-for="tag in selectUserList"
+          :key="tag.label"
+          closable
+          @close="removeUser(tag.value)"
+        >
+          {{tag.label}}
+        </el-tag>
+      </div>
+    </div>
+    <div class="dia-bot">
+      <el-button type="primary" plain @click="handleClose">取消</el-button>
+      <el-button type="primary" @click="handleConfirm">保存</el-button>
+    </div>
+  </el-dialog>
+
+  <!-- 提示 -->
+  <el-dialog 
+      :visible.sync="isOpenHintDia"
+      :close-on-click-modal="false"
+      :modal-append-to-body="false"
+      center
+      width="650px"
+      v-dialogDrag
+      top="8vh"
+      title="共享提示"
+      @close="isOpenHintDia=false"
+  >
+      <div class="explain-text" v-html="hintText"></div>
+      <div class="dia-bot">
+        <el-button type="primary" plain @click="isOpenHintDia=false">取消</el-button>
+        <el-button type="primary" @click="handleSetApi">保存</el-button>
+      </div>
+      
+  </el-dialog>
+</div>
+</template>
+<script>
+import { edbBaseV2Interface,chartBaseV2Interface } from '@/api/modules/chartApi';
+import { traverseTree } from "@/utils/commonOptions";
+import { operateAuthInterface,departInterence } from '@/api/modules/setApi';
+export default {
+  props: {
+    show: {
+      type: Boolean
+    },
+    source: { //指标或图库
+      type: String,
+      default: 'edb'
+    },
+    checkedParams: {
+      type: Object
+    }
+  },
+  watch: {
+    show(nval) {
+      if(!nval) return
+      this.getUserList()
+
+      //单设置回显用户
+      if(this.checkedParams.EdbInfoId || this.checkedParams.ChartInfoId ) {
+        this.getSharedUser()
+      }
+    }
+  },
+  computed: {
+    hintText() {
+      let sourceLabel = this.source==='edb'?'指标':'图表';
+      let str = `
+         <p>未选择任何用户,意味着该${sourceLabel}不进行共享,是否确认?</p>
+      `;
+      let batchStr = `
+        <p style='margin-bottom:15px'>未选择任何用户,意味着该${sourceLabel}不进行共享。</p>
+        <p style='margin-bottom:15px'>注意:<span style='color:#f00'>若选中${sourceLabel}中存在已共享${sourceLabel},则此操作(不选任何用户)会取消共享!</span></p>
+        <p>是否确认?</p>
+      `
+     return !this.checkedParams.EdbInfoId ? batchStr : str;
+    }
+  },
+  data() {
+    return {
+      formData: {
+        type: 1,
+        users: []
+      },
+      selectUserList: [],
+      usersOptions: [],
+
+      isOpenHintDia: false,
+    }
+  },
+  methods:{
+    handleClose() {
+      this.formData = {
+        type: 1,
+        users: []
+      };
+      this.selectUserList = [];
+      this.isOpenHintDia = false;
+      this.$emit('update:show',false);
+    },
+
+    handleConfirm() {
+      if(!this.selectUserList.length) return (this.isOpenHintDia = true);
+      this.handleSetApi()
+    },
+
+    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.setChartSharedSingle(params)
+          : await chartBaseV2Interface.setChartSharedBatch(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.getChartSharedUser({ChartInfoId: this.checkedParams.ChartInfoId})
+
+      if(res.Ret !== 200) return
+      
+      this.formData = {
+        type: res.Data.ShareType||1,
+        users: res.Data.List ? res.Data.List.map(_ => String(_.SysUserId)) : []
+      };
+
+      this.$nextTick(() => {
+        this.checkUser()
+      })
+    },
+
+      /* 获取用户列表 */
+    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})
+    },
+
+     // 递归处理数组
+    filterTreeEmpty(arr) {
+      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
+          }
+      }
+      dfs(arr); 
+    },
+    
+    /* 选择用户 */
+    checkUser() {
+      let selectUser = this.$refs.userRef.getCheckedNodes(true);
+      let arr = []
+      arr = selectUser.length?selectUser.map(_ => ({
+        label: _.label,
+        value: _.value
+      })):[]
+      this.selectUserList = arr.filter(_ => this.formData.users.includes(_.value))
+    },
+
+    removeUser(val) {
+      let index = this.selectUserList.findIndex(_ => _.value===val)
+      this.selectUserList.splice(index,1)
+
+      this.formData.users = this.formData.users.filter(_ => _!==val)
+    },
+  },
+}
+</script>
+<style scoped lang='scss'>
+.wrap {
+  .el-form {
+    padding: 0 50px;
+  }
+  .checked-user {
+    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;
+  }
+}
+.explain-text {
+  padding: 50px 30px;
+}
+.dia-bot {
+  margin: 30px 0;
+  display: flex;
+  justify-content: center;
+  gap: 20px;
+  .el-button {
+    width: 120px;
+  }
+}
+</style>

+ 799 - 0
src/views/dataEntry_manage/sharedComponents/setSharedListDialog.vue

@@ -0,0 +1,799 @@
+<template>
+<div>
+  <el-dialog
+		:visible.sync="show"
+		:close-on-click-modal="false"
+		:modal-append-to-body="false"
+		@close="handleClose"
+		custom-class="set-shared-dialog fit-screen-dialog"
+		center
+		top="2vh"
+		v-dialogDrag
+    :title="type==='shared'?`设置共享${sourceLabel}`:`设置${sourceLabel}公开`"
+	>
+      <div class="list-wrap">
+          <p>
+              选择{{sourceLabel}}(一次选择数量不超过{{MAXAddNUM}})
+          </p>
+          <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"
+                  clearable
+                  multiple
+                  collapse-tags
+                  placeholder="请选择数据来源"
+                  @change="handleFilter"
+                >
+                  <el-option
+                    v-for="item in sourceOption"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+
+
+                <el-cascader
+                  v-if="source==='chart'"
+                  v-model="filterObj.chartTypes"
+                  :options="chartTypesOptions"
+                  :show-all-levels="false"
+                  clearable
+                  collapse-tags
+                  :props="{
+                    emitPath:false,
+                    label:'ChartTypeName',
+                    value:'ChartTypeId',
+                    children:'Child',
+                    multiple:true
+                  }"
+                  placeholder="图表类型"
+                  @change="handleFilter"
+                />
+
+                <el-select
+                  v-model="filterObj.listStatus"
+                  style="width: 140px"
+                  clearable
+                  multiple
+                  @change="handleFilter"
+                >
+                  <el-option 
+                    :label="item.label" 
+                    :value="item.value" 
+                    v-for="item in statusOptions" 
+                    :key="item.value"
+                  />
+                </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>
+            
+            <el-button type="primary" style="width:120px" @click="type==='shared'? handleSetShare():handleSetPublic(null,'batch')">批量设置</el-button>
+          </div>
+          <div class="table-wrap">
+              <el-table 
+                  :data="list" 
+                  border
+                  ref="table"
+                  height="550px"
+                  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-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'&&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>
+
+              <div style="height:40px;margin:20px 0;">
+                <m-page
+                    class="table-page"
+                    :total="total" 
+                    :pageSize="filterObj.pageSize"
+                    :page_no="filterObj.pageNo"
+                    @handleCurrentChange="pageChange"
+                />
+              </div>
+          </div>
+      </div>
+  </el-dialog>
+
+  <!-- 设置共享 -->
+  <setSharedDia
+    :show.sync="isSetSharedDia"
+    :checkedParams="checkedParams"
+    :source="source"
+    @confirm="handleSetConfirm"
+  />
+
+  <!-- 设置公开 -->
+  <setPublicDia
+    :show.sync="isSetPublicDia"
+    :checkedParams="checkedParams"
+    :source="source"
+    @confirm="handleSetConfirm"
+  />
+
+  <!-- 批量设置公开 -->
+  <batchSetPublicDia
+    :show.sync="isBatchSetPublicDia"
+    :checkedParams="checkedParams"
+    :source="source"
+    @confirm="handleSetConfirm"
+  />
+</div>
+</template>
+
+<script>
+import mPage from '@/components/mPage.vue'
+import { dataBaseInterface } from '@/api/api.js';
+import { edbBaseV2Interface,chartBaseV2Interface } from '@/api/modules/chartApi';
+import setSharedDia from './setSharedDia.vue';
+import setPublicDia from './setPublicDia.vue';
+import batchSetPublicDia from './batchSetPublicDia.vue';
+export default {
+    components:{ mPage,setSharedDia,setPublicDia,batchSetPublicDia },
+    props:{
+      show:{
+          type: Boolean
+      },
+      source: { //指标或图库
+        type: String,
+        default: 'edb'
+      },
+      type: { //设置类型 设置共享shared 设置公开public
+			  type: Number
+		  },
+    },
+    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: 'Source',
+            show: this.source==='chart'
+          },
+          {
+            label: '计算方式',
+            key: 'SourceName',
+            widthsty:'100px',
+            show: this.source==='edb'
+          },
+          {
+            label: '最新值',
+            key: 'EndValue',
+            widthsty:'100px',
+            show: this.source==='edb'
+          },
+          {
+            label: '频度',
+            key: 'Frequency',
+            widthsty:'100px',
+            show: this.source==='edb'
+          },
+          {
+            label: '共享用户',
+            key: 'SharedUserName',
+            minwidthsty: '180px',
+            show: this.type==='shared'
+          },
+          {
+            label: '公开状态',
+            key: 'PublicStatus',
+            minwidthsty: '180px',
+            show: this.type==='public'
+          },
+        ]
+
+        let filterColumns = columns.filter(_ => _.show);
+
+        return filterColumns;
+      },
+
+      sourceLabel() {
+        return this.source==='edb'?'指标':'图表';
+      },
+
+      cascaderProps() {
+        let options = this.source === 'chart'
+          ? {
+              label: 'ChartClassifyName',
+              value: 'ChartClassifyId',
+              children: 'Children',
+              multiple: true,
+              emitPath: false,
+              checkStrictly: !this.filterObj.relevanceChild
+            }
+          : {
+              label: 'ClassifyName',
+              value: 'ClassifyId',
+              children: 'Children',
+              multiple: true,
+              emitPath: false,
+              checkStrictly: !this.filterObj.relevanceChild
+            }
+
+        return options
+      },
+      
+      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.getClassifyOpts();
+        this.source==='chart' && this.getChartTypes();
+        this.source==='edb' && this.getEdbSources();
+        this.$nextTick(() => {
+          this.getList('init');
+        })
+      }
+    },
+    data() {
+      return {
+        filterObj: {
+          classify: [],
+          relevanceChild:true,
+          pageNo: 1,
+          pageSize: 10,
+          source: [],
+          chartTypes: [],
+          listStatus:[1],
+          keyWord: '',
+          checkAll: false, //控制全选显示状态
+          checkSome: false
+        },
+        sourceOption: [],
+        classifyOption: [],
+        cascaderKey:0,
+        chartTypesOptions: [],
+
+        list: [],
+        total: 0,
+        isSelectAll: false, //真正意义上的全选或不全选
+        checkedList: [], //不全选勾选中的 或 全选取消勾的项
+        selectionReactCancel:false,//手动设置选中中
+
+        checkedParams: {},//选项入参
+        /* 设置共享弹窗 */
+        isSetSharedDia: false,
+        /* 设置公开弹窗 */
+        isSetPublicDia: false,
+        /* 批量设置公开 */
+        isBatchSetPublicDia: false
+      }
+    },
+    
+    methods: {
+
+      /* 获取图表类型 */
+      getChartTypes() {
+        dataBaseInterface.chartTypeList().then(res=>{
+          if(res.Ret!==200) return 
+          this.chartTypesOptions=res.Data.List||[];
+        })
+      },
+
+      /* 获取计算指标类型 */
+      async getEdbSources() {
+        const res = await dataBaseInterface.getDataSource({IsBase:2})
+
+        if(res.Ret !== 200) return
+
+        this.sourceOption = res.Data.map(i=>({
+            label:i.SourceName,
+            value:i.EdbSourceId
+        }))
+      },
+
+      //个人目录 指标/图库
+      async getClassifyOpts() {
+        const res = this.source==='edb'
+          ? await dataBaseInterface.menuListV3({
+              ClassifyType:  2
+            })
+          : await dataBaseInterface.chartClassify()
+
+        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,
+          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(type) {
+        const {
+          pageNo,
+          pageSize,
+          chartTypes,
+          listStatus,
+          keyWord,
+        } = this.filterObj;
+
+        let checkedClassify = this.$refs.classifyRef.getCheckedNodes();
+        let ClassifyIdList = checkedClassify.length 
+          ? checkedClassify.map(_ => _.data.ClassifyId)
+          : []
+
+        let params = {
+          ChartTypeList:chartTypes,
+          Keyword: keyWord,
+          ClassifyIdList,
+          CurrentIndex: pageNo,
+          PageSize: pageSize
+        }
+
+        const res = this.type === 'shared'
+          ? await chartBaseV2Interface.getSharedSearchList({
+              ChartShareList: listStatus,
+              ...params
+            })
+          : await chartBaseV2Interface.getPublicSearchList({
+              ChartPublicList: 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()
+        }
+      },
+
+      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':'');
+      },
+
+      //设置共享
+      handleSetShare(item=null) {
+        if(item) {
+          this.checkedParams = {
+            [this.Idkey]: item[this.Idkey]
+          }
+        }else {
+          if(!this.checkedList.length && !this.isSelectAll) return this.$message.warning(`请选择${this.sourceLabel}`)
+
+          const {
+            source,
+            listStatus,
+            chartTypes,
+            keyWord,
+          } = this.filterObj;
+
+          let checkedClassify = this.$refs.classifyRef.getCheckedNodes();
+          let ClassifyIdList = checkedClassify.length 
+            ? checkedClassify.map(_ => _.data.ClassifyId)
+            : []
+
+          this.checkedParams = this.source === 'chart'
+            ? {
+                ChartShareList: listStatus,
+                ChartTypeList:chartTypes,
+                Keyword: keyWord,
+                ClassifyIdList,
+                IsSelectAll: this.isSelectAll,
+                NoChartIdList: this.isSelectAll ? this.checkedList.map(_ =>_.ChartInfoId) : [],
+                ChartIdList: this.isSelectAll ? [] : this.checkedList.map(_ =>_.ChartInfoId)
+              }
+            : {
+                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 = {
+            [this.Idkey]: item[this.Idkey]
+          }
+          this.isSetPublicDia = true;
+        }else { //批量
+          if(!this.checkedList.length && !this.isSelectAll) return this.$message.warning(`请选择${this.sourceLabel}`)
+
+          const {
+            source,
+            listStatus,
+            chartTypes,
+            keyWord,
+          } = this.filterObj;
+
+          let checkedClassify = this.$refs.classifyRef.getCheckedNodes();
+          let ClassifyIdList = checkedClassify.length 
+            ? checkedClassify.map(_ => _.data.ClassifyId)
+            : []
+
+          this.checkedParams = this.source === 'chart'
+            ? {
+                ChartPublicList: listStatus,
+                ChartTypeList:chartTypes,
+                Keyword: keyWord,
+                ClassifyIdList,
+                IsSelectAll: this.isSelectAll,
+                NoChartIdList: this.isSelectAll ? this.checkedList.map(_ =>_.ChartInfoId) : [],
+                ChartIdList: this.isSelectAll ? [] : this.checkedList.map(_ =>_.ChartInfoId)
+              }
+            : {
+                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.isSelectAll = false;
+        this.checkedList = [];
+        this.filterObj.checkAll = false;
+        this.filterObj.checkSome = false;
+        this.getList();
+      },
+
+      /* 设置当页数据勾选状态 */
+      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: [],
+          listStatus:[1],
+          keyWord: '',
+          checkAll: false, //控制全选显示状态
+          checkSome: false
+        }
+        this.list = [];
+        this.isSelectAll = false;
+        this.checkedList = [];
+        this.selectionReactCancel =false;
+        this.$emit('update:show',false)
+      }
+    },
+}
+</script>
+
+<style lang="scss" scoped>
+.set-shared-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;
+      }
+    }
+}
+</style>

+ 100 - 0
src/views/dataEntry_manage/sharedComponents/sharedMenu.vue

@@ -0,0 +1,100 @@
+<template>
+  <div class="shared-classify">
+    <div class="section-item">
+      <div class="tree-title">我共享的</div>
+      <div class="shared-tree">
+        <el-tree
+          ref="sharedTree"
+          :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,treeName:'shared'})}"
+        >
+            <div class="custom-tree-node" slot-scope="{ data }">
+                <span class="tree-label">{{ source==='edb'?data.ClassifyName:data.ChartClassifyName }}</span>
+            </div>
+        </el-tree>
+      </div>
+    </div>
+
+    <div class="section-item receive-item">
+      <div class="tree-title">收到共享</div>
+      <div class="shared-tree">
+        <el-tree
+          ref="receiveTree"
+          :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,treeName:'sharedReceive'})}"
+        >
+            <div class="custom-tree-node" slot-scope="{ data }">
+                <span class="tree-label">{{ source==='edb'?data.ClassifyName:data.ChartClassifyName }}</span>
+            </div>
+        </el-tree>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+import { edbBaseV2Interface,chartBaseV2Interface } from '@/api/modules/chartApi';
+export default {
+  props: {
+    source: { //指标或图库
+      type: String,
+      default: 'edb'
+    }
+  },
+  data() {
+    return {
+      sharedClassifys: [],
+      receiveSharedClassifys: []
+    }
+  },
+  mounted(){
+    this.getSharedClassify()
+  },
+  methods:{
+    async getSharedClassify() {
+      const res = this.source === 'edb'
+        ? await edbBaseV2Interface.getSharedClassify()
+        : await chartBaseV2Interface.getSharedClassify()
+      if(res.Ret !== 200) return
+
+      this.sharedClassifys = res.Data.Send || [];
+      this.receiveSharedClassifys = res.Data.Received || [];
+    }
+  },
+}
+</script>
+<style scoped lang='scss'>
+.shared-classify {
+  height: 100%;
+  .section-item {
+    height: 50%;
+    display: flex;
+    flex-direction: column;
+    padding-bottom: 15px;
+    &.receive-item {
+      border-top: 1px solid #C8CDD9;
+    }
+    .tree-title {
+      font-size: 15px;
+      margin: 15px 0;
+    }
+    .shared-tree {
+      flex: 1;
+      overflow: auto;
+    }
+  }
+}
+</style>

+ 6 - 1
src/views/datasheet_manage/sheetList.vue

@@ -19,6 +19,7 @@
           <el-button v-if="permissionBtn.checkPermissionBtn(permissionBtn.etaTablePermission.etaTable_customize_balance_sheetAdd)&&sourceMap[$route.path]===5" type="primary" @click="showAddBalanceTable=true">{{$t('OnlineExcelPage.add_balance_table_btn')}}</el-button >
 
           <el-checkbox 
+            v-if="!showOnlyMeDefault"
             v-model="isShowMe"
             style="margin-left:20px"
             @change="() => { getTreeData();getPublicList() }"
@@ -490,6 +491,10 @@ export default {
           { required: true, message: this.$t('OnlineExcelPage.cannot_be_empty_table') , trigger: "blur" },
         ],
       }
+    },
+    /* 是否默认只看我的 */
+    showOnlyMeDefault() {
+      return ['/sheetTimeList','/sheetMixedList'].includes(this.$route.path)
     }
   },
   data() {
@@ -549,7 +554,7 @@ export default {
       autoSaveType:'',//自动保存类型,有的自动保存后需要其他操作
       cancelAutoSave:false, //自动保存时延迟的
 
-      isShowMe: false,//只看我的
+      isShowMe: this.showOnlyMeDefault?true:false,//只看我的
 
       sheetRefreshing:false,//表格刷新状态
 

+ 3 - 3
src/views/intervalAnalysis/list.vue

@@ -17,7 +17,7 @@
         </div>
 
         <div class="search-cont">
-          <el-checkbox
+          <!-- <el-checkbox
             v-permission="permissionBtn.statisticPermission.rangeAnalysis_onlyMine"
             v-model="isShowMe"
             @change="
@@ -29,7 +29,7 @@
             >{{
               $t("StatisticAnalysis.ChartRelevance.only_see_mine")
             }}</el-checkbox
-          >
+          > -->
           <el-select
             v-model="search_txt"
             v-loadMore="searchLoad"
@@ -437,7 +437,7 @@ export default {
     return {
       showData: false,
       refreshLoading: false,
-      isShowMe: false,
+      isShowMe: true,
       search_txt: '',
       searchOptions: [],
       isSlideLeft: false,//左侧分类收起

+ 3 - 3
src/views/predictEdb_manage/predictEdb.vue

@@ -49,8 +49,8 @@
 				</div>
         <div style="margin:20px 0;padding:0 20px;display:flex;justify-content:space-between">
 					<span><!-- 目录 -->{{$t('Common.category')}}</span>
-					<el-checkbox v-model="isOnlyMe" v-permission="permissionBtn.predictEdbPermission.edbPreData_isOnlyMine"
-						@change="onlyMeHandler"><!-- 只看我的 -->{{$t('PredictEdbPage.only_see_mine')}}</el-checkbox>
+					<!-- <el-checkbox v-model="isOnlyMe" v-permission="permissionBtn.predictEdbPermission.edbPreData_isOnlyMine"
+						@change="onlyMeHandler">{{$t('PredictEdbPage.only_see_mine')}}</el-checkbox> -->
 				</div>
 				<div class="tree-cont">
 					<div class="target_tree">
@@ -609,7 +609,7 @@ export default {
 			computed_source: 1,//计算类型 1常规 2批量
 			isBatchComputed: false,//批量计算弹窗
 
-      isOnlyMe:false,//只看我的
+      isOnlyMe:true,//只看我的
 
 			/* 查看历史弹窗 */
 			isLookHistory: false,

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

@@ -495,7 +495,8 @@ import { calculateOption } from "../../common/options"
         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;

+ 5 - 5
src/views/system_manage/dataOperaAuth.vue

@@ -6,7 +6,7 @@
           v-model="currAuthSet"
           @change="changeSet"
         >
-          <el-option :label="$t('SystemManage.OperateAuth.set_assets_tab')" :value="1"/>
+          <!-- <el-option :label="$t('SystemManage.OperateAuth.set_assets_tab')" :value="1"/> -->
           <el-option :label="$t('SystemManage.OperateAuth.set_data_tab')" :value="2"/>
         </el-select>
         <el-cascader
@@ -302,10 +302,10 @@ export default {
     tabs(){
       const tabs = [
         { label: '数据查看', key: 3 },
-        { label: '指标加工', key: 7 },
-        { label: '衍生指标', key: 4 },
-        { label: this.$t('SystemManage.OperateAuth.tab05'), key: 5 },
-        { label: this.$t('SystemManage.OperateAuth.tab06'), key: 6 },
+        // { label: '指标加工', key: 7 },
+        // { label: '衍生指标', key: 4 },
+        // { label: this.$t('SystemManage.OperateAuth.tab05'), key: 5 },
+        // { label: this.$t('SystemManage.OperateAuth.tab06'), key: 6 },
       ]
       return this.currAuthSet===1 ? tabs : tabs.filter(item => [3,4,5,6,7].includes(item.key))
     },

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.