Преглед изворни кода

图表设置共享公开审批收藏

shanbinzhang пре 1 недеља
родитељ
комит
2ae29dd9ec

+ 100 - 5
src/api/modules/chartApi.js

@@ -1706,7 +1706,7 @@ const chartBaseV2Interface = {
 	},
 
 	/**
-	 * 分享指标列表
+	 * 分享列表
 	 * @param {*} params ClassifyId 
 	 * FilterSource 0:我共享的;1:别人共享给我的
 	 * @returns 
@@ -1807,7 +1807,7 @@ const chartBaseV2Interface = {
 
 	/**
 	 * 删除公开分类校验
-	 * @param {*} params ClassifyId
+	 * @param {*} params ChartClassifyId
 	 * @returns 
 	 */
 	delPublicedClassifyCheck: params => {
@@ -1816,7 +1816,7 @@ const chartBaseV2Interface = {
 
 	/**
 	 * 删除公开分类
-	 * @param {*} params 
+	 * @param {*} params ChartClassifyId
 	 * @returns 
 	 */
 	delPublicedClassify: params => {
@@ -1893,7 +1893,7 @@ const chartBaseV2Interface = {
 	 * @returns 
 	 */
 	movePublicBatch: params => {
-		return http.post('/datamanage/chart_info/public/save',params)
+		return http.post('/datamanage/chart_info/public/batch_move',params)
 	},
 
 	/**
@@ -1903,7 +1903,102 @@ const chartBaseV2Interface = {
 	 */
 	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 {

+ 11 - 0
src/utils/buttonConfig.js

@@ -851,6 +851,11 @@ export const approveFlowPermission = {
     reportApprove_remove:'reportApprove:remove',//删除
     reportApprove_edit:'reportApprove:edit',//编辑审批流(按钮)
     reportApprove_add:'reportApprove:add',//添加审批流
+
+    /* 指标审批流 */
+    edbApproveFlow_edit:"edbApproveFlow:edit",
+    /* 图表审批流 */
+    chartApproveFlow_edit:"chartApproveFlow:edit",
 }
 /*
  * --------------------------------------------------------------------------审批管理------------------------------------------------
@@ -865,6 +870,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',
 }
 
 /* 图表主题配置 */

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

@@ -25,14 +25,7 @@
                     placeholder="选择分类"
                     cascaderWidth="width: 240px"
                     @change="handleCurrentChange(1)"
-                    :props="{
-                        label: 'ClassifyName',
-                        value: 'ClassifyId',
-                        children: 'Children',
-                        multiple:true,
-                        emitPath: false,
-                        checkStrictly:false
-                    }"
+                    :props="cascaderProps"
                 />
                 
                 <!-- bi分类 -->
@@ -189,7 +182,6 @@ export default {
             const columns = [
                 { label: '审批名称',key:'Title',show: true },
                 { label: '提交人',key:'ApplyUserName',show: ['processed','pending'].includes(this.activeTab) },
-                { label: '申请至公开目录',key:'ApplyUserName',show: this.activeTab==='originate' },
                 { label: '提交时间',key:'CreateTime',show: true,sortable:true },
                 { label: '审批状态',key:'RecordState',show: this.activeTab==='pending' },
                 { label: '处理时间',key:'HandleTime',show: ['processed','originate'].includes(this.activeTab) },
@@ -207,13 +199,34 @@ export default {
                 '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:[
-                { label:'指标审批',name:'edb' },
-                { label:'图表审批',name:'chart' },
+            mainTabs:[],
+            allAuthTabs: [
+                { label:'指标审批',name:'edb',authCode: 'edbApprove_edit' },
+                { label:'图表审批',name:'chart',authCode: 'chartApprove_edit' },
             ],
             activeMainTab:'',
             activeTab: 'pending',
@@ -378,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'),
@@ -405,9 +417,9 @@ export default {
            }
            this.activeTab = formTypeMap[formType]||'pending'
            this.tableColumns = ['edb','chart'].includes(this.activeMainTab) ? this.edbTableColumns : columnsMap[`${this.activeTab}_${this.activeMainTab}`];
-           this.getTableData()
-           
-            this.getClassifyOptions()
+
+           ['edb','chart'].includes(this.activeMainTab) && this.getClassifyOptions()
+           this.getTableData();
         },
     },
     mounted(){

+ 9 - 8
src/views/approve_manage/approveSetting.vue

@@ -196,9 +196,10 @@ export default {
             page:1,
             pageSize:10,
             total:0,
-            mainTabs:[
-                { label:'指标审批',name:'edb' },
-                { label:'图表审批',name:'chart' },
+            mainTabs:[],
+            allAuthTabs: [
+                { label:'指标审批',name:'edb',authCode: 'edbApproveFlow_edit' },
+                { label:'图表审批',name:'chart',authCode: 'chartApproveFlow_edit' },
             ],
             activeMainTab:'', //report-研报审批  bi-bi看板审批
             dataLoading:false,
@@ -340,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;
            

+ 264 - 215
src/views/dataEntry_manage/chartSetting.vue

@@ -92,7 +92,7 @@
                       :load="getLazyTreeData"
                       @node-expand="handleNodeExpand"
                       @node-collapse="handleNodeCollapse"
-                      @current-change="nodeChange"
+                      @current-change="(data,node)=>{nodeChange({data,node,treeName:classifyShowType})}"
                       @node-drop="dropOverHandle"
                       @node-drag-end="dropMouseLeave"
                       @node-drag-leave="dropMouseLeave"
@@ -168,7 +168,7 @@
 										<span>添加图表分类</span>
 									</div>
 									<!-- 移动图表 -->
-									<div class="opt-item">
+									<div class="opt-item" @click="isOpenBatchMoveDialog=true">
 										<img
 											src="~@/assets/img/set_m/move_batch_ico.png"
 											alt=""
@@ -225,7 +225,7 @@
             </div>
 
             <!-- 共享指标目录 -->
-            <div class="tree-cont"
+            <div class="tree-cont shared-cont"
               v-else-if="classifyShowType==='shared'"
             >
                 <sharedMenu source="chart"/>
@@ -466,6 +466,18 @@
                           <i class="el-icon-share"/>&nbsp;<!-- 分享 -->
                           {{$t('Chart.chart_share_btn')}}
                         </li>
+
+                        <li
+                          class="span-item"
+                          @click="handleCollectEdb"
+                        >
+                          <img
+                            :src="$icons.chart_join_ico"
+                            alt=""
+                            style="width: 13px; height: 12px; vertical-align: middle"
+                          />
+                          收藏
+                        </li>
                     
                         <li 
                           v-permission="permissionBtn.chartLibPermission.chartLib_refresh"
@@ -644,7 +656,6 @@
               <div class="chart-list-item-wrap">
                   <div class="chart-list-item" v-for="chart in chartPublicList" :key="chart.ChartInfoId">
                       <div class="chart-item-top" style="position:relative;">
-                          <!-- <div class="chartEn-mark" v-show="chart.IsEnChart">En</div> -->
                           <span class="text_oneLine" :style="{'padding-left':chart.IsEnChart?'24px':''}">{{ currentLang === 'en' ? (chart.ChartNameEn||chart.ChartName) : chart.ChartName }}</span>
                       </div>
                       <div class="chart-item-img" @click="detailShowHandle(chart)"
@@ -664,11 +675,11 @@
     </div>
     <!-- 目录弹窗 -->
     <chartDialog
-      :isOpenDialog="isOpenDialog"
+      :isOpenDialog.sync="isOpenDialog"
       :title="dialog_title"
       :formData="dialogForm"
-      @closeDia="isOpenDialog = false"
-      @sucessCallback="sucessCallback"
+      :classifyShowType="classifyShowType"
+      @sucessCallback="handleConfirmClassify"
     />
     <!-- 日期端选择弹窗 -->
     <DateChooseDia
@@ -743,22 +754,22 @@
     </el-dialog>
 
 
-    <!-- 图表收藏弹窗 -->
+    <!-- 图表收藏弹窗 复用指标的-->
 		<edbCollectDia
       source="chart"
 			ref="edbCollectRef"
 			:show.sync="isOpenEdbCollectDia"
-			:edbId="collectEdbForm.edbId"
+			:id="collectEdbForm.chartId"
 			:add_ids="collectEdbForm.collectClassifyIdList"
-			@success="arr=>{chartInfo.CollectClassifyIdList = arr}"
+			@confirm="arr=>{chartInfo.CollectClassifyIdList = arr}"
 		/>
 
-    <!-- 添加收藏分类弹窗 -->
+    <!-- 添加收藏分类弹窗 复用指标的-->
 		<addCollectClassifyDia
       source="chart"
 			:show.sync="isOpenCollectClassifyDia"
 			:form="collectClassifyForm"
-			@confirm="getTreeData();isOpenEdbCollectDia&&$refs.edbCollectRef.getClassify()"
+			@confirm="getCollectClassifys();isOpenEdbCollectDia&&$refs.edbCollectRef.getClassify()"
 		/>
 
 		<!-- 设置公开共享列表弹窗 -->
@@ -768,16 +779,22 @@
 			:type="sharedType"
 			@change="getTreeData"
 		/>
+
+    <!-- 批量移动接口 -->
+		<batchMoveDialog 
+      source="chart"
+			:show.sync="isOpenBatchMoveDialog"
+			:classifyShowType="classifyShowType"
+			@confirm="getTreeData"
+		/>
   </div>
 </template>
 
 <script>
 import { dataBaseInterface, mychartInterface } from '@/api/api.js';
-import {
-  copyOtherOptions
-} from '@/utils/defaultOptions';
+import { copyOtherOptions } from '@/utils/defaultOptions';
 import { chartSetMixin } from './mixins/chartPublic';
-import { edbCollectInterface } from '@/api/modules/chartApi';
+import { edbCollectInterface,chartBaseV2Interface } from '@/api/modules/chartApi';
 import mPage from '@/components/mPage';
 import Chart from './components/chart';
 import chartDialog from './components/chartDialog';
@@ -792,6 +809,7 @@ import edbCollectDia from './databaseComponents/edbCollectDia.vue';
 import addCollectClassifyDia from './databaseComponents/addCollectClassifyDia.vue';
 import sharedMenu from './sharedComponents/sharedMenu.vue';
 import setSharedListDialog from './sharedComponents/setSharedListDialog.vue';
+import batchMoveDialog from './components/batchMoveDialog.vue';
 export default {
   name: '',
   components: {
@@ -808,7 +826,8 @@ export default {
     sharedMenu,
     setSharedListDialog,
     edbCollectDia,
-    addCollectClassifyDia
+    addCollectClassifyDia,
+    batchMoveDialog
   },
   directives: {
     drag(el, bindings) {
@@ -850,7 +869,6 @@ export default {
       loading: null,
       selected_chartid: '', //当前选中的图表id
       selected_chartClassify: '', //当前选中的图表所属分类
-      new_label: '', //新的节点label值
       select_node: '', //当前选中的节点
       /* 右侧 */
       chartInfo: {}, //图表信息
@@ -876,7 +894,7 @@ export default {
       publicHaveMove: true, // 是否还有下一页
       default_classify: '',
       public_page_no: 1,
-      public_page_size: 12,
+      public_page_size: 20,
       public_total: 0,
       chartPublicList: [],
       isAddMyChart: false, //加入图库弹窗
@@ -911,6 +929,7 @@ export default {
 				{ label: '公共图表',key: 'public' },
 			],
 			classifyShowType:'own',
+      currentTreeName: 'own',//当前点击的分类树 4块 列表请求接口不同  own public collect sharedReceive sharedSend
 			
 			collectClassifys:[],//收藏目录
 			//指标收藏弹窗
@@ -923,6 +942,9 @@ export default {
 			/* 设置共享弹窗 */
 			isOpenSetSharedDia: false,
 			sharedType:'',//shared/public
+
+      //批量移动弹窗
+			isOpenBatchMoveDialog: false
     };
   },
   watch: {
@@ -940,7 +962,7 @@ export default {
       if(this.$refs.listChartPage) this.$refs.listChartPage.scrollTop = 0;
       if (newval) {
         this.public_page_no = 1;
-        this.getPublicChartList();
+        this.getChartList();
       }
     },
     selected_chartid(newval) {
@@ -1024,41 +1046,36 @@ export default {
       const LINK_CHART_URL = this.$setting.dynamicOutLinks.ChartViewUrl+'/chartshow';
       return `${LINK_CHART_URL}?code=${this.chartInfo.UniqueCode}&fromType=share&lang=${this.currentLang}`
     },
-
-    leftTabs() {
-      return [
-        {label: this.$t('EtaChartPage.tab_classify'),val:'目录'},
-        {label: this.$t('EtaChartPage.tab_series'),val:'坐标轴'}
-      ]
-    }
   },
   methods: {
-    getTreeData(params) {
-      dataBaseInterface.chartClassify({IsShowMe:this.isOnlyMe}).then((res) => {
-        if (res.Ret === 200) {
-          this.showData = true;
+    /* 获取目录 我的/公共目录 */
+    async getTreeData(params) {
+      const res = this.classifyShowType === 'public'
+				? await chartBaseV2Interface.getPublicClassifyBase()
+				: await dataBaseInterface.chartClassify({IsShowMe:this.isOnlyMe});
 
-          const arr=res.Data.AllNodes || [];
-          this.treeData = arr.map(item=>{
-						return {
-							...item,
-							isLeaf:item.Children.length?false:true,
-						}
-					})
+        if (res.Ret !== 200)  return
+
+        this.showData = true;
+        const arr=res.Data.AllNodes || [];
+        this.treeData = arr.map(item=>{
+          return {
+            ...item,
+            isLeaf:item.Children.length?false:true,
+          }
+        })
 
-          this.CanOpClassify = res.Data.CanOpClassify;
+        this.CanOpClassify = res.Data.CanOpClassify;
 
-          this.$nextTick(() => {
-            /* 新增完成后 处理树展开和选中图表 */
-            params && this.selectCurrentNode(params);
-          });
-        }
-      });
+        this.$nextTick(() => {
+          /* 新增完成后 处理树展开和选中图表 */
+          params && this.selectCurrentNode(params);
+        });
     },
     /* 节点变化时 */
-    nodeChange(data, node) {
+    nodeChange({data, node,treeName}) {
+      this.currentTreeName=treeName;
       this.search_txt = '';
-      this.dynamicNode = node;
       sessionStorage.removeItem('beforeOptions');
       //详情时判断是否是本人添加图表 若不是不用做保存校验 新增时要进入保存校验逻辑
       if (
@@ -1126,11 +1143,6 @@ export default {
       this.default_classify = !data.ChartInfoId ? data.ChartClassifyId : '';
     },
    
-    // 只看我的 复选框改变事件
-    onlyMeHandler(){
-      this.getTreeData();
-      this.getPublicChartList()
-    },
     /* 添加一级目录 */
     addLevelOneHandle() {
       this.dialog_title = '添加';
@@ -1191,80 +1203,85 @@ export default {
       this.isOpenDialog = true;
     },
     /* 删除节点校验 */
-    removeNode(node, data) {
-      dataBaseInterface
-        .delChartCheck({
-          ChartClassifyId: data.ChartClassifyId,
-          ChartInfoId: data.ChartInfoId,
-        })
-        .then((res) => {
-          if (res.Ret === 200) {
-            /**
-             * 0 可删除
-             * 1 关联图表一
-             * 2 有子目录无图表
-             */
-            const deleteLabelMap = {
-              1: /* '该分类下关联图表不可删除' */this.$t('Chart.OptMsg.classify_del_fail'),
-              2: /* '确认删除当前分类及包含的子分类吗?' */this.$t('Chart.OptMsg.classify_delall_confirm'),
-              4: res.Data.TipsMsg
-            }
+    async removeNode(node, data) {
+      const res = this.classifyShowType === 'public'
+        ? await chartBaseV2Interface.delPublicedClassifyCheck({
+						ChartClassifyId: data.ChartClassifyId,
+						ChartInfoId: data.ChartInfoId
+					})
+        : await dataBaseInterface.delChartCheck({
+            ChartClassifyId: data.ChartClassifyId,
+            ChartInfoId: data.ChartInfoId,
+          })
 
-            if([1,4].includes(res.Data.DeleteStatus)) this.$confirm(
-                deleteLabelMap[res.Data.DeleteStatus],
-                /* '删除失败' */this.$t('Chart.OptMsg.del_fail_tag'),
-                {
-                confirmButtonText: /* '知道了' */this.$t('Dialog.known'),
-                showCancelButton:false,
-                type: 'error'
-              })
-            else if([0,2].includes(res.Data.DeleteStatus)) this.$confirm(
-                res.Data.DeleteStatus === 2 
-                ? deleteLabelMap[res.Data.DeleteStatus]
-                : data.ChartInfoId?this.$t('Chart.OptMsg.chart_del_confirm'):this.$t('Chart.OptMsg.classify_del_confirm'), 
-                this.$t('Dialog.warn_tit'),
-                {
-                confirmButtonText: /* '确定' */this.$t('Dialog.confirm_btn'),
-                cancelButtonText: /* '取消' */this.$t('Dialog.cancel_btn'),
-                type: 'warning'
-              }).then(() => {
-                res.Data.DeleteStatus === 0 && data.ChartInfoId 
-                ? this.delHandle(data.ChartClassifyId, data.ChartInfoId, 1)
-                : this.delHandle(data.ChartClassifyId, data.ChartInfoId);
-              }).catch(() => {         
-              });
+          if(res.Ret !==200) return
+
+          /**
+           * 0 可删除
+           * 1 关联图表一
+           * 2 有子目录无图表
+           */
+          const deleteLabelMap = {
+            1: /* '该分类下关联图表不可删除' */this.$t('Chart.OptMsg.classify_del_fail'),
+            2: /* '确认删除当前分类及包含的子分类吗?' */this.$t('Chart.OptMsg.classify_delall_confirm'),
+            4: res.Data.TipsMsg
           }
-        });
+
+          if([1,4].includes(res.Data.DeleteStatus)) this.$confirm(
+              deleteLabelMap[res.Data.DeleteStatus],
+              /* '删除失败' */this.$t('Chart.OptMsg.del_fail_tag'),
+              {
+              confirmButtonText: /* '知道了' */this.$t('Dialog.known'),
+              showCancelButton:false,
+              type: 'error'
+            })
+          else if([0,2].includes(res.Data.DeleteStatus)) this.$confirm(
+              res.Data.DeleteStatus === 2 
+              ? deleteLabelMap[res.Data.DeleteStatus]
+              : data.ChartInfoId?this.$t('Chart.OptMsg.chart_del_confirm'):this.$t('Chart.OptMsg.classify_del_confirm'), 
+              this.$t('Dialog.warn_tit'),
+              {
+              confirmButtonText: /* '确定' */this.$t('Dialog.confirm_btn'),
+              cancelButtonText: /* '取消' */this.$t('Dialog.cancel_btn'),
+              type: 'warning'
+            }).then(() => {
+              res.Data.DeleteStatus === 0 && data.ChartInfoId 
+              ? this.delHandle(data.ChartClassifyId, data.ChartInfoId, 1)
+              : this.delHandle(data.ChartClassifyId, data.ChartInfoId);
+            }).catch(() => {         
+            });
     },
     /* 删除方法 */
-    delHandle(ChartClassifyId, ChartInfoId, type) {
-      dataBaseInterface
-        .delChartClassify({
-          ChartClassifyId,
-          ChartInfoId,
-        })
-        .then((res) => {
-          if (res.Ret === 200) {
-            this.$message.success(res.Msg);
-            if (!res.Data.ChartInfoId) this.selected_chartid = '';
-            if(type && res.Data.ChartInfoId){
-                this.getTreeData({
-                  code: res.Data.UniqueCode,
-                  id: res.Data.ChartInfoId,
-                  type: res.Data.ChartType,
-                })
-            }else{
-                this.getTreeData();
-            }
-            //如果router.query里的图表被删除,则清掉参数
-            if(Number(this.$route.query.id)===ChartInfoId){
-                this.$router.replace({path: '/chartsetting'})
-            }
+    async delHandle(ChartClassifyId, ChartInfoId, type) {
+      const res = this.classifyShowType === 'public'
+				? await chartBaseV2Interface.delPublicedClassify({
+						ChartClassifyId,
+            ChartInfoId,
+					})
+        : await dataBaseInterface.delChartClassify({
+            ChartClassifyId,
+            ChartInfoId,
+          });
+          
+        if (res.Ret !== 200) return
+          this.$message.success(res.Msg);
+          if (!res.Data.ChartInfoId) this.selected_chartid = '';
+          if(type && res.Data.ChartInfoId){
+              this.getTreeData({
+                code: res.Data.UniqueCode,
+                id: res.Data.ChartInfoId,
+                type: res.Data.ChartType,
+              })
+          }else{
+              this.getTreeData();
+          }
+          //如果router.query里的图表被删除,则清掉参数
+          if(Number(this.$route.query.id)===ChartInfoId){
+              this.$router.replace({path: '/chartsetting'})
           }
-        });
     },
     /* 新增/编辑分类成功 */
-    sucessCallback(type) {
+    handleConfirmClassify(type) {
       this.isOpenDialog = false;
       this.getTreeData();
 
@@ -1506,7 +1523,7 @@ export default {
 			}
 		},
 		//绑定el-tree的load属性
-		getLazyTreeData (node,resolve,maxLevel=3){
+		async getLazyTreeData (node,resolve,maxLevel=3){
 			if(node.level===0){
 				resolve(this.treeData)
 			}
@@ -1515,11 +1532,17 @@ export default {
 				resolve(node.data.Children||[])
 			}
 			if(node.level===maxLevel){
-				//调接口获取该分类下图表的数据
-				dataBaseInterface.getChartListForClassify({
-					ChartClassifyId:node.data.ChartClassifyId,
-					IsShowMe:this.isOnlyMe
-				}).then(res=>{
+
+        //调接口获取该分类下图表的数据
+        const res = this.classifyShowType === 'public'
+					? await chartBaseV2Interface.getPublicClassifyExpand({
+							ParentId: node.data.ChartClassifyId,
+						})
+					:	dataBaseInterface.getChartListForClassify({
+              ChartClassifyId:node.data.ChartClassifyId,
+              IsShowMe:this.isOnlyMe
+            })
+			
 					if(res.Ret===200){
 						let arr=res.Data.AllNodes||[]
 						arr=arr.map(item=>{
@@ -1533,7 +1556,6 @@ export default {
 						resolve([])
 					}
 					this.changeTreeNode()
-				})
 			}
 			if(node.level>maxLevel){
 				resolve([])
@@ -1561,27 +1583,30 @@ export default {
 
       // //将指标添加进标签列表中
       const {ChartNameEn,ChartName,ChartInfoId,UniqueCode,ChartClassifyId}=res.Data.ChartInfo;
-      this.defaultShowNodes=this.findParentNodeHandle(this.treeData,ChartClassifyId).reverse();
-      this.changeTreeNode()
-
-       //滚动到高亮节点位置
-      this.$refs.treeRef.setCurrentKey(this.select_node);
-      setTimeout(() => {
-        let node = document.getElementById(`node${this.select_node}`);
-        let parent = document.getElementsByClassName('tree-cont')[0];
-
-        //parent可视区间:[scrollTop,scrollTop+offsetHeight]
-        //node位置:node.offsetTop
-        const overTop = node.offsetTop+node.clientHeight+15<parent.scrollTop
-        const overBottom = node.offsetTop+node.clientHeight+15>parent.scrollTop+parent.offsetHeight
-        console.log(overBottom)
-        if(overTop){
-            parent.scrollTop = node.offsetTop-30
-        }
-        if(overBottom){
-          parent.scrollTop =  node.offsetTop - parent.offsetHeight/2
-        }
-      },400)
+      if(['own','public'].includes(this.classifyShowType)) {
+
+        this.defaultShowNodes=this.findParentNodeHandle(this.treeData,ChartClassifyId).reverse();
+        this.changeTreeNode()
+  
+         //滚动到高亮节点位置
+        this.$refs.treeRef.setCurrentKey(this.select_node);
+        setTimeout(() => {
+          let node = document.getElementById(`node${this.select_node}`);
+          let parent = document.getElementsByClassName('tree-cont')[0];
+  
+          //parent可视区间:[scrollTop,scrollTop+offsetHeight]
+          //node位置:node.offsetTop
+          const overTop = node.offsetTop+node.clientHeight+15<parent.scrollTop
+          const overBottom = node.offsetTop+node.clientHeight+15>parent.scrollTop+parent.offsetHeight
+          console.log(overBottom)
+          if(overTop){
+              parent.scrollTop = node.offsetTop-30
+          }
+          if(overBottom){
+            parent.scrollTop =  node.offsetTop - parent.offsetHeight/2
+          }
+        },400)
+      }
 
 
       if(!this.chartInfo.HaveOperaAuth) return
@@ -1759,18 +1784,17 @@ export default {
 
 		searchApi(query,page=1) {
       /* 查找列表 */
-      dataBaseInterface
-        .chartSearchByEs({
-          Keyword: query,
-          IsShowMe:this.isOnlyMe,
-          CurrentIndex: page
-        })
-        .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,...List];
-        });
+      dataBaseInterface.chartSearchByEs({
+        Keyword: query,
+        IsShowMe:this.isOnlyMe,
+        CurrentIndex: page,
+        ChartAuth: this.classifyShowType==='own'?1:2
+      }).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,...List];
+      });
 		},
 
 		/* 聚焦获取当前检索 */
@@ -2269,26 +2293,45 @@ export default {
     },
 
     /* ----------------公用图库part-------------------- */
-    getPublicChartList() {
-      mychartInterface
-        .publicList({
-          PageSize: this.public_page_size,
-          CurrentIndex: this.public_page_no,
-          ChartClassifyId: this.default_classify || 0,
-          IsShowMe:this.isOnlyMe
-        })
-        .then((res) => {
-          if (res.Ret !== 200) return;
-          this.publicHaveMove = res.Data
-            ? this.public_page_no < res.Data.Paging.Pages
-            : false;
-          this.chartPublicList = res.Data
-            ? this.public_page_no === 1
-              ? res.Data.List
-              : [...this.chartPublicList, ...res.Data.List]
-            : [];
-          this.public_total = res.Data ? res.Data.Paging.Totals : 0;
-        });
+    async getChartList() {
+
+      let res = null;
+
+      if(this.classifyShowType === 'shared') {//共享
+        res = await chartBaseV2Interface.getSharedChartList({
+					FilterSource: this.currentTreeName==='sharedReceive' ? 1 : 0
+				})
+      }else { //其他走es
+        let ChartAuth = 0;
+				if(this.classifyShowType==='own') { //我的
+					ChartAuth = 1;
+				}else if(this.classifyShowType==='public') {//公共
+					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
+          })
+      }
+
+      if (res.Ret !== 200) return;
+      this.publicHaveMove = res.Data
+        ? this.public_page_no < res.Data.Paging.Pages
+        : false;
+      this.chartPublicList = this.public_page_no === 1
+          ? res.Data.List
+          : [...this.chartPublicList, ...res.Data.List];
+      this.public_total = res.Data ? res.Data.Paging.Totals : 0;
     },
 
     /* 加载更多 */
@@ -2301,7 +2344,7 @@ export default {
       console.log('scrollHeight:',scrollHeight)
 			if(scrollTop + clientHeight >= scrollHeight-10 && this.publicHaveMove){
 				this.public_page_no++;
-				this.getPublicChartList();
+				this.getChartList();
 			}
     },300),
 
@@ -2341,7 +2384,7 @@ export default {
     },
 
     changeTreeNode(){
-        this.$refs.treeRef.setCurrentKey(this.select_node);
+        this.$refs.treeRef&&this.$refs.treeRef.setCurrentKey(this.select_node);
     },
 
     // 图表到社区的操作
@@ -2383,13 +2426,16 @@ export default {
 		/* 切换分类类型 */
 		handleChangeClassifyType() {
 			this.defaultShowNodes = [];
-			this.public_page_no = 0;
-			this.selected_edbid = 0;
+			this.public_page_no = 1;
+			this.selected_chartid = 0;
+      this.select_node = '';
 			this.default_classify = 0;
+			this.selected_chartClassify = 0;
 			this.search_txt = '';
-      this.$refs.listChartPage && (this.$refs.listChartPage.scrollTop = 0);
+      this.chartPublicList = [];
 
-      this.getPublicChartList();
+      this.$refs.listChartPage && (this.$refs.listChartPage.scrollTop = 0);
+      this.getChartList();
 
 			
 			['own','public'].includes(this.classifyShowType) && this.getTreeData();
@@ -2398,33 +2444,34 @@ export default {
 
 		//获取收藏指标分类
 		async getCollectClassifys() {
-			const res = await edbCollectInterface.getEdbCollectClassify({ParentId:0})
-
-			this.collectClassifys = res.Data||[]
+			const res = await chartBaseV2Interface.getChartCollectClassify()
+
+			this.collectClassifys = res.Data 
+        ? res.Data.map(_ =>({
+            ..._,
+            ChartClassifyId: _.ClassifyId
+          })) 
+        : [];
 		},
 
-		/* 收藏指标 */
-		handleCollectEdb(info) {
+		/* 收藏图表 */
+		handleCollectEdb() {
+      let info = this.chartInfo;
 			this.collectEdbForm = {
-				edbId: info.EdbInfoId,
+				chartId: info.ChartInfoId,
 				collectClassifyIdList: info.CollectClassifyIdList||[]
 			},
 			this.isOpenEdbCollectDia = true
 		},
 
-		async handleRemoveCollect(item=null) {
-			const res = await edbCollectInterface.edbCollectCancel({
-				ClassifyId: this.select_classifyId,
-				EdbInfoId: item?item.EdbInfoId:this.selected_edbid
+		async handleRemoveCollect() {
+			const res = await chartBaseV2Interface.edbCollectCancel({
+				ClassifyId: this.default_classify,
+				ChartInfoId: this.chartInfo.ChartInfoId
 			})
 
 			if(res.Ret !== 200) return 
 			this.$message.success('取消收藏成功')
-			if(this.selected_edbid) {
-				this.chartList = []
-				this.selected_edbid = 0
-			}
-			this.getEdbChartList()
 		},
 
 		handleOpenCollectClassify(data=null) {
@@ -2435,29 +2482,29 @@ export default {
 			this.isOpenCollectClassifyDia = true
 		},
 
-		/* 收藏指标拖动 */
+		/* 收藏图表拖动 */
 		async collectDragOver({oldIndex,newIndex}) {
 			if(oldIndex===newIndex) return
-			let NextEdbInfoId,PrevEdbInfoId;
+			let NextChartInfoId,PrevChartInfoId;
 			if(newIndex===0){
-        PrevEdbInfoId=0
-        NextEdbInfoId=this.chartList[newIndex+1].EdbInfoId
+        PrevChartInfoId=0
+        NextChartInfoId=this.chartList[newIndex+1].ChartInfoId
       }else if(newIndex===this.chartList.length-1){
-        PrevEdbInfoId = this.chartList[newIndex-1].EdbInfoId
-        NextEdbInfoId = 0
+        PrevChartInfoId = this.chartList[newIndex-1].ChartInfoId
+        NextChartInfoId = 0
       }else{
-        PrevEdbInfoId = this.chartList[newIndex-1].EdbInfoId
-        NextEdbInfoId = this.chartList[newIndex+1].EdbInfoId
+        PrevChartInfoId = this.chartList[newIndex-1].ChartInfoId
+        NextChartInfoId = this.chartList[newIndex+1].ChartInfoId
       }
 			
 			let params = {
-				ClassifyId: this.select_classifyId,
-				EdbInfoId: this.chartList[newIndex].EdbInfoId,
-				NextEdbInfoId,
-				PrevEdbInfoId,
+				ClassifyId: this.default_classify,
+				ChartInfoId: this.chartList[newIndex].ChartInfoId,
+				NextChartInfoId,
+				PrevChartInfoId,
 			}
 
-			const res = await edbCollectInterface.moveCollectEdb(params)
+			const res = await chartBaseV2Interface.moveCollectChart(params)
 			if(res.Ret !== 200) return 
 			this.$message.success('移动成功')
 		},
@@ -2476,7 +2523,7 @@ export default {
       this.getTreeData({code: this.$route.query.code,id: Number(this.$route.query.id)})
     } else {
       this.getTreeData();
-      this.getPublicChartList();
+      this.getChartList();
     }
     window.addEventListener('resize', this.reloadRightWid);
   },
@@ -2706,8 +2753,10 @@ export default {
         }
         .tree-cont {
           padding: 0 20px 30px;
-          // overflow: auto;
           height: calc(100vh - 320px);
+          &.shared-cont {
+            height: calc(100vh - 250px);
+          }
         }
         .target_tree {
           font-size: 14px;

+ 102 - 77
src/views/dataEntry_manage/components/batchMoveDialog.vue

@@ -42,39 +42,38 @@
                   v-if="source==='edb'"
                   v-model="filterObj.source"
                   style="width: 200px"
-                  placeholder="请选择计算方式"
                   clearable
                   multiple
                   collapse-tags
+                  placeholder="请选择数据来源"
                   @change="handleFilter"
                 >
                   <el-option
                     v-for="item in sourceOption"
-                    :key="item.type"
-                    :label="item.name"
-                    :value="item.type"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
                   >
                   </el-option>
                 </el-select>
 
-                <el-select
+                <el-cascader
                   v-if="source==='chart'"
                   v-model="filterObj.chartTypes"
-                  style="width: 200px"
-                  placeholder="图表类型"
+                  :options="chartTypesOptions"
+                  :show-all-levels="false"
                   clearable
-                  multiple
                   collapse-tags
+                  :props="{
+                    emitPath:false,
+                    label:'ChartTypeName',
+                    value:'ChartTypeId',
+                    children:'Child',
+                    multiple:true
+                  }"
+                  placeholder="图表类型"
                   @change="handleFilter"
-                >
-                  <el-option
-                    v-for="item in sourceOption"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                  >
-                  </el-option>
-                </el-select>
+                />
 
                 <el-input 
                   v-model="filterObj.keyWord" 
@@ -131,8 +130,8 @@
                 <m-page
                     class="table-page"
                     :total="total" 
-                    :pageSize="pageSize"
-                    :page_no="pageNo"
+                    :pageSize="filterObj.pageSize"
+                    :page_no="filterObj.pageNo"
                     @handleCurrentChange="pageChange"
                 />
               </div>
@@ -140,14 +139,16 @@
 
           <div class="type-wrap">
             <label class="el-form-item__label">移动至新分类</label>
-            <cascader
-								v-model="filterObj.newClassify"
-								:options="classifyOption"
-								clearable
-								placeholder="选择新分类"
-                style="width: 240px"
-								:config="{ checkStrictly: true,emitPath:false }"
-							/>
+
+            <el-cascader
+              v-model="filterObj.newClassify"
+              :options="classifyOption"
+              clearable
+              placeholder="选择新分类"
+              style="width: 240px"
+              :props="cascaderProps"
+              ref="newClassifyRef"
+            />
           </div>
 
           <div class="bot">
@@ -162,7 +163,6 @@
 import mPage from '@/components/mPage.vue'
 import { dataBaseInterface } from '@/api/api.js';
 import { edbBaseV2Interface,chartBaseV2Interface } from '@/api/modules/chartApi';
-import { getComputedTypes } from '../databaseComponents/util';
 export default {
     components:{ mPage, },
     props:{
@@ -203,7 +203,7 @@ export default {
           },
           {
             label: '分类',
-            key: 'ClassifyName',
+            key: this.classifyShowType==='own'?'ClassifyNamePath':'PublicClassifyNamePath',
             show: true
           },
           {
@@ -229,14 +229,22 @@ export default {
       },
 
       cascaderProps() {
-        return {
-            label: 'ClassifyName',
-            value: 'ClassifyId',
-            children: 'Children',
-            multiple: true,
-            emitPath: false,
-            checkStrictly: !this.filterObj.relevanceChild
-        }
+        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() {
@@ -248,6 +256,8 @@ export default {
         if(!n) return
         
         this.getClassifyOpts();
+        this.source==='chart' && this.getChartTypes();
+        this.source==='edb' && this.getEdbSources();
         this.$nextTick(() => {
           this.getList('init');
         })
@@ -267,11 +277,13 @@ export default {
           checkSome: false,
           newClassify: ''
         },
-        sourceOption: getComputedTypes(),
+        sourceOption: [],
         classifyOption: [],
         cascaderKey:0,
+        chartTypesOptions: [],
 
         list: [],
+        total: 0,
         isSelectAll: false, //真正意义上的全选或不全选
         checkedList: [], //不全选勾选中的 或 全选取消勾的项
         selectionReactCancel:false,//手动设置选中中
@@ -280,6 +292,26 @@ export default {
     
     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;
@@ -309,15 +341,7 @@ export default {
       },
 
       async getList(type='pageChange') {
-        let apiMap = {
-          'edb': this.getEdbList,
-          'chart': this.getChartList
-        }
-        apiMap[this.source](type)
-      },
 
-      //指标列表
-      async getEdbList(type) {
         const { 
           pageNo,
           pageSize,
@@ -330,41 +354,40 @@ export default {
           ? checkedClassify.map(_ => _.data.ClassifyId)
           : []
 
-        const res = this.classifyShowType === 'own'
-          ? await dataBaseInterface.targetSearchByPage({
-              PageSize:pageSize,
-              Source: source.join(','),
-              CurrentIndex:pageNo,
-              ClassifyId:ClassifyIdList.join(','),
-              KeyWord: keyWord,
-              EdbType: 2,
-              EdbAuth: 1
-          })
-          : await edbBaseV2Interface.getPublicSearchList({
-              EdbPublicList: [3],
-              SourceList:source,
-              Keyword: keyWord,
-              ClassifyIdList,
-              CurrentIndex: pageNo,
-              PageSize: pageSize
-          })
-
-        if(res.Ret !== 200) return
-        this.list = res.Data.List||[];
-        this.total = res.Data.Paging.Totals;
-
-        if(type==='filter'){
-          this.listCheckAllChange(true)
-        }else {
-          //页码变化 选中项不做清空
-          this.checkedSomeSelection()
+        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;
 
-      //图表列表
-      async getChartList() {
+          this.list.forEach(_ => {
+            _.ClassifyNamePath = _.ClassifyNamePath.replace(/\|/g,'/')
+            _.PublicClassifyNamePath = _.PublicClassifyNamePath.replace(/\|/g,'/')
+          });
 
+          if(type==='filter'){
+            this.listCheckAllChange(true)
+          }else {
+            //页码变化 选中项不做清空
+            this.checkedSomeSelection()
+          }
       },
 
       handleFilter(val) {
@@ -382,6 +405,7 @@ export default {
         const {
           source,
           keyWord,
+          chartTypes,
           newClassify
         } = this.filterObj;
         let checkedClassify = this.$refs.classifyRef.getCheckedNodes();
@@ -406,6 +430,7 @@ export default {
               : await edbBaseV2Interface.movePublicBatch(params)
         }else {//图库
           let params = {
+            ChartTypeList: chartTypes,
             Keyword: keyWord,
             ClassifyIdList,
             IsSelectAll: this.isSelectAll,

+ 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() {

+ 3 - 1
src/views/dataEntry_manage/css/chartfit.scss

@@ -55,8 +55,10 @@ $font-normal:14px;
 			}
 			.tree-cont {
 				padding: 0 20px 30px;
-				// overflow: auto;
 				height: calc(100vh - 320px);
+				&.shared-cont {
+					height: calc(100vh - 250px);
+				}
 			}
 			.target_tree {
 				font-size: 12px;

+ 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?'编辑成功':'新增成功');

+ 23 - 24
src/views/dataEntry_manage/databaseComponents/collectEdbMenu.vue

@@ -22,7 +22,7 @@
                   alt=""
                   style="width: 15px; height: 14px; margin-right: 8px"
                   @click.stop="$parent.handleOpenCollectClassify(data)"
-                  v-if="!data.EdbCode&&checkAuth('save')"
+                  v-if="!data.EdbCode"
                 />
 
                 <img
@@ -30,7 +30,7 @@
                   alt=""
                   style="width: 14px; height: 14px;"
                   @click.stop="removeCollectNode(data)"
-                  v-if="!data.EdbCode&&checkAuth('remove')"
+                  v-if="!data.EdbCode"
                 />
             </div>
         </div>
@@ -38,16 +38,16 @@
 </template>
 
 <script>
-import { edbCollectInterface } from '@/api/modules/chartApi'
+import { edbCollectInterface,chartBaseV2Interface } from '@/api/modules/chartApi'
 export default {
   props: {
     data: {
       type: Object
     },
-    source: {
+    source: { //指标或图库 edb chart
       type: String,
       default: 'edb'
-    }
+    },
   },
   data() {
     return {
@@ -59,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('删除成功')
@@ -97,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('移动成功')
     },
@@ -106,22 +112,15 @@ export default {
       return dropNode.level===draggingNode.level&&type!=='inner'
     },
 
-    checkAuth(key) {
-      const {edbDataPermission,checkPermissionBtn}=this.permissionBtn
-      const checkAuthMap = {
-        'remove': edbDataPermission.edbData_edbCollectClassify_remove,
-        'save': edbDataPermission.edbData_edbCollectClassify_save
-      }
+    // checkAuth(key) {
+    //   const {edbDataPermission,checkPermissionBtn}=this.permissionBtn
+    //   const checkAuthMap = {
+    //     'remove': edbDataPermission.edbData_edbCollectClassify_remove,
+    //     'save': edbDataPermission.edbData_edbCollectClassify_save
+    //   }
 
-      return checkPermissionBtn(checkAuthMap[key])
-    },
-
-    initSelect(id) {
-      console.log(id)
-      this.$nextTick(() => {
-        this.$refs.catalogTree.setCurrentKey(id);
-      })
-    }
+    //   return checkPermissionBtn(checkAuthMap[key])
+    // },
   }
 }
 </script>

+ 30 - 18
src/views/dataEntry_manage/databaseComponents/edbCollectDia.vue

@@ -40,20 +40,24 @@
 </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) {
@@ -75,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) {
@@ -94,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() {

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

@@ -59,8 +59,7 @@
             type="text"
             @click="$emit('edit',row)"
           >编辑</el-button>
-          <el-button 
-            v-if="$parent.isEdbBtnShow('edbData_edbCollect_collect')"
+          <el-button
             type="text"
             @click="$emit('collect',row)"
           >收藏</el-button>

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

@@ -242,7 +242,7 @@
 								</div>
 
 								<div class="opt-wrapper">
-										<div class="opt-item" @click="handleOpenCollectClassify" v-if="isEdbBtnShow('edbData_edbCollectClassify_save')">
+										<div class="opt-item" @click="handleOpenCollectClassify">
 											<img
 												src="~@/assets/img/set_m/add_ico.png"
 												alt=""
@@ -318,8 +318,7 @@
 								@click="toggleEdbRefreshStatus(EdbData,'detail')" 
 							>{{EdbData.NoUpdate==1?$t('SystemManage.DataRefresh.enable'):$t('SystemManage.DataRefresh.disable') }}<!-- 启用/停用 --></el-button>
 
-							<el-button 
-								v-if="isEdbBtnShow('edbData_edbCollect_collect')"
+							<el-button
 								type="text"
 								@click="handleCollectEdb(EdbData)" 
 							>收藏</el-button>
@@ -646,9 +645,9 @@
 		<edbCollectDia
 			ref="edbCollectRef"
 			:show.sync="isOpenEdbCollectDia"
-			:edbId="collectEdbForm.edbId"
+			:id="collectEdbForm.edbId"
 			:add_ids="collectEdbForm.collectClassifyIdList"
-			@success="handleCollectSuccess"
+			@confirm="handleCollectSuccess"
 		/>
 
 		<!-- 添加收藏分类弹窗 -->
@@ -882,7 +881,7 @@ export default {
 				{ label: '公共指标',key: 'public' },
 			],
 			classifyShowType:'own',
-			currentTreeName: 'own',//当前点击的分类树 4块 列表请求接口不同  own public collect sharedReceive sharedSend
+			currentTreeName: 'own',//当前点击的分类树 4块 列表请求接口不同  own public collect sharedReceive sharedSend,
 			
 			collectClassifys:[],//收藏目录
 			//指标收藏弹窗
@@ -1078,11 +1077,11 @@ export default {
 				'checkCalcChart':edbDataPermission.edbData_checkCalcChart,//查看计算指标
 				'enableOrDisable':edbDataPermission.edbData_enableOrDisable,//启用/停用
 
-				'edbData_edbCollect_collect': edbDataPermission.edbData_edbCollect_collect,//收藏移出
-				'edbData_edbCollectClassify_save': edbDataPermission.edbData_edbCollectClassify_save,//收藏分类编辑
-				'edbData_edbCollectClassify_remove': edbDataPermission.edbData_edbCollectClassify_remove,//收藏分类删除
-				'edbData_edbCollectClassify_move': edbDataPermission.edbData_edbCollectClassify_move,//收藏分类移动
-				'edbData_edbCollectClassify_remove': edbDataPermission.edbData_edbCollectClassify_remove,//收藏分类移动
+				// 'edbData_edbCollect_collect': edbDataPermission.edbData_edbCollect_collect,//收藏移出
+				// 'edbData_edbCollectClassify_save': edbDataPermission.edbData_edbCollectClassify_save,//收藏分类编辑
+				// 'edbData_edbCollectClassify_remove': edbDataPermission.edbData_edbCollectClassify_remove,//收藏分类删除
+				// 'edbData_edbCollectClassify_move': edbDataPermission.edbData_edbCollectClassify_move,//收藏分类移动
+				// 'edbData_edbCollectClassify_remove': edbDataPermission.edbData_edbCollectClassify_remove,//收藏分类移动
 			}
 			return checkPermissionBtn(BtnMap[type])
 		},
@@ -1385,8 +1384,7 @@ export default {
 			this.isComplete = false;
 			this.isAddTarget = false;
 			this.getTreeData(params);
-			this.changeTreeNode()
-			// this.getNewTargetList();
+			this.changeTreeNode();
 		},
 		/* 取消新增回调 */
 		cacelCompleteCallback() {

+ 45 - 30
src/views/dataEntry_manage/sharedComponents/batchSetPublicDia.vue

@@ -33,35 +33,26 @@
                 </el-radio-group>
                 <el-cascader
                   v-model="selectClassify"
-                  :options="classifyOption"
-                  :props="{	
-                    label: 'ClassifyName',
-                    value: 'ClassifyId',
-                    children: 'Children',
-                    checkStrictly: true,
-                    emitPath:false
-                  }"
-                  :placeholder="$t('Edb.InputHolderAll.input_menu')"
                   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"
-                    :props="{	
-                      label: 'ClassifyName',
-                      value: 'ClassifyId',
-                      children: 'Children',
-                      checkStrictly: true,
-                      emitPath:false
-                    }"
-                    :placeholder="$t('Edb.InputHolderAll.input_menu')"
-                    :disabled="(classifyType===1)"
-                    size="small"
-                  />
+                <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>
@@ -85,7 +76,7 @@
 </div>
 </template>
 <script>
-import { edbBaseV2Interface } from '@/api/modules/chartApi';
+import { edbBaseV2Interface,chartBaseV2Interface } from '@/api/modules/chartApi';
 export default {
   props: {
     show: {
@@ -99,6 +90,26 @@ export default {
       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
@@ -138,7 +149,13 @@ export default {
             })),
             Description: this.reason
           })
-        : null
+        : await chartBaseV2Interface.setChartPublic({
+            ChartInfoList: this.tableData.map(_ => ({
+              ChartInfoId: _.ChartInfoId,
+              ClassifyId: _.PublicClassifyId
+            })),
+            Description: this.reason
+          })
 
       if(res.Ret !== 200) return
       this.$message.success(this.isNeedPublicApprove?'已提交申请,请等待审批':'设置成功')
@@ -156,10 +173,8 @@ export default {
 
     async getList() {
       const res = this.source === 'edb'
-        ? await edbBaseV2Interface.getPublicSearchListAll({
-            ...this.checkedParams
-          })
-        : null
+        ? await edbBaseV2Interface.getPublicSearchListAll(this.checkedParams)
+        : await chartBaseV2Interface.getPublicSearchListAll(this.checkedParams)
 
       if(res.Ret !== 200) return
       this.tableData = res.Data.List && res.Data.List.map(_ =>({
@@ -183,7 +198,7 @@ export default {
     async getClassifyOpts() {
       const res = this.source === 'edb'
         ? await edbBaseV2Interface.getPublicClassifyBase()
-        : null
+        : await chartBaseV2Interface.getPublicClassifyBase()
 
       if(res.Ret!==200) return 
 

+ 44 - 16
src/views/dataEntry_manage/sharedComponents/setPublicDia.vue

@@ -18,13 +18,13 @@
         inline
       >
         <el-form-item label="公共目录">
-          <cascader
-            v-model="formData.classifyId"
-            :options="classifyOption"
-            clearable
-            :placeholder="$t('Edb.InputHolderAll.input_menu')"
-            :config="{ checkStrictly: true,emitPath:false }"
-            cascaderWidth="width: 400px"
+          <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">
@@ -47,7 +47,7 @@
 </div>
 </template>
 <script>
-import { edbBaseV2Interface } from '@/api/modules/chartApi';
+import { edbBaseV2Interface,chartBaseV2Interface } from '@/api/modules/chartApi';
 export default {
   props: {
     show: {
@@ -61,6 +61,26 @@ export default {
       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
@@ -90,13 +110,21 @@ export default {
     },
 
     async handleConfirm() {
-      const res = await edbBaseV2Interface.setEdbPublic({
-        EdbInfoList: [{
-          EdbInfoId: this.checkedParams.EdbInfoId,
-          ClassifyId: this.formData.classifyId||0
-        }],
-        Description: this.formData.reason
-      })
+      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?'已提交申请,请等待审批':'设置成功')
 
@@ -118,7 +146,7 @@ export default {
     async getClassifyOpts() {
       const res = this.source === 'edb'
         ? await edbBaseV2Interface.getPublicClassifyBase()
-        : null
+        : await chartBaseV2Interface.getPublicClassifyBase()
 
       if(res.Ret!==200) return 
 

+ 4 - 4
src/views/dataEntry_manage/sharedComponents/setSharedDia.vue

@@ -169,8 +169,8 @@ export default {
           : await edbBaseV2Interface.setEdbSharedBatch(params)
       }else { //图表
         res = this.checkedParams.ChartInfoId 
-          ? await chartBaseV2Interface.setEdbSharedSingle(params)
-          : await chartBaseV2Interface.setEdbSharedBatch(params)
+          ? await chartBaseV2Interface.setChartSharedSingle(params)
+          : await chartBaseV2Interface.setChartSharedBatch(params)
       }
 
       if(res.Ret !== 200) return
@@ -184,12 +184,12 @@ export default {
     async getSharedUser() {
       const res = this.source === 'edb'
         ? await edbBaseV2Interface.getEdbSharedUser({EdbInfoId: this.checkedParams.EdbInfoId})
-        : await chartBaseV2Interface.getEdbSharedUser({ChartInfoId: this.checkedParams.ChartInfoId})
+        : await chartBaseV2Interface.getChartSharedUser({ChartInfoId: this.checkedParams.ChartInfoId})
 
       if(res.Ret !== 200) return
       
       this.formData = {
-        type: res.Data.ShareType,
+        type: res.Data.ShareType||1,
         users: res.Data.List ? res.Data.List.map(_ => String(_.SysUserId)) : []
       };
 

+ 155 - 58
src/views/dataEntry_manage/sharedComponents/setSharedListDialog.vue

@@ -49,35 +49,36 @@
                   clearable
                   multiple
                   collapse-tags
+                  placeholder="请选择数据来源"
                   @change="handleFilter"
                 >
                   <el-option
                     v-for="item in sourceOption"
-                    :key="item.type"
-                    :label="item.name"
-                    :value="item.type"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
                   >
                   </el-option>
                 </el-select>
 
-                <el-select
+
+                <el-cascader
                   v-if="source==='chart'"
                   v-model="filterObj.chartTypes"
-                  style="width: 200px"
-                  placeholder="图表类型"
+                  :options="chartTypesOptions"
+                  :show-all-levels="false"
                   clearable
-                  multiple
                   collapse-tags
+                  :props="{
+                    emitPath:false,
+                    label:'ChartTypeName',
+                    value:'ChartTypeId',
+                    children:'Child',
+                    multiple:true
+                  }"
+                  placeholder="图表类型"
                   @change="handleFilter"
-                >
-                  <el-option
-                    v-for="item in sourceOption"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                  >
-                  </el-option>
-                </el-select>
+                />
 
                 <el-select
                   v-model="filterObj.listStatus"
@@ -161,8 +162,8 @@
                 <m-page
                     class="table-page"
                     :total="total" 
-                    :pageSize="pageSize"
-                    :page_no="pageNo"
+                    :pageSize="filterObj.pageSize"
+                    :page_no="filterObj.pageNo"
                     @handleCurrentChange="pageChange"
                 />
               </div>
@@ -200,7 +201,6 @@
 import mPage from '@/components/mPage.vue'
 import { dataBaseInterface } from '@/api/api.js';
 import { edbBaseV2Interface,chartBaseV2Interface } from '@/api/modules/chartApi';
-import { getComputedTypes } from '../databaseComponents/util';
 import setSharedDia from './setSharedDia.vue';
 import setPublicDia from './setPublicDia.vue';
 import batchSetPublicDia from './batchSetPublicDia.vue';
@@ -286,14 +286,25 @@ export default {
       },
 
       cascaderProps() {
-        return {
-            label: 'ClassifyName',
-            value: 'ClassifyId',
-            children: 'Children',
-            multiple: true,
-            emitPath: false,
-            checkStrictly: !this.filterObj.relevanceChild
-        }
+        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() {
@@ -324,13 +335,15 @@ export default {
         ])
 
         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');
         })
@@ -350,11 +363,13 @@ export default {
           checkAll: false, //控制全选显示状态
           checkSome: false
         },
-        sourceOption: getComputedTypes(),
+        sourceOption: [],
         classifyOption: [],
         cascaderKey:0,
+        chartTypesOptions: [],
 
         list: [],
+        total: 0,
         isSelectAll: false, //真正意义上的全选或不全选
         checkedList: [], //不全选勾选中的 或 全选取消勾的项
         selectionReactCancel:false,//手动设置选中中
@@ -371,11 +386,33 @@ export default {
     
     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 = await dataBaseInterface.menuListV3({
-          ClassifyType:  2
-        })
+        const res = this.source==='edb'
+          ? await dataBaseInterface.menuListV3({
+              ClassifyType:  2
+            })
+          : await dataBaseInterface.chartClassify()
 
         if(res.Ret!==200) return 
 
@@ -402,9 +439,7 @@ export default {
 
       //指标列表
       async getEdbList(type) {
-        const { 
-          classify,
-          relevanceChild,
+        const {
           pageNo,
           pageSize,
           source,
@@ -450,8 +485,48 @@ export default {
       },
 
       //图表列表
-      async getChartList() {
+      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) {
@@ -469,14 +544,15 @@ export default {
       handleSetShare(item=null) {
         if(item) {
           this.checkedParams = {
-            EdbInfoId: item.EdbInfoId
+            [this.Idkey]: item[this.Idkey]
           }
         }else {
-          if(!this.checkedList.length && !this.isSelectAll) return this.$message.warning('请选择指标')
+          if(!this.checkedList.length && !this.isSelectAll) return this.$message.warning(`请选择${this.sourceLabel}`)
 
           const {
             source,
             listStatus,
+            chartTypes,
             keyWord,
           } = this.filterObj;
 
@@ -485,15 +561,25 @@ export default {
             ? checkedClassify.map(_ => _.data.ClassifyId)
             : []
 
-          this.checkedParams = {
-            EdbShareList: listStatus,
-            SourceList:source,
-            Keyword: keyWord,
-            ClassifyIdList,
-            IsSelectAll: this.isSelectAll,
-            NoEdbIdList: this.isSelectAll ? this.checkedList.map(_ =>_.EdbInfoId) : [],
-            EdbIdList: this.isSelectAll ? [] : this.checkedList.map(_ =>_.EdbInfoId)
-          }
+          this.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;
       },
@@ -502,15 +588,16 @@ export default {
       handleSetPublic(item=null,type="single") {
         if(type==='single') {
           this.checkedParams = {
-            EdbInfoId: item.EdbInfoId
+            [this.Idkey]: item[this.Idkey]
           }
           this.isSetPublicDia = true;
         }else { //批量
-          if(!this.checkedList.length && !this.isSelectAll) return this.$message.warning('请选择指标')
+          if(!this.checkedList.length && !this.isSelectAll) return this.$message.warning(`请选择${this.sourceLabel}`)
 
           const {
             source,
             listStatus,
+            chartTypes,
             keyWord,
           } = this.filterObj;
 
@@ -519,15 +606,25 @@ export default {
             ? checkedClassify.map(_ => _.data.ClassifyId)
             : []
 
-          this.checkedParams = {
-            EdbPublicList: listStatus,
-            SourceList:source,
-            Keyword: keyWord,
-            ClassifyIdList,
-            IsSelectAll: this.isSelectAll,
-            NoEdbIdList: this.isSelectAll ? this.checkedList.map(_ =>_.EdbInfoId) : [],
-            EdbIdList: this.isSelectAll ? [] : this.checkedList.map(_ =>_.EdbInfoId)
-          }
+          this.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;
         }
       },

+ 4 - 9
src/views/dataEntry_manage/sharedComponents/sharedMenu.vue

@@ -16,7 +16,7 @@
           @current-change="(data,node)=>{$parent.nodeChange({data,node,treeName:'shared'})}"
         >
             <div class="custom-tree-node" slot-scope="{ data }">
-                <span class="tree-label">{{ data.ClassifyName }}</span>
+                <span class="tree-label">{{ source==='edb'?data.ClassifyName:data.ChartClassifyName }}</span>
             </div>
         </el-tree>
       </div>
@@ -38,7 +38,7 @@
           @current-change="(data,node)=>{$parent.nodeChange({data,node,treeName:'sharedReceive'})}"
         >
             <div class="custom-tree-node" slot-scope="{ data }">
-                <span class="tree-label">{{ data.ClassifyName }}</span>
+                <span class="tree-label">{{ source==='edb'?data.ClassifyName:data.ChartClassifyName }}</span>
             </div>
         </el-tree>
       </div>
@@ -46,8 +46,7 @@
   </div>
 </template>
 <script>
-import { dataBaseInterface } from '@/api/api.js';
-import { edbBaseV2Interface } from '@/api/modules/chartApi';
+import { edbBaseV2Interface,chartBaseV2Interface } from '@/api/modules/chartApi';
 export default {
   props: {
     source: { //指标或图库
@@ -68,11 +67,7 @@ export default {
     async getSharedClassify() {
       const res = this.source === 'edb'
         ? await edbBaseV2Interface.getSharedClassify()
-        : await dataBaseInterface.targetCatalog({
-            IsOnlyMe:this.IsOnlyMe,
-            ParentId:0,
-            ClassifyType:  2
-          })
+        : await chartBaseV2Interface.getSharedClassify()
       if(res.Ret !== 200) return
 
       this.sharedClassifys = res.Data.Send || [];