Browse Source

Merge branch 'gn2.3' into debug

shanbinzhang 1 ngày trước cách đây
mục cha
commit
2a3e928b16

+ 20 - 2
src/components/edb/edbSelectSearch.vue

@@ -17,7 +17,12 @@
   >
     <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-group 
+        v-model="searchType" 
+        size="mini" 
+        @input="searchApi(current_search)"
+        v-if="!search_txt"
+      >
         <el-radio-button label="0">全部</el-radio-button>
         <el-radio-button label="1">收藏</el-radio-button>
       </el-radio-group>
@@ -57,6 +62,18 @@ export default {
     style: {
       type: String,
       default:''
+    },
+    defaultVal: {
+      type: String,
+      default: ''
+    },
+    defaultOpt: {
+      type: Array,
+      default: () => []
+    },
+    params: {  //额外的请求参
+      type:Object,
+      default: () =>{}
     }
   },
   data() {
@@ -92,7 +109,8 @@ export default {
 			dataBaseInterface.targetSearchByPage({
 				KeyWord:query,
 				CurrentIndex: page,
-        EdbCollect: this.searchType
+        EdbCollect: this.searchType,
+        ...this.params
 			}).then(res => {
 				if(res.Ret !== 200) return
 

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

@@ -92,6 +92,7 @@
 								</el-option>
 							</el-select>
 							
+							<!-- 指标库搜索 -->
 							<edbSelectSearch 
 								v-else
 								style="width:90%;margin-top: 10px;display: block;"

+ 13 - 9
src/views/dataEntry_manage/chartSetting.vue

@@ -1050,7 +1050,7 @@ export default {
     },
   },
   methods: {
-    //控制页面按钮权限
+    //控制页面按钮权限  key编码code
 		isBtnShow(key){
 			const {chartLibPermission,checkPermissionBtn}=this.permissionBtn
 
@@ -2327,9 +2327,19 @@ export default {
 
       if(this.classifyShowType === 'shared') {//共享
         res = await chartBaseV2Interface.getSharedChartList({
-					FilterSource: this.currentTreeName==='sharedReceive' ? 1 : 0
+					FilterSource: this.currentTreeName==='sharedReceive' ? 1 : 0,
+          PageSize: this.public_page_size,
+          CurrentIndex: this.public_page_no,
+          ClassifyId: this.default_classify || 0,
 				})
-      }else { //其他走es
+      }else if(this.classifyShowType==='own'&&this.currentTreeName==='collect'){ //收藏列表
+				res = await chartBaseV2Interface.getCollectChart({
+					PageSize: this.public_page_size,
+          CurrentIndex: this.public_page_no,
+          ClassifyId: this.default_classify || 0,
+					KeyWord: '',
+				})
+			}else { //其他走es
         let ChartAuth = 0;
 				if(this.classifyShowType==='own') { //我的
 					ChartAuth = 1;
@@ -2337,18 +2347,12 @@ export default {
 					ChartAuth = 2;
 				}
 
-				let ChartCollect = 0;
-				if(this.classifyShowType==='own'&&this.currentTreeName==='collect') {
-					ChartCollect = 1
-				}
-
         res = await dataBaseInterface.chartSearchByEs({
             PageSize: this.public_page_size,
             CurrentIndex: this.public_page_no,
             ClassifyId: this.default_classify || 0,
             Keyword: this.search_txt,
             ChartAuth,
-            ChartCollect
           })
       }
 

+ 10 - 2
src/views/dataEntry_manage/databaseComponents/edbCollectDia.vue

@@ -24,9 +24,11 @@
             {{ item.ClassifyName }}
           </el-tag>
         </div>
-        <span class="add-cont" @click="$parent.handleOpenCollectClassify">
+        <div class="add-cont" @click="$parent.handleOpenCollectClassify">
           <i class="el-icon-circle-plus-outline" />新增
-        </span>
+        </div>
+
+        <p>提示:收藏后的指标,请在{{collectPath}}查看</p>
       </div>
       <div class="dia-bot">
         <el-button type="primary" style="margin-right: 20px" plain @click="cancelHandle">{{$t('Dialog.cancel_btn')}}</el-button>
@@ -59,6 +61,11 @@ export default {
       default: 'edb'
     },
 	},
+  computed: {
+    collectPath() {
+      return this.source === 'edb' ? '指标加工/我的指标/收藏指标' : '图库/我的图表/收藏图表'
+    }
+  },
 	watch: {
 		show(newval) {
 			if(newval) {
@@ -151,6 +158,7 @@ export default {
     .add-cont {
       color: #0052D9;
       cursor: pointer;
+      margin-bottom: 10px;
     }
   }
   .dia-bot {

+ 13 - 8
src/views/dataEntry_manage/databaseList.vue

@@ -1201,7 +1201,17 @@ export default {
 			
 			if(this.classifyShowType==='shared') { //共享列表
 				res = await edbBaseV2Interface.getSharedEdbList({
-					FilterSource: this.currentTreeName==='sharedReceive' ? 1 : 0
+					FilterSource: this.currentTreeName==='sharedReceive' ? 1 : 0,
+					PageSize:this.PageSize,
+					CurrentIndex:this.CurrentIndex,
+					ClassifyId:this.select_classifyId,
+				})
+			}else if(this.classifyShowType==='own'&&this.currentTreeName==='collect'){ //收藏列表
+				res = await edbCollectInterface.getCollectEdb({
+					PageSize:this.PageSize,
+					CurrentIndex:this.CurrentIndex,
+					ClassifyId:this.select_classifyId,
+					KeyWord: '',
 				})
 			}else{// 列表走es
 
@@ -1212,17 +1222,12 @@ export default {
 					EdbAuth = 2;
 				}
 
-				let EdbCollect = 0;
-				if(this.classifyShowType==='own'&&this.currentTreeName==='collect') {
-					EdbCollect = 1
-				}
 				let params = {
 					PageSize:this.PageSize,
 					CurrentIndex:this.CurrentIndex,
 					ClassifyId:this.select_classifyId,
 					KeyWord: this.search_txt,
-					EdbType: EdbCollect===1 ? '0' : (this.isBasicBase?'1':'2'),
-					EdbCollect,
+					EdbType: this.isBasicBase?'1':'2',
 					EdbAuth
 				}
 
@@ -1239,7 +1244,7 @@ export default {
 				this.IsListEnd = res.Data.Paging.IsEnd
 			}
 
-			if(type==='pageChange'){
+			if(type==='pageChange'&&this.isBasicBase){
 				//页码变化 选中项不做清空
 				this.$refs.edbTableListRef && this.$nextTick(() => {
 					this.$refs.edbTableListRef.checkedSomeSelection()

+ 8 - 0
src/views/dataEntry_manage/editChart.vue

@@ -64,6 +64,7 @@
 								</el-radio-group>
 							</div>
 							<el-select
+								v-if="edbFromType===1"
 								v-model="search_txt"
 								v-loadMore="searchLoad"
 								ref="searchRef"
@@ -98,6 +99,13 @@
 									</edbDetailPopover>
 								</el-option>
 							</el-select>
+
+							<!-- 指标库搜索 -->
+							<edbSelectSearch 
+								v-else
+								style="width:90%;margin-top: 10px;display: block;"
+								@change="selectTarget"
+							/>
 						</div>
 					</el-form-item>
 

+ 2 - 2
src/views/dataEntry_manage/sharedComponents/setSharedListDialog.vue

@@ -314,8 +314,8 @@ export default {
       //公开状态
       publicStatusLabel() {
         return new Map([
-          [0,''],
-          [1,'未公开'],
+          [0,'未公开'],
+          [1,'已提交'],
           [2,'已提交'],
           [3,'已公开'],
         ])