shanbinzhang 2 hete
szülő
commit
f57fe88d7d

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

@@ -1470,9 +1470,205 @@ 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 
+	 */
+	sharedEdbList: params => {
+		return http.get('/datamanage/edb_info/share/tree',params)
+	},
+
+	/**
+	 * 设置共享弹窗列表
+	 * @param {*} params 
+	 *  "EdbShareList": [],
+			"SourceList":[37,62],
+			"Keyword": "拟合残差",
+			"ClassifyIdList":[2386,1389],
+			"CurrentIndex": 1,
+	 * @returns 
+	 */
+	getSharedSearchList: params => {
+		return http.post('/datamanage/edb_info/share/list_by_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],
+    "CurrentIndex": 1,
+    "PageSize": 20
+	 * @returns 
+	 */
+	getPublicSearchListAll: params => {
+		return http.post('/datamanage/edb_info/public/list/es/all',params)
+	},
+
+	/**
+	 * 获取指标公开时当前用户是否要审批
+	 * @param {*} params 
+	 * @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)
+	}
+
+}
+
+
+/* 图库拆分我的 共享 公共后新接口 */
+const chartBaseV2Interface = {
+
+}
+
 export {
 	dataBaseInterface,
 	mychartInterface,
 	chartFrameInterface,
-	edbCollectInterface
+	edbCollectInterface,
+	edbBaseV2Interface,
+	chartBaseV2Interface
 }

+ 1 - 1
src/views/dataEntry_manage/databaseComponents/edbTableList.vue

@@ -77,7 +77,7 @@
 
       <el-table-column label="收藏状态" key="CollectStatu" align="center" v-else min-width="150">
         <template slot-scope="{row}">
-          <span>已收藏至{{'宏观'}},继续</span>
+          <span v-if="row.CollectClassifyIdList">已收藏至{{'宏观'}},继续</span>
           <span class="editsty" @click="$emit('collect',row)">收藏</span>
         </template>
       </el-table-column>

+ 3 - 0
src/views/dataEntry_manage/databaseComponents/openDialog.vue

@@ -102,6 +102,9 @@ export default {
 		},
 		isBasicBase: {
 			type: Boolean
+		},
+		classifyShowType: { //分类类型
+			type: String
 		}
 	},
 	watch: {

+ 10 - 9
src/views/dataEntry_manage/databaseList.vue

@@ -33,7 +33,6 @@
 					<el-option
 						v-for="item in searchOptions"
 						:key="item.EdbInfoId"
-						:label="currentLang==='en'?(item.EdbNameEn||item.EdbName):item.EdbName"
 						:value="item.EdbInfoId"
 					>
 						<div>
@@ -44,7 +43,7 @@
 								style="vertical-align:middle" 
 								v-if="!item.HaveOperaAuth"
 							/>
-							{{currentLang==='en'?(item.EdbNameEn||item.EdbName):item.EdbName}}
+							{{item.EdbName}}
 						</div>
 					</el-option>
 				</el-select>
@@ -211,7 +210,7 @@
 										<span>{{$t('EtaBasePage.add_first_menu_btn')}}</span>
 									</div>
 									<!-- 移动指标 -->
-									<div class="opt-item">
+									<div class="opt-item" v-if="!isBasicBase">
 										<img
 											src="~@/assets/img/set_m/move_batch_ico.png"
 											alt=""
@@ -219,7 +218,7 @@
 										/>
 										<span>批量移动指标</span>
 									</div>
-									<template v-if="classifyShowType==='own'">
+									<template v-if="classifyShowType==='own'&&!isBasicBase">
 										<!-- 共享指标 -->
 										<div class="opt-item" @click="handleOpenSetShared('shared')">
 											<img
@@ -329,9 +328,9 @@
 							<el-button 
 								v-if="isEdbBtnShow('edbData_edbCollect_collect')"
 								type="text"
-								:style="classifyShowType==='own'?'color:#D54941':''"
-								@click="classifyShowType==='own'?handleRemoveCollect():handleCollectEdb(EdbData)" 
-							>{{classifyShowType==='own'?'移出':'收藏'}}</el-button>
+								:style="EdbData.CollectClassifyIdList.length?'color:#D54941':''"
+								@click="EdbData.CollectClassifyIdList.length?handleRemoveCollect():handleCollectEdb(EdbData)" 
+							>{{EdbData.CollectClassifyIdList.length?'移出':'收藏'}}</el-button>
 							<el-button 
 								v-if="isEdbBtnShow('update')"
 								type="text" 
@@ -478,11 +477,12 @@
 
 
 		<!-- 目录弹窗 -->
-		<openDialog 
+		<openDialog
 			:isOpenDialog="isOpenDialog"
 			:title="dialog_title"
 			:isBasicBase="isBasicBase"
 			:formData="dialogForm"
+			:classifyShowType="classifyShowType"
 			@closeDia="isOpenDialog=false"
 			@sucessCallback="sucessCallback"
 		/>
@@ -1260,7 +1260,8 @@ export default {
 			dataBaseInterface.targetSearchByPage({
 				KeyWord:query,
 				CurrentIndex: page,
-				EdbType: this.isBasicBase?1:2
+				EdbType: this.isBasicBase?1:2,
+				EdbAuth: this.isBasicBase?0:(this.classifyShowType==='own'?1:2)
 			}).then(res => {
 				if(res.Ret !== 200) return