소스 검색

Merge branch 'master' into eta1.4.6

Karsa 10 달 전
부모
커밋
44ab00d76b
38개의 변경된 파일789개의 추가작업 그리고 264개의 파일을 삭제
  1. 3 3
      src/api/modules/thirdBaseApi.js
  2. 1 0
      src/components/edbHistoryDialog.vue
  3. 22 0
      src/main.js
  4. 9 0
      src/routes/modules/oldRoutes.js
  5. 7 1
      src/utils/buttonConfig.js
  6. 4 2
      src/utils/defaultOptions.js
  7. 2 2
      src/utils/registryComponents.js
  8. 17 1
      src/views/Home.vue
  9. 58 1
      src/views/chartFrame_manage/common/config.js
  10. 2 2
      src/views/chartFrame_manage/common/event.js
  11. 50 15
      src/views/chartFrame_manage/components/frameContainer.vue
  12. 13 5
      src/views/chartFrame_manage/frameEditor.vue
  13. 4 0
      src/views/chartFrame_manage/index.vue
  14. 10 1
      src/views/chartRelevance_manage/crossVarietyAnalysis/components/edbTableSection.vue
  15. 9 0
      src/views/chartRelevance_manage/relevance/list.vue
  16. 1 1
      src/views/dataEntry_manage/addChart.vue
  17. 3 3
      src/views/dataEntry_manage/adjustdata/adjustData.vue
  18. 9 5
      src/views/dataEntry_manage/chartSetting.vue
  19. 6 6
      src/views/dataEntry_manage/components/markersSection.vue
  20. 14 14
      src/views/dataEntry_manage/databaseComponents/chartTrendRender.vue
  21. 1 1
      src/views/dataEntry_manage/databaseComponents/updateNewestDia.vue
  22. 7 7
      src/views/dataEntry_manage/databaseList.vue
  23. 3 1
      src/views/dataEntry_manage/editChart.vue
  24. 66 17
      src/views/dataEntry_manage/mixins/addOreditMixin.js
  25. 25 17
      src/views/dataEntry_manage/mixins/chartPublic.js
  26. 159 103
      src/views/dataEntry_manage/thirdBase/ysTargetBase.vue
  27. 127 0
      src/views/edbHistoryPage.vue
  28. 16 7
      src/views/mychart_manage/components/chartDetailDia.vue
  29. 51 3
      src/views/ppt_manage/mixins/pptMixins.js
  30. 1 1
      src/views/ppt_manage/newVersion/components/formatEl/ChartEl.vue
  31. 17 1
      src/views/ppt_manage/newVersion/pptEnPublish.vue
  32. 18 3
      src/views/ppt_manage/newVersion/pptPublish.vue
  33. 4 4
      src/views/predictEdb_manage/addPredicEdb.vue
  34. 7 27
      src/views/predictEdb_manage/predictEdb.vue
  35. 3 3
      src/views/smartReport/editReport.vue
  36. 8 1
      src/views/smartReport/reportDetail.vue
  37. 1 1
      src/views/system_manage/components/smartReportImgSet.vue
  38. 31 5
      src/views/system_manage/etaBaseConfig.vue

+ 3 - 3
src/api/modules/thirdBaseApi.js

@@ -192,7 +192,7 @@ const smmDataInterface = {
    * 列表
 	*/
 	getYsDataList:params=>{
-		return http.get('datamanage/smm/api/list',params)
+		return http.post('datamanage/smm/api/list',params)
 	},
 	/**
    * 分类列表
@@ -204,13 +204,13 @@ const smmDataInterface = {
    * 检验有色指标是否存在
 	*/
 	getYsEdbCodeCheck:params=>{
-		return http.get('datamanage/edb_info/smm/exist/check',params)
+		return http.post('datamanage/edb_info/smm/exist/check',params)
 	},
 	/**
    * 查询有色指标
 	*/
 	getYsEdbCodeSearch:params=>{
-		return http.get('datamanage/edb_info/smm/search',params)
+		return http.post('datamanage/edb_info/smm/search',params)
 	},
 	/**
    * 批量添加有色指标

+ 1 - 0
src/components/edbHistoryDialog.vue

@@ -1,4 +1,5 @@
 <template>
+    <!-- ETA1.5.4 将该组件作为一个页面,若上线后无回滚需求可删除 -->
   <el-dialog
 		:visible.sync="isOpenDialog"
 		:close-on-click-modal="false"

+ 22 - 0
src/main.js

@@ -24,6 +24,28 @@ import{endCalc,optionTimeCalc,init}from'@/utils/TimeOnPage.js';
 import setting from '@/mixins/theme.js'
 Vue.prototype.$setting = setting;
 
+Vue.prototype.toHistoryPage = (EdbInfoId,from=[])=>{
+    console.log('from',from)
+    let pathArr = from.map(p=>{
+        return {
+            name:p.name||'',
+            path:p.path||''
+        }
+    })
+    pathArr.push({
+        name:'指标溯源',
+        path:'/edbHistory'
+    })
+    sessionStorage.setItem('edbHistoryPath',JSON.stringify(pathArr))
+    const href = router.resolve({
+        path:'/edbHistory',
+        query:{
+            edbId:EdbInfoId,
+        }
+    }).href
+    window.open(href,"_blank")
+}
+
 //Import Froala Editor
 import "froala-editor/js/plugins.pkgd.min.js";
 import "froala-editor/js/plugins/quick_insert.min.js";

+ 9 - 0
src/routes/modules/oldRoutes.js

@@ -81,6 +81,15 @@ export default [
           keepAlive: false,
         },
       },
+      {
+        path: "edbHistory",
+        component: () => import("@/views/edbHistoryPage.vue"),
+        name: "指标溯源",
+        hidden: true,
+        meta: {
+          keepAlive: false,
+        },
+      },
     ],
   },
 

+ 7 - 1
src/utils/buttonConfig.js

@@ -214,7 +214,9 @@ export const dataSourcePermission = {
     smmData_classifyOpt_add:'smmData:classifyOpt:add',//添加目录和子项
     smmData_classifyOpt_edit:'smmData:classifyOpt:edit',//编辑
     smmData_classifyOpt_delete:'smmData:classifyOpt:delete',//删除
-
+    /*--------有色原始数据库---- */
+    ysTarget_view:'ysTarget:view',
+    ysTarget_addBatch:'ysTarget:addBatch',
     /*--------百川盈孚---- */
     bcyfData_edit:'bcyfData:edit',//编辑指标按钮
     bcyfData_export:'bcyfData:export',
@@ -632,6 +634,10 @@ export const baseConfigPermission = {
     etaBaseConfig_watermark:'etaBaseConfig:watermark',
     etaBaseConfig_watermark_ybChart:'etaBaseConfig:watermark:ybChart',//如果没权限,表单不显示也不校验
     etaBaseConfig_approve:'etaBaseConfig:approve',//研报审批
+    etaBaseConfig_login:'baseSetting:loginSetting',//登录
+    etaBaseConfig_watermark_ybShare:'etaBaseConfig:watermark:ybShare',//如果没权限,表单不显示也不校验
+    etaBaseConfig_source_see:'baseSetting:sourceSetting:see',//资源库查看
+    etaBaseConfig_source_upload:'baseSetting:sourceSetting:upload',//资源库上传
 }
 
 /*-----------外部链接配置-------- */

+ 4 - 2
src/utils/defaultOptions.js

@@ -81,7 +81,9 @@ export const defaultOpts = {
 	legend: {
 		enabled: true,
 		verticalAlign: 'top',
-		margin:5,
+		margin:12,
+		itemMarginBottom:0,
+		itemMarginTop: 0
 		// layout: 'vertical'
 	},
 	//滚动条
@@ -200,7 +202,7 @@ export const copyOtherOptions = {
 			color: '#444',
 			textOverflow:undefined
 		},
-		itemMarginBottom:5,
+		itemMarginBottom:0,
 		itemDistance: 0,
 		padding: 0,
 		margin: 10

+ 2 - 2
src/utils/registryComponents.js

@@ -19,8 +19,8 @@ import selectUnit from '@/components/selectUnit.vue'
 Vue.component('selectUnit',selectUnit)
 
 //查看指标历史
-import edbHistoryDialog from '@/components/edbHistoryDialog.vue';
-Vue.component('edbHistoryDialog',edbHistoryDialog);
+/* import edbHistoryDialog from '@/components/edbHistoryDialog.vue';
+Vue.component('edbHistoryDialog',edbHistoryDialog); */
 
 //缺省图统一
 import tableNoData from '@/components/tableNoData.vue'

+ 17 - 1
src/views/Home.vue

@@ -131,7 +131,8 @@
               
               <!-- 面包屑 -->
               <el-breadcrumb separator="/" class="breadcrumb-inner">
-                <el-breadcrumb-item
+                <template v-if="$route.path!=='/edbHistory'">
+                    <el-breadcrumb-item
                   v-for="item in $route.matched"
                   :key="item.path"
                 >
@@ -190,6 +191,18 @@
                   </span>
                   <span v-else>{{ item.name }}</span>
                 </el-breadcrumb-item>
+                </template>
+                <template v-else>
+                    <el-breadcrumb-item v-for="(item,index) in edbHistoryPath" :key="item.path">
+                        <span v-if="index===0">{{item.name}}</span>
+                        <span v-else>
+                            <span @click.stop="$router.push(item.path)" :style="`cursor: pointer; color: ${$setting.theme_color}`">
+                                {{item.name}}
+                            </span>
+                        </span>
+                    </el-breadcrumb-item>
+                </template>
+                
               </el-breadcrumb>
             </div>
 
@@ -346,6 +359,9 @@ export default {
     },
   },
   computed: {
+    edbHistoryPath(){
+        return JSON.parse(sessionStorage.getItem('edbHistoryPath'))||[]
+    },
     breadSelfName() {
       return this.$store.state.breadSelfName;
     },  

+ 58 - 1
src/views/chartFrame_manage/common/config.js

@@ -29,7 +29,7 @@ export const textTool = {
         }]
     }
 }
-//基础节点
+//基础节点 有图分类的节点
 export const baseNode = {
     shape:'rect',
     width: 120,
@@ -86,6 +86,63 @@ export const baseNode = {
         }
     },
 }
+//基础节点2 无图分类的节点
+export const baseNode2 = {
+    shape:'rect',
+    width: 120,
+    height: 50,
+    attrs:{
+        text:{ //文字换行
+            textWrap: {
+                width: -10,
+                ellipsis: true,
+            }
+        },
+        body:{
+            fill:'#FFF1E9',//背景色
+            stroke:'#F7A340',//边框色
+            strokeWidth:1,//边框宽度
+            strokeDasharray:'',//虚线,如果赋值为0保存缩略图时会省略掉边框
+        },
+        label:{ //与svg text属性相同
+            fill:'#E37318',//文字颜色
+            fontSize:14,//文字大小
+            fontWeight:'normal',//文字粗细
+            fontStyle:'normal',//斜体
+            textDecoration:'normal',//下划线
+        }
+    },
+    ports: { //基础连接桩
+        items: [
+            { group: 'port-top', id: 'p_top' },
+            { group: 'port-bottom', id: 'p_bottom' },
+            { group: 'port-left', id: 'p_left' },
+            { group: 'port-right', id: 'p_right' },
+        ],
+        groups: {
+            "port-top": {
+                    position: 'top',
+                    zIndex: 20,
+                    ...portStyle
+            },
+            "port-bottom": {
+                    position: 'bottom',
+                    zIndex: 20,
+                    ...portStyle
+            },
+            "port-left": {
+                    position: 'left',
+                    zIndex: 20,
+                    ...portStyle
+            },
+            "port-right": {
+                    position: 'right',
+                    zIndex: 20,
+                    ...portStyle
+            },
+        }
+    },
+}
 //基础线条
 export const baseEdge = {
     attrs:{

+ 2 - 2
src/views/chartFrame_manage/common/event.js

@@ -12,8 +12,8 @@ export const myEvents = (graph,tempThis=null)=>{
 
     graph.on('node:click',({node,e})=>{
         if(!window.location.pathname.startsWith('/chartframe')) return 
-        console.log('node.data',node.data)
-        if(node.data&&node.data.id){
+        //console.log('node.data',node.data)
+        if(node.data){
             tempThis&&tempThis.$emit('showDialog',node.data)
         }
     })

+ 50 - 15
src/views/chartFrame_manage/components/frameContainer.vue

@@ -32,7 +32,7 @@
 <script>
 import { ElDropdownMenu } from 'element-ui';
 import { myGraph } from '../common/graph';
-import { baseNode , textTool } from '../common/config';
+import { baseNode , baseNode2 , textTool } from '../common/config';
 import FrameToolBar from './frameToolBar.vue';
 export default {
     components:{ElDropdownMenu,FrameToolBar},
@@ -95,7 +95,7 @@ export default {
             //如果有内容,初始化画布内容
             this.FrameworkContent.length&&this.graph.fromJSON(JSON.parse(this.FrameworkContent))
             //如果有内容,将画布内容居中
-            this.FrameworkContent.length&&this.graph.scrollToContent({ animation: { duration: 600 }})
+            this.FrameworkContent.length&&this.graph.scrollToContent(/* { animation: { duration: 600 }} */)
             //如果有内容,遍历每个节点,赋值chartNum
             this.FrameworkContent.length&&this.setNodeInfo()
             //如果是非编辑页,加载完成画布内容后冻结画布
@@ -113,48 +113,83 @@ export default {
                 const currentNode = nodes.find(item=>item.id===node.NodeId)
                 if(currentNode){
                     currentNode.removeTools()
+                    if(!currentNode.data.id) return
                     const toolOption = this.getToolOption({chartNum:node.ChartNum||0,color:currentNode.attrs.label.fill})
                     currentNode.addTools(toolOption)
                 }
             })
         },
         //添加/编辑节点
-        editNode(node){
+        editNode({nodeLink={},nodeName='',nodeId}){
             //获取视口范围
             const position = this.graph.getContentArea()
             const nodes = this.graph.getNodes()
-            const currentNode = nodes.find(item=>item.id===node.nodeId)
+            const currentNode = nodes.find(item=>item.id===nodeId)
+            let tempNode = currentNode
             if(currentNode){
-                currentNode.data.id=node.nodeLink.MyChartClassifyId
-                currentNode.label=node.nodeName
-                currentNode.data.nodeLink = node.nodeLink
+                const oldId = currentNode.data.id
+                const newId = nodeLink.MyChartClassifyId||0
+                const isSetStyle = (oldId===0&&newId!==0)||(oldId!==0&&newId===0)
+                isSetStyle&&this.setNodeStyle(newId,tempNode)
+                
+                tempNode.data.id=nodeLink.MyChartClassifyId||0
+                tempNode.label=nodeName
+                tempNode.data.nodeLink = nodeLink
+                /* currentNode.data.id=nodeLink.MyChartClassifyId||0
+                currentNode.label=nodeName
+                currentNode.data.nodeLink = nodeLink
                 currentNode.removeTools()
-                const toolOption = this.getToolOption({chartNum:node.nodeLink.ChartNum,color:currentNode.attrs.label.fill})
-                currentNode.addTools(toolOption)
+                const newId = currentNode.data.id
+                const isSetStyle = (oldId===0&&newId!==0)||(oldId!==0&&newId===0)
+                isSetStyle&&this.setNodeStyle(newId,currentNode)
+                if(!currentNode.data.id) return 
+                const toolOption = this.getToolOption({chartNum:nodeLink.ChartNum,color:currentNode.attrs.label.fill})
+                currentNode.addTools(toolOption) */
             }else{
                 //在视口范围内添加节点
-                this.graph.addNode({
-                    ...baseNode,
+                const nodeStyle = nodeLink.MyChartClassifyId?baseNode:baseNode2
+                tempNode = this.graph.addNode({
+                    ...nodeStyle,
                     ...{
                     x:position.x+position.width/2+20,
                     y:position.y+position.height/2+20,
                     width:120,
                     height:50,
                     data:{
-                        id:node.nodeLink.MyChartClassifyId,//存储节点对应的myETA分类id
-                        nodeLink:node.nodeLink,
+                        id:nodeLink.MyChartClassifyId||0,//存储节点对应的myETA分类id
+                        nodeLink:nodeLink,
                     },
-                    label:node.nodeName||'',
-                    tools:[this.getToolOption({chartNum:node.nodeLink.ChartNum,color:baseNode.attrs.label.fill})]
+                    label:nodeName,
                 }})
             }
+            tempNode.removeTools()
+            if(!tempNode.data.id) return 
+            const toolOption = this.getToolOption({chartNum:nodeLink.ChartNum,color:tempNode.attrs.label.fill})
+            tempNode.addTools(toolOption)
         },
+        //设置节点图分类的数量
         getToolOption({chartNum,color}){
             const options = _.cloneDeep(textTool)
             options.args.markup[0].textContent = chartNum +''
             options.args.markup[0].attrs.fill = color
             return options
         },
+        //设置有无图分类节点的样式
+        //type: 0 无图分类 非0 有图分类
+        //非0 表示节点从无图分类转换成有图分类,节点样式重置为baseNode
+        //0 表示节点从有图分类转换成无图分类,节点样式重置为baseNode2
+        setNodeStyle(type,node){
+            const {attrs={}} = type?baseNode:baseNode2
+            const {body,label} = attrs
+            const styleMap = {
+                'label/fill':label.fill,
+                'body/fill':body.fill,
+                'body/stroke':body.stroke
+            }
+            for(let k in styleMap){
+                node.attr(k,styleMap[k])
+            }
+        },
         //点击右键菜单事件
         handleContext(key){
             const select_cell = this.graph.getSelectedCells()

+ 13 - 5
src/views/chartFrame_manage/frameEditor.vue

@@ -36,10 +36,10 @@
                     :rules="rules"
                 >
                     <el-form-item label="节点名称" prop="nodeName">
-                        <el-input v-model.trim="modifyNode.nodeName" placeholder="请输入节点名称" style="width:217px;"></el-input>
+                        <el-input v-model="modifyNode.nodeName" placeholder="请输入节点名称" style="width:217px;"></el-input>
                     </el-form-item>
                     <el-form-item label="节点链接" prop="nodeLink">
-                        <el-select v-model="modifyNode.nodeLink" value-key="MyChartClassifyId" placeholder="请选择节点链接" style="width:217px;">
+                        <el-select v-model="modifyNode.nodeLink" value-key="MyChartClassifyId" placeholder="请选择节点链接" clearable style="width:217px;">
                             <el-option v-for="item in myList" 
                                 :key="item.MyChartClassifyId"
                                 :label="item.MyChartClassifyName"
@@ -75,11 +75,14 @@ export default {
                 Nodes:[]
             },
             lockLoding:null,
-            modifyNode: {},//正在编辑的节点
+            modifyNode: {
+                nodeName:'',
+                nodeLink:{}
+            },//正在编辑的节点
             isModifyNodeDialogShow: false,//编辑节点弹窗
             rules: {
                 nodeName: [{ required: true, message: "请输入节点名称", trigger: "blur" }],
-                nodeLink: [{ required: true, message: "请选择节点链接", trigger: "blur" }]
+                /* nodeLink: [{ required: true, message: "请选择节点链接", trigger: "blur" }] */
             },
             myList:[],//我的图库列表
         };
@@ -93,7 +96,12 @@ export default {
         },
         //编辑节点,更改子组件节点信息,隐藏弹窗
         async editNode() {
-            await this.$refs.refForm.validate();
+            this.modifyNode.nodeName&&(this.modifyNode.nodeName = this.modifyNode.nodeName.trim())
+            try{
+                await this.$refs.refForm.validate();
+            }catch(e){
+                return
+            }
             if(!this.$refs.container) return
             this.$refs.container.editNode(this.modifyNode)
             this.$message.success(`${this.modifyNode.nodeId ? '编辑' : '添加'}节点成功`);

+ 4 - 0
src/views/chartFrame_manage/index.vue

@@ -536,6 +536,10 @@ export default {
         },
         //点击框架内节点
         handleShowDialog({id,nodeLink}){
+            if(!id){
+                this.$message.warning("该节点没有选择图分类")
+                return
+            }
             //请求接口看有没有数据
             mychartInterface.myList({
                 PageSize:1200,

+ 10 - 1
src/views/chartRelevance_manage/crossVarietyAnalysis/components/edbTableSection.vue

@@ -14,7 +14,16 @@
         align="center"
       >
         <template slot-scope="scope">
-          <span>{{ scope.row[item.key] }}</span>
+            <span v-if="item.key==='SourceName'">
+                {{scope.row[item.key]}}
+                <i 
+                    class="el-icon-tickets" 
+                    style="color:#409EFF;font-size:18px" 
+                    @click="toHistoryPage(scope.row.EdbInfoId,$route.matched)"
+                    v-if="scope.row.EdbType===2"
+                />
+            </span>
+          <span v-else>{{ scope.row[item.key] }}</span>
         </template>
       </el-table-column>
       <el-table-column label="操作" key="Copy" align="center" width="140">

+ 9 - 0
src/views/chartRelevance_manage/relevance/list.vue

@@ -230,6 +230,15 @@
                     clearable
                   />
                 </div>
+                <span v-else-if="item.key==='SourceName'">
+                    {{scope.row[item.key]}}
+                    <i 
+                      class="el-icon-tickets" 
+                      style="color:#409EFF;font-size:18px" 
+                      @click="toHistoryPage(scope.row.EdbInfoId,$route.matched)"
+                      v-if="scope.row.EdbType===2"
+                    />
+                  </span>
                 <span v-else>{{ scope.row[item.key] }}</span>
               </template>
             </el-table-column>

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

@@ -511,7 +511,7 @@
 									color: ${JSON.parse(chartInfo.SourcesFrom).isShow ? JSON.parse(chartInfo.SourcesFrom).color : '#999'};
 									fontSize: ${ JSON.parse(chartInfo.SourcesFrom).fontSize }px;
 								`"
-								>数据来源:{{ JSON.parse(chartInfo.SourcesFrom).text}}
+								>来源:{{ JSON.parse(chartInfo.SourcesFrom).text}}
 								</span>
 
 								<el-switch

+ 3 - 3
src/views/dataEntry_manage/adjustdata/adjustData.vue

@@ -27,7 +27,7 @@
               >
               </el-option>
             </el-select>
-            <i class="el-icon-tickets" style="color:#409EFF;font-size:18px" @click="isLookHistory=true;lookEdbId=select_target" v-if="select_target"/>
+            <i class="el-icon-tickets" style="color:#409EFF;font-size:18px" @click="toHistoryPage(select_target,$route.matched);lookEdbId=select_target" v-if="select_target"/>
           </li>
           <li v-show="old_edb_info.id">
             <label style="margin-right:5px;"> 查询结果:</label>
@@ -137,10 +137,10 @@
     </div>
 
     <!-- 指标历史记录 -->
-    <edbHistoryDialog
+    <!-- <edbHistoryDialog
       :isOpenDialog.sync="isLookHistory"
       :edbId="lookEdbId"
-    />
+    /> -->
   </div>
 </template>
 

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

@@ -493,13 +493,14 @@
 
                   <div class="chart-bottom-insruction-info">
 
-                    <div class="chart-source" v-if="chartInfo.SourcesFrom&&JSON.parse(chartInfo.SourcesFrom).isShow">
+                    <div class="chart-source" >
                         <span
+                          v-if="chartInfo.SourcesFrom&&JSON.parse(chartInfo.SourcesFrom).isShow"
                           :style="`
                           color: ${JSON.parse(chartInfo.SourcesFrom).color};
                           fontSize: ${ JSON.parse(chartInfo.SourcesFrom).fontSize }px;
                         `"
-                        >数据来源:{{ JSON.parse(chartInfo.SourcesFrom).text}}</span>
+                        >来源:{{ JSON.parse(chartInfo.SourcesFrom).text}}</span>
                     </div>
 
                     <!-- 公历农历切换 只用于季节性图 -->
@@ -633,7 +634,7 @@
                     <i 
                       class="el-icon-tickets" 
                       style="color:#409EFF;font-size:18px" 
-                      @click="isLookHistory=true;lookEdbId=scope.row.EdbInfoId"
+                      @click="toHistoryPage(scope.row.EdbInfoId,$route.matched)"
                       v-if="scope.row.EdbType===2"
                     />
                   </span>
@@ -783,10 +784,10 @@
     />
 
     <!-- 指标历史记录 -->
-    <edbHistoryDialog
+    <!-- <edbHistoryDialog
       :isOpenDialog.sync="isLookHistory"
       :edbId="lookEdbId"
-    />
+    /> -->
   </div>
 </template>
 
@@ -1590,6 +1591,9 @@ export default {
       }
       if (res.Ret !== 200) return;
       this.chartInfo = res.Data.ChartInfo;
+
+      //处理下历史默认来源
+			this.setDefaultSourceFrom();
   
       this.tableData = res.Data.EdbInfoList;
       // 设置起始日期和最新日期

+ 6 - 6
src/views/dataEntry_manage/components/markersSection.vue

@@ -70,7 +70,7 @@
       <div
         class="add-cont"
         v-if="!chartInstruction.text"
-        @click="addChartInductionHandle"
+        @click="addChartInductionHandle('add')"
       >
         <img
           src="~@/assets/img/set_m/add_ico.png"
@@ -158,8 +158,8 @@ export default {
       chartInstruction:{
         text: '',
         isShow: true,
-        color: this.chartInfo.ChartThemeStyle?JSON.parse(this.chartInfo.ChartThemeStyle).markerOptions.style.color:'#333',
-        fontSize: this.chartInfo.ChartThemeStyle?JSON.parse(this.chartInfo.ChartThemeStyle).markerOptions.style.fontSize:12
+        color: '',
+        fontSize: ''
       } ,
 
       /* 标识线区弹窗 */
@@ -216,13 +216,13 @@ export default {
       this.updateChartHandle()
     },
 
-    addChartInductionHandle() {
+    addChartInductionHandle(type='') {
       const { text,color,fontSize } = this.chartInstruction;
       this.chartInductionDiaForm = {
         show: true,
         text,
-        color,
-        fontSize
+        color:type==='add'?JSON.parse(this.chartInfo.ChartThemeStyle).markerOptions.style.color:color,
+        fontSize: type==='add'?JSON.parse(this.chartInfo.ChartThemeStyle).markerOptions.style.fontSize:fontSize
       }
     },
 

+ 14 - 14
src/views/dataEntry_manage/databaseComponents/chartTrendRender.vue

@@ -505,8 +505,10 @@ export default {
 					text: yTitleText,
 					align: 'high',
 					rotation: 0,
-					y: -15,
-					offset: 0,
+					y: -12,
+					x: 0,
+					textAlign: 'left',
+					reserveSpace: false,
 					style:yTitleStyle
 				},
 				labels: {
@@ -600,10 +602,6 @@ export default {
           );
           const s_yItem = {
             labels: {
-              formatter: function () {
-                let val = this.value;
-                return index !== 0 ? '' : val;
-              },
               align: 'center',
             },
             title: {
@@ -611,12 +609,15 @@ export default {
 							!this.chartInfo.UnitEn && this.chartInfo.Unit && this.chartInfo.Unit!='无' ? '英文单位':this.chartInfo.UnitEn,
               align: 'high',
               rotation: 0,
-              y: -15,
-              offset: -(12 * this.chartInfo.Unit.length),
+							y: -12,
+							x: 0,
+							textAlign: 'left',
+							reserveSpace: false,
             },
             max: Number(this.chartInfo.MaxValue),
             min: Number(this.chartInfo.MinValue),
             ...seasonOptions.yAxis,
+						visible: index===0
           };
           seasonData.push(serie_item);
           seasonYdata.push(s_yItem);
@@ -644,10 +645,6 @@ export default {
           const index = filterArr.findIndex((item) => item.Year === j.Year);
           const s_yItem = {
             labels: {
-              formatter: function () {
-                let val = this.value;
-                return index !== 0 ? '' : val;
-              },
               align: 'center',
             },
             title: {
@@ -655,12 +652,15 @@ export default {
 							!this.chartInfo.UnitEn && this.chartInfo.Unit && this.chartInfo.Unit!='无' ? '英文单位':this.chartInfo.UnitEn,
               align: 'high',
               rotation: 0,
-              y: -15,
-              offset: -(12 * this.chartInfo.Unit.length),
+              y: -12,
+							x: 0,
+							textAlign: 'left',
+							reserveSpace: false,
             },
             max: Number(this.chartInfo.MaxValue),
             min: Number(this.chartInfo.MinValue),
             ...seasonOptions.yAxis,
+						visible: index===0
           };
           seasonData.push(serie_item);
           seasonYdata.push(s_yItem);

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

@@ -165,7 +165,7 @@ export default {
       const res = await dataBaseInterface.insertData({
         EdbInfoId: edbId,
         Date: date,
-        value: Number(value)
+        value: value
       })
 
       if(res.Ret !== 200) return

+ 7 - 7
src/views/dataEntry_manage/databaseList.vue

@@ -241,7 +241,7 @@
 							<el-button v-if="activeTab==='Chart'&&isEdbBtnShow('saveEdb')"
 								type="text" @click.stop="saveEdbLimit">保存</el-button>
 							<el-button v-if="EdbData.EdbType===2&&isEdbBtnShow('toSource')"
-								type="text" @click="isLookHistory=true;lookEdbId=selected_edbid">指标溯源</el-button>
+								type="text" @click="toHistoryPage(selected_edbid,$route.matched);lookEdbId=selected_edbid">指标溯源</el-button>
 							<el-popover v-if="showPopver"
 								placement="bottom-end" 
 								trigger="hover"
@@ -356,7 +356,7 @@
 			@cancel="computed_type=0"
 			@addCallBack="addComputedCallBack"
 			@openPrev="isOpenComputed=true"
-			@lookHistory="id => {isLookHistory=true;lookEdbId=id;}"
+			@lookHistory="id => {toHistoryPage(id,$route.matched);lookEdbId=id;}"
 		/>
 		<!-- 计算弹窗控制 -->
 		<el-dialog
@@ -403,7 +403,7 @@
 			@cancel="computed_type=0"
 			@addCallBack="addComputedCallBack"
 			@openPrev="isOpenComputed=true"
-			@lookHistory="id => {isLookHistory=true;lookEdbId=id;}"
+			@lookHistory="id => {toHistoryPage(id,$route.matched);lookEdbId=id;}"
 			@changeSource="changeComputedType"
 		/>
 		<!-- 一键成图弹窗 -->
@@ -454,7 +454,7 @@
 			@cancel="computed_type=0"
 			@addCallBack="addComputedCallBack"
 			@openPrev="isOpenComputed=true"
-			@lookHistory="id => {isLookHistory=true;lookEdbId=id;}"
+			@lookHistory="id => {toHistoryPage(id,$route.matched);lookEdbId=id;}"
 			@changeSource="changeComputedType"
 		/>
 
@@ -477,10 +477,10 @@
 		/>
 
 		 <!-- 指标历史记录 -->
-    <edbHistoryDialog
+    <!-- <edbHistoryDialog
       :isOpenDialog.sync="isLookHistory"
       :edbId="lookEdbId"
-    />
+    /> -->
 		<!-- 指数修匀弹窗 -->
 		<SmoothEdbDialog 
 			:is-open-smooth="computed_type==='alpha'"
@@ -489,7 +489,7 @@
 			@cancel="computed_type=0"
 			@openPrev="isOpenComputed=true"
 			@addCallBack="addComputedCallBack"
-			@lookHistory="id => {isLookHistory=true;lookEdbId=id;}"
+			@lookHistory="id => {toHistoryPage(id,$route.matched);lookEdbId=id;}"
 		/>
 	</div>
 </template>

+ 3 - 1
src/views/dataEntry_manage/editChart.vue

@@ -508,7 +508,7 @@
 										color: ${JSON.parse(chartInfo.SourcesFrom).isShow ? JSON.parse(chartInfo.SourcesFrom).color : '#999'};
 										fontSize: ${ JSON.parse(chartInfo.SourcesFrom).fontSize }px;
 									`"
-									>数据来源:{{ JSON.parse(chartInfo.SourcesFrom).text}}</span>
+									>来源:{{ JSON.parse(chartInfo.SourcesFrom).text}}</span>
 								<el-switch
 									v-if="chartInfo.SourcesFrom"
 									v-model="chartInfo.SourcesFromVisable"
@@ -735,6 +735,8 @@ export default {
 						Unit: ChartInfo.ChartType===7 ? BarChartInfo.Unit : ChartInfo.Unit,
 						SourcesFromVisable: ChartInfo.SourcesFrom ? JSON.parse(ChartInfo.SourcesFrom).isShow : true
 					};
+					//处理下历史默认来源
+					this.setDefaultSourceFrom();
 
 					this.$refs.markerSectionRef.initData(ChartInfo);
 

+ 66 - 17
src/views/dataEntry_manage/mixins/addOreditMixin.js

@@ -281,6 +281,10 @@ export default {
 				if(res.Ret !== 200) return
 
 				const { EdbInfoList,XEdbIdValue,YDataList,ChartInfo } = res.Data;
+				this.chartInfo = {
+					...this.chartInfo,
+					ChartSource: ChartInfo.ChartSource
+				}
 
 				let xData = XEdbIdValue.map(_ => EdbInfoList.find(edb => edb.EdbInfoId===_).EdbAliasName)
 
@@ -299,7 +303,7 @@ export default {
 				}
 				
 				//默认来源搞一下
-				this.setDefaultSourceFrom(ChartInfo);
+				this.setDefaultSourceFrom();
 			})
 		},
 
@@ -615,6 +619,10 @@ export default {
 				if(res.Ret !== 200) return
 				
 				const { EdbInfoList,DataResp,ChartInfo } = res.Data;
+				this.chartInfo = {
+					...this.chartInfo,
+					ChartSource: ChartInfo.ChartSource
+				}
 
 				this.sectionScatterData = DataResp;
 				this.tableData = EdbInfoList;
@@ -632,7 +640,7 @@ export default {
 				}
 
 				//默认来源搞一下
-				this.setDefaultSourceFrom(ChartInfo);
+				this.setDefaultSourceFrom();
 			})
 		},
 
@@ -818,6 +826,7 @@ export default {
 
 				this.tableData[index].ChartWidth = themeOpt.lineOptions.lineWidth;
 			})
+
 		},
 
 		/* 获取主题列表  type init时重新设置默认样式和主题*/
@@ -838,14 +847,66 @@ export default {
 		/* 改变主题时 */
 		changeThemeHandle() {
 			this.chartInfo.ChartThemeStyle = this.chartThemeArr.find(_ => _.ChartThemeId===this.chartInfo.ChartThemeId).Config;
-			this.resetChartEdbDefault()
-			
+
+			//重置指标样式
+			this.resetChartEdbDefault();
+
+			//重置标识线区来源样式
+			this.resetMarkerThemeStyle();
+
 			this.reLoadChartOption();
 		},
 
+		//切换主题重置标示线,区,来源,说明等配置样式
+		resetMarkerThemeStyle() {
+			let themeOpt = JSON.parse(this.chartInfo.ChartThemeStyle);
+
+			if(this.chartInfo.Instructions) {
+				let instructionObj = JSON.parse(_.cloneDeep(this.chartInfo.Instructions))
+				this.chartInfo.Instructions = JSON.stringify({
+					...instructionObj,
+					color: themeOpt.markerOptions.style.color,
+      		fontSize: themeOpt.markerOptions.style.fontSize,
+				})
+
+				this.$refs.markerSectionRef&&this.$refs.markerSectionRef.initData(this.chartInfo);
+			}
+
+			if(this.chartInfo.SourcesFrom) {
+				let sourceObj = JSON.parse(_.cloneDeep(this.chartInfo.SourcesFrom))
+				this.chartInfo.SourcesFrom = JSON.stringify({
+					...sourceObj,
+					color: themeOpt.markerOptions.style.color,
+      		fontSize: themeOpt.markerOptions.style.fontSize,
+				})
+			}
+
+			if(this.chartInfo.MarkersLines&&JSON.parse(this.chartInfo.MarkersLines).length) {
+				let markerLines = JSON.parse(_.cloneDeep(this.chartInfo.MarkersLines))
+				this.chartInfo.MarkersLines = JSON.stringify(markerLines.map(_ => ({
+					..._,
+					textColor: themeOpt.markerOptions.style.color,
+          textFontSize: themeOpt.markerOptions.style.fontSize,
+				})))
+
+				this.$refs.markerSectionRef&&this.$refs.markerSectionRef.initData(this.chartInfo);
+			}
+			
+			if(this.chartInfo.MarkersAreas&&JSON.parse(this.chartInfo.MarkersAreas).length) {
+				let markerAreas = JSON.parse(_.cloneDeep(this.chartInfo.MarkersAreas))
+				this.chartInfo.MarkersAreas = JSON.stringify(markerAreas.map(_ => ({
+					..._,
+					textColor: themeOpt.markerOptions.style.color,
+          textFontSize: themeOpt.markerOptions.style.fontSize,
+				})))
+
+				this.$refs.markerSectionRef&&this.$refs.markerSectionRef.initData(this.chartInfo);
+			}
+		},
+
 		/* 更新图表标识区,标识线,图表说明 */
 		setChartMarkerInfo({ markerLinesArr,markerAreasArr,chartInstruction }) {
-			this.chartInfo.MarkersLines = JSON.stringify (markerLinesArr);
+			this.chartInfo.MarkersLines = JSON.stringify(markerLinesArr);
 			this.chartInfo.MarkersAreas = JSON.stringify(markerAreasArr);
 			this.chartInfo.Instructions = JSON.stringify(chartInstruction);
 
@@ -866,18 +927,6 @@ export default {
 				: this.setChartOptionHandle(this.tableData);
 		},
 
-		/* 添加图表默认显示图表来源 */
-		setDefaultSourceFrom(ChartInfo) {
-			if(!this.chartInfo.SourcesFrom) {
-				this.chartInfo.SourcesFrom = JSON.stringify({
-					isShow: this.chartInfo.SourcesFromVisable,
-					text: ChartInfo.ChartSource,
-					color: JSON.parse(this.chartInfo.ChartThemeStyle).markerOptions.style.color,
-					fontSize: JSON.parse(this.chartInfo.ChartThemeStyle).markerOptions.style.fontSize
-				});
-			}
-		},
-
 		/* 数据来源显示隐藏 */
 		changeSourceVisable() {
 			this.chartInfo.SourcesFrom = JSON.stringify({

+ 25 - 17
src/views/dataEntry_manage/mixins/chartPublic.js

@@ -977,7 +977,7 @@ export const chartSetMixin = {
         xDateFormat: '%m/%d',
       }
 
-      let colors = chartTheme&&chartTheme.colorsOptions.reverse();
+      let colors = chartTheme&&chartTheme.colorsOptions.reverse()||seasonOptions.colors;
       this.options = {
         colors: colors.slice(-chartDataHandle.length),
         series: seasonData,
@@ -2348,23 +2348,18 @@ export const chartSetMixin = {
       let dynamic_copyOptions = {
         legend: {
           labelFormatter: function () {
-            let count = 0
-            let reg = ''
-            // let newName = this.name.replace(/-/g, "—").replace(/\s/g, "").replace(reg, "$1<br/>");
-            let newName=''
-            if(this.currentLang == 'ch'){
-              count = widthNum > 1000 ? 510 / 14 : 15;
-              reg = new RegExp("(.{" + parseInt(count) + "})", "g");
-              newName = this.name.replace(/-/g, "—").replace(/\s/g, "").replace(/(/g, "(").replace(/)/g, ")").replace(reg, "$1<br/>");
-            }else{
-              // '<span style="color:#999">无英文名称</span>' 没有填写指标名称 显示为空
-              if(this.name.indexOf('<span style="color:#999">无英文名称</span>')!=-1) this.name=''
-              newName = this.name.replace(/(/g, "(").replace(/)/g, ")");
-            }
-            let finalName=  newName.substring(newName.length - 6, newName.length) === "<br/>)" ? newName.slice(0, newName.length - 6) + ")" : newName;
-            return finalName;
+            let count =  Math.floor(widthNum/2/15);//多少字数换行;
+            let reg2 = new RegExp("(.{" + count + "})", "g");
+              
+            let  newName = this.name.replace(/-/g, "—").replace(/\s/g, "").replace(/(/g, "(").replace(/)/g, ")").replace(reg2, "$1<br/>");
+            return newName;
           },
           itemWidth: widthNum > 1000 ? 530 : 235,
+          itemStyle: {
+            fontSize: 10,
+            color: this.chartInfo.ChartThemeStyle&&JSON.parse(this.chartInfo.ChartThemeStyle).legendOptions.itemStyle.color,
+            textOverflow:undefined
+          },
         },
         seasonLegend: {},
       };
@@ -2568,6 +2563,19 @@ export const chartSetMixin = {
       })
 
       return plotBands
-    }
+    },
+
+    /* 历史图表默认显示图表来源 d毛后端不修复只能自己每次详情处理下*/
+		setDefaultSourceFrom() {
+			if(!this.chartInfo.SourcesFrom) {
+        let themeOpt = JSON.parse(this.chartInfo.ChartThemeStyle);
+				this.chartInfo.SourcesFrom = JSON.stringify({
+					isShow: true,
+					text: this.chartInfo.ChartSource,
+					color: themeOpt&&themeOpt.markerOptions.style.color,
+					fontSize: themeOpt&&themeOpt.markerOptions.style.fontSize
+				});
+			}
+		},
 	}
 }

+ 159 - 103
src/views/dataEntry_manage/thirdBase/ysTargetBase.vue

@@ -1,32 +1,37 @@
 <template>
   <div id="YS-data-container" v-loading="dataLoading" element-loading-text="指标数据加载中,请勿切换到其他页面">
-    <div class="search-zone">
+    <div class="search-zone" v-loading="listLoading" element-loading-text="列表加载中,请稍后">
       <div class="search-row">
-        <el-cascader @change="searchList" :options="classifyList" v-model="typesList" clearable
-          placeholder="请选择分类" class="search-item"
-          :props="{
-            value:'Type',
-            label:'Type',
-            children:'Child'
-          }"></el-cascader>
-        <el-select v-model="searchParams.Frequency" class="search-item" placeholder="请选择频度" clearable @change="searchList">
-          <el-option :label="item" :value="item" v-for="item in frequencyList" :key="item"></el-option>  
+        <el-cascader @change="searchList" :options="classifyList" v-model="typeChecks" 
+        clearable placeholder="请选择分类" class="search-item" collapse-tags	
+        :props="{
+          value:'Type',
+          label:'Type',
+          children:'Child',
+          multiple:true
+        }"></el-cascader>
+        <el-select v-model="frequencyChecks" class="search-item" placeholder="请选择频度" 
+        multiple collapse-tags clearable @change="searchListDelay">
+          <el-option :label="item" :value="item" v-for="item in frequencyList" :key="item" ></el-option>  
         </el-select>
-        <el-select v-model="searchParams.DataState" class="search-item" placeholder="请选择指标数据状态" clearable @change="searchList">
+        <el-select v-model="dataStateChecks" class="search-item" placeholder="请选择指标数据状态" 
+        multiple collapse-tags clearable @change="searchListDelay">
           <el-option :label="item.label" :value="item.value" v-for="item in dataStatusList" :key="item.value"></el-option>  
         </el-select>
-        <el-select v-model="edbCheckList" multiple filterable remote clearable collapse-tags class="search-item edb-filter"
+        <el-input v-model="searchParams.Keyword" placeholder="请输入指标ID/指标名称" class="search-item" clearable 
+        @blur="searchListDelay(!keyWordChanged)" @keyup.enter.native="searchListDelay(!keyWordChanged)" @clear="searchList"></el-input>
+        <!-- <el-select v-model="edbCheckList" multiple filterable remote clearable collapse-tags class="search-item edb-filter"
           reserve-keyword placeholder="指标ID/指标名称" :remote-method="remoteMethod" 
           v-loadMore="searchLoad" @clear="searchList" @remove-tag="removeEdbFilterTag" ref="edbFilterRef" >
           <el-option v-for="item in edbFilterDataList" :key="item.IndexCode"
             :label="item.IndexName" :value="item.IndexCode">
           </el-option>
-        </el-select>
+        </el-select> -->
         <el-checkbox label="列表全选" v-model="isCheckAll" :indeterminate="isCheckIndeterminate" style="margin: 0 20px 10px 0;"
         @change="listCheckAllChange"></el-checkbox>
       </div>
       <el-button type="primary" style="margin: 0 0 10px 0;padding:12px 18px ;" @click="addToEdbBase" 
-      :disabled="addBaseDisable">添加到指标库</el-button>
+      :disabled="addBaseDisable"  v-permission="permissionBtn.dataSourcePermission.ysTarget_addBatch">添加到指标库</el-button>
     </div>
     <div class="table-zone">
       <el-table :data="tableData" border @sort-change="sortChange"  @selection-change="selectionChange"
@@ -191,16 +196,20 @@ import { frequencyArr} from '../databaseComponents/util';
     data() {
       return {
         searchParams:{
-          Types:'',
+          Types:[],
           Frequency:'',
           DataState:'',
           CurrentIndex:1,
           PageSize:10,
           SortParam:'',
           SortType:'',
-          IndexCodes:''
+          Keyword:'',
+          // IndexCodes:''
         },
-        typesList:[],
+        keyWordChanged:false,
+        typeChecks:[],
+        frequencyChecks:[],
+        dataStateChecks:[],
         options:[],
         isCheckAll:false,
         isCheckIndeterminate:false,
@@ -210,17 +219,17 @@ import { frequencyArr} from '../databaseComponents/util';
         frequencyList: ["日度", "周度", "月度", "季度", "半年", "年度"],
         edbFrequencyList:frequencyArr,
         dataStatusList:[{value:'normal',label:'正常更新'},{value:'ceased',label:'已停更'},{value:'irregular',label:'更新依赖外部会有不定期延迟'}],
-        forSearchParams:{
-          Keyword:'',
-          CurrentIndex:1,
-          PageSize:20,
-        },
-        searchHaveMore: false,
-        edbFilterDataList:[],
+        // forSearchParams:{
+        //   Keyword:'',
+        //   CurrentIndex:1,
+        //   PageSize:20,
+        // },
+        // searchHaveMore: false,
+        // edbFilterDataList:[],
         // 选择的指标名称筛选项
-        edbCheckList:[],
+        // edbCheckList:[],
         // edb的过滤选项是否有变化,用于失焦是判断是否需要请求
-        hasEdbFilterChange:false,
+        // hasEdbFilterChange:false,
         selectionReactCancel:false, // 是否不触发 selection的逻辑
         tableData:[],
         tableDataIds:[],
@@ -249,24 +258,42 @@ import { frequencyArr} from '../databaseComponents/util';
         BatchList:[],
         addToEbdDiaShow:false,
         highLightIndex:[],
-        saveLoading:false
+        saveLoading:false,
+        listLoading:false
       }
     },
     computed:{
       addBaseDisable(){
         return !(this.isCheckAll || this.isCheckIndeterminate ) || (!(this.tableData && this.tableData.length>0))
+      },
+      isCanView(){
+        return this.permissionBtn.isShowBtn('dataSourcePermission','ysTarget_view')
       }
     },
     watch:{
-      edbCheckList(value){
-        this.hasEdbFilterChange=true
+      // edbCheckList(value){
+      //   this.hasEdbFilterChange=true
+      // },
+      typeChecks(value){
+        // console.log(value);
+        this.searchParams.Types = value.map(item => item.join(','))
       },
-      typesList(value){
+      frequencyChecks(value){
         if(value && value.length>0){
-          this.searchParams.Types = value.join(',')
+          this.searchParams.Frequency = value.join(',')
         }else{
-          this.searchParams.Types=''
+          this.searchParams.Frequency=''
         }
+      },
+      dataStateChecks(value){
+        if(value && value.length>0){
+          this.searchParams.DataState = value.join(',')
+        }else{
+          this.searchParams.DataState=''
+        }
+      },
+      'searchParams.Keyword'(value){
+        this.keyWordChanged=true
       }
     },
     created() {
@@ -275,21 +302,28 @@ import { frequencyArr} from '../databaseComponents/util';
     },
     mounted(){
       // el-select 的@blur绑定事件不生效代替方法
-      this.$refs.edbFilterRef.$refs.input.blur=()=>{
-        if(this.hasEdbFilterChange){
-          this.searchList()
-          this.hasEdbFilterChange=false
-        }
-      }
+      // this.$refs.edbFilterRef.$refs.input.blur=()=>{
+      //   if(this.hasEdbFilterChange){
+      //     this.searchList()
+      //     this.hasEdbFilterChange=false
+      //   }
+      // }
     },
     methods: {
       //获取有色数据库数据列表
       getList(type){
-        if(this.edbCheckList && this.edbCheckList.length>0){
-          this.searchParams.IndexCodes = this.edbCheckList.join(',')
-        }else{
-          this.searchParams.IndexCodes = ''
-        }
+        // return 
+        // 无权限查看
+        if(!this.isCanView) return 
+        // if(this.edbCheckList && this.edbCheckList.length>0){
+        //   this.searchParams.IndexCodes = this.edbCheckList.join(',')
+        // }else{
+        //   this.searchParams.IndexCodes = ''
+        // }
+        this.searchParams.Keyword = this.searchParams.Keyword.trim()
+        this.listLoading=true
+
+        // return 
         smmDataInterface.getYsDataList(this.searchParams).then(res=>{
           if(res.Ret == 200){
             this.tableData=res.Data.List || []
@@ -302,7 +336,7 @@ import { frequencyArr} from '../databaseComponents/util';
             if(type == 'adjustSelection'){
               this.adjustSelection()
             }else{
-              if(this.searchParams.Types || this.searchParams.Frequency || this.searchParams.DataState || this.searchParams.IndexCodes){
+              if((this.searchParams.Types && this.searchParams.Types.length>0) || this.searchParams.Frequency || this.searchParams.DataState || this.searchParams.Keyword){
                 this.isCheckAll=true
                 this.checkAllStatus=true
                 this.isCheckIndeterminate=false
@@ -313,11 +347,17 @@ import { frequencyArr} from '../databaseComponents/util';
               }
               this.listCheckAllChange(this.isCheckAll)
             }
+            this.keyWordChanged=false
           }
         })
+        .finally(()=>{
+          this.listLoading=false
+        })
       },
       // 获取有色数据库分类列表
       getYsClassifyList(){
+        // 无权限查看
+        if(!this.isCanView) return 
         smmDataInterface.getYsTypeDataList().then(res=>{
           if(res.Ret == 200){
             this.classifyList=res.Data || []
@@ -325,34 +365,43 @@ import { frequencyArr} from '../databaseComponents/util';
         })
 
       },
-      // 指标名称的远程搜索方法
-      remoteMethod(text){
-        this.forSearchParams.Keyword = text.trim()
-        this.forSearchParams.CurrentIndex = 1;
-        if(this.forSearchParams.Keyword){
-          this.searchApi()
-        }else{
-          this.edbFilterDataList = [];
-        }
-      },
-      searchApi(){
-        smmDataInterface.getYsDataList(this.forSearchParams).then(res=>{
-          if(res.Ret == 200){
-            let arr=res.Data.List || []
-            let {Paging}=res.Data
-            this.searchHaveMore = this.forSearchParams.CurrentIndex < Paging.Pages;
-            this.edbFilterDataList = this.forSearchParams.CurrentIndex === 1 ? arr : this.edbFilterDataList.concat(arr);
-          }
-        })
-      },
-      searchLoad(){
-        if(!this.searchHaveMore) return;
-        this.forSearchParams.CurrentIndex++
-			  this.searchApi();
+      // // 指标名称的远程搜索方法
+      // remoteMethod(text){
+      //   this.forSearchParams.Keyword = text.trim()
+      //   this.forSearchParams.CurrentIndex = 1;
+      //   if(this.forSearchParams.Keyword){
+      //     this.searchApi()
+      //   }else{
+      //     this.edbFilterDataList = [];
+      //   }
+      // },
+      // searchApi(){
+      //   // 无权限查看
+      //   if(!this.isCanView) return 
+      //   smmDataInterface.getYsDataList(this.forSearchParams).then(res=>{
+      //     if(res.Ret == 200){
+      //       let arr=res.Data.List || []
+      //       let {Paging}=res.Data
+      //       this.searchHaveMore = this.forSearchParams.CurrentIndex < Paging.Pages;
+      //       this.edbFilterDataList = this.forSearchParams.CurrentIndex === 1 ? arr : this.edbFilterDataList.concat(arr);
+      //     }
+      //   })
+      // },
+      // searchLoad(){
+      //   if(!this.searchHaveMore) return;
+      //   this.forSearchParams.CurrentIndex++
+			//   this.searchApi();
+      // },
+	    // removeEdbFilterTag: _.throttle(function() {
+      //   this.searchList()
+		  // },1000),
+      // watch回调是异步的 延迟执行搜索 
+      searchListDelay(cancel){
+        if(cancel+'' == 'true') return 
+        setTimeout(()=>{
+          this.searchList()
+        },0)
       },
-	    removeEdbFilterTag: _.throttle(function() {
-        this.searchList()
-		  },1000),
       searchList(type){
         this.searchParams.CurrentIndex=1
         this.getList(type)
@@ -477,38 +526,40 @@ import { frequencyArr} from '../databaseComponents/util';
         },50)
       },
       // 添加指标库
-      addToEdbBase:_.throttle(function() {
-        if(this.dataLoading || this.addBaseDisable) return 
-        let params={
-          Types:this.searchParams.Types,
-          Frequency:this.searchParams.Frequency,
-          DataState:this.searchParams.DataState,
-          SelectAll:this.checkAllStatus,
-          SelectCode:this.searchParams.IndexCodes,
-          EdbCode:this.tableDataCheckedList.join(',')
-        }
-        // return 
-        smmDataInterface.getYsEdbCodeCheck(params).then(res=>{
-          if(res.Ret == 200){
-            // console.log(res,'res');
-            if(res.Data.IndexExist){
-              // 有重复
-              this.existIndexList=[]
-              let existEdbInfo=res.Data.ExistEdbInfo || []
-              let text=''
-              existEdbInfo.map(item =>{
-                text=`${item.EdbName}(${item.EdbCode})`
-                this.existIndexList.push({text,code:item.UniqueCode,id:item.EdbInfoId,Types:item.ClassifyId,edbCode:item.EdbCode})
-              })
-              this.checkFailShow=true
-              this.indexAllExist=res.Data.ExistAll+'' =='false' ? false :res.Data.ExistAll || true
-            }else{
-              // 没有重复
-              this.getTargetData()
-            }
+      addToEdbBase() {
+        setTimeout(()=>{
+          if(this.dataLoading || this.addBaseDisable) return 
+          let params={
+            Types:this.searchParams.Types,
+            Frequency:this.searchParams.Frequency,
+            DataState:this.searchParams.DataState,
+            SelectAll:this.checkAllStatus,
+            Keyword:this.searchParams.Keyword,
+            EdbCode:this.tableDataCheckedList.join(',')
           }
-        })
-      },300),
+          // return 
+          smmDataInterface.getYsEdbCodeCheck(params).then(res=>{
+            if(res.Ret == 200){
+              // console.log(res,'res');
+              if(res.Data.IndexExist){
+                // 有重复
+                this.existIndexList=[]
+                let existEdbInfo=res.Data.ExistEdbInfo || []
+                let text=''
+                existEdbInfo.map(item =>{
+                  text=`${item.EdbName}(${item.EdbCode})`
+                  this.existIndexList.push({text,code:item.UniqueCode,id:item.EdbInfoId,classifyId:item.ClassifyId,edbCode:item.EdbCode})
+                })
+                this.checkFailShow=true
+                this.indexAllExist=res.Data.ExistAll+'' =='false' ? false :res.Data.ExistAll || true
+              }else{
+                // 没有重复
+                this.getTargetData()
+              }
+            }
+          })
+        },50)
+      },
       edbCheckFinished(){
         if(!this.indexAllExist){
           this.getTargetData()
@@ -533,7 +584,7 @@ import { frequencyArr} from '../databaseComponents/util';
           Frequency:this.searchParams.Frequency,
           DataState:this.searchParams.DataState,
           SelectAll:this.checkAllStatus,
-          SelectCode:this.searchParams.IndexCodes,
+          Keyword:this.searchParams.Keyword,
           EdbCode:afterFilterList.join(',')
         }
         smmDataInterface.getYsEdbCodeSearch(params).then(res => {
@@ -693,6 +744,11 @@ import { frequencyArr} from '../databaseComponents/util';
     }
     .edb-table-box{
       padding: 0 40px;
+      .sticky {
+        position: sticky;
+        border-right: 1px solid #dcdfe6;
+        z-index: 10;
+      }
       .edb-table-preview {
         overflow: auto;
         height: calc(100% - 124px);

+ 127 - 0
src/views/edbHistoryPage.vue

@@ -0,0 +1,127 @@
+<template>
+    <!-- 指标溯源页 -->
+    <div class="edb-history-page-wrap">
+        <div class="edb-title">{{treeData.EdbName||''}}</div>
+        <div class="edb-source-wrap">
+            <vue2-org-tree
+                :data="treeData"
+                :props="{
+                    label: 'EdbName',
+                    children: 'Child',
+                }"
+                :horizontal="false"
+                :render-content="renderContent"
+                @on-node-click="handleClickNode"
+            />
+        </div>
+    </div>
+</template>
+
+<script>
+import { dataBaseInterface } from '@/api/api.js';
+export default {
+    data() {
+        return {
+            treeData:{}
+        };
+    },
+    methods: {
+        renderContent(h, data) {
+            return (
+                <el-tooltip content={data.RuleTitle} placement='top' popper-class='node-tooltip'>
+                    <span class='node'>{data.EdbName}</span>
+                </el-tooltip>
+            )
+        },
+        handleClickNode(e, data) {
+            //EdbInfoType=1 跳预测指标详情,=0跳指标库详情
+            const { ClassifyId, UniqueCode, EdbInfoId, EdbInfoType } = data
+            let { href } =
+            this.$router.resolve({ path: EdbInfoType === 1 ? '/predictEdb' : '/database', query: { code: UniqueCode, id:
+            EdbInfoId, classifyId: ClassifyId } });
+            window.open(href, '_blank');
+        },
+        async getData() {
+            const res = await dataBaseInterface.getEdbCreateHistory({ EdbInfoId: Number(this.$route.query.edbId) })
+            if (res.Ret !== 200) return
+            this.treeData = res.Data;
+        }
+    },
+    mounted(){
+        if(this.$route.query.edbId){
+            this.getData()
+        }
+    }
+};
+</script>
+
+<style scoped lang="scss">
+.edb-history-page-wrap{
+    display: flex;
+    flex-direction: column;
+    height: calc(100vh - 120px);
+    overflow:hidden ;
+    background-color: #fff;
+    border-radius: 4px;
+    border:1px solid #C8CDD9;
+    box-sizing: border-box;
+    padding:30px;
+    .edb-title{
+        margin:0 -30px;
+        text-align: center;
+        padding-bottom: 30px;
+        border-bottom: 1px solid #C8CDD9;
+        font-size: 16px;
+    }
+    .edb-source-wrap{
+        text-align: center;
+    }
+    .edb-source-wrap{
+        flex: 1;
+        overflow: auto;
+    }
+}
+</style>
+<style lang="scss">
+.edb-history-page-wrap{
+  .org-tree-container {
+    margin: 0 auto;
+    /* .org-tree-node-label {  } */
+    .org-tree-node-label-inner{
+        cursor: pointer;
+        background-color: #F2F6FA;
+        color: #333333;
+        padding:20px;
+        border-radius: 4px;
+        font-size: 16px;
+        max-width: 100px;
+        &:hover{
+            color:#0052D9;
+            text-decoration: underline;
+            background-color: #ECF5FF;
+        }
+    }
+    .org-tree{
+        >.org-tree-node{
+            >.org-tree-node-label{
+                .org-tree-node-label-inner{
+                    background-color: #0052D9;
+                    color: white;
+                }
+            }
+        }
+    }
+    .org-tree-node-children {
+        .org-tree-node ~ .org-tree-node{
+            padding-left: 40px;
+        }
+    }
+    
+  }
+}
+.node-tooltip{
+    font-size: 14px;
+    padding:10px;
+    text-align: center;
+}
+</style>

+ 16 - 7
src/views/mychart_manage/components/chartDetailDia.vue

@@ -336,7 +336,7 @@
                     color: ${ JSON.parse(chartInfo.SourcesFrom).color };
                     fontSize: ${ JSON.parse(chartInfo.SourcesFrom).fontSize }px;
                   `"
-                  >数据来源:{{JSON.parse(chartInfo.SourcesFrom).text}}</span>
+                  >来源:{{JSON.parse(chartInfo.SourcesFrom).text}}</span>
               </div>
 
                <!-- 公历农历切换 只用于季节性图 -->
@@ -506,7 +506,7 @@
                   <i 
                     class="el-icon-tickets" 
                     style="color:#409EFF;font-size:18px" 
-                    @click="isLookHistory=true;lookEdbId=scope.row.EdbInfoId"
+                    @click="toHistoryPage(scope.row.EdbInfoId,$route.matched);lookEdbId=scope.row.EdbInfoId"
                     v-if="scope.row.EdbType===2"
                   />
                 </span>
@@ -566,10 +566,10 @@
     />
 
     <!-- 指标历史记录 -->
-    <edbHistoryDialog
+    <!-- <edbHistoryDialog
       :isOpenDialog.sync="isLookHistory"
       :edbId="lookEdbId"
-    />
+    /> -->
   </div>
 </template>
 
@@ -588,6 +588,7 @@ import DateChooseDia from '@/views/dataEntry_manage/components/DateChooseDia';
 import changeLang from "@/views/dataEntry_manage/components/changeLang"
 import setEnNameDia from "@/views/dataEntry_manage/components/setEnNameDia"
 import { chartSetMixin } from '@/views/dataEntry_manage/mixins/chartPublic'
+import { copyFit } from '@/utils/svgToblob.js';
 
 export default {
   components: { Chart, DateChooseDia,SaveChartOther,changeLang,setEnNameDia },
@@ -724,9 +725,11 @@ export default {
           this.refreshLoading = false;
           if (res.Ret !== 200) return;
           this.chartInfo = res.Data.ChartInfo;
-          
 
           if(this.chartInfo.Source===1) {
+            //处理下历史默认来源
+            this.setDefaultSourceFrom();
+            
             this.tableData = res.Data.EdbInfoList;
             //eta图
             this.setDefaultDateSelect(); //设置默认的日期选中
@@ -1389,7 +1392,7 @@ export default {
     },
 
     copyTitleText() {
-      let clipboard = new this.Clipboard('.my-chart-title')
+      /* let clipboard = new this.Clipboard('.my-chart-title')
       clipboard.on('success', e => {
         this.$message.success('复制标题成功')
         e.clearSelection() // 释放内存
@@ -1400,7 +1403,13 @@ export default {
         this.$message.warning('浏览器暂不支持')
         // 释放内存
         clipboard.destroy()
-      })
+      }) */
+      try{
+        copyFit(this.chartInfo.ChartName||'')
+        this.$message.success("复制标题成功")
+      }catch(e){
+        this.$message.warning("复制标题失败")
+      }
     },
 
     init() {

+ 51 - 3
src/views/ppt_manage/mixins/pptMixins.js

@@ -12,7 +12,7 @@ import futuresInterface from '@/api/modules/futuresBaseApi';
 import { fittingEquationInterface,statisticFeatureInterface,crossVarietyInterface } from '@/api/modules/chartRelevanceApi';
 import chartRelevanceApi from '@/api/modules/chartRelevanceApi.js';
 import { defaultOpts } from '@/utils/defaultOptions';
-import {formatPPTDate,checkPPTpageElemant,getStrSize,isShowPPTTitle,toTextProps,toJson} from '../newVersion/utils/untils.js';
+import {formatPPTDate,checkPPTpageElemant,getStrSize,isShowPPTTitle,toTextProps,toJson,rgbaToHex} from '../newVersion/utils/untils.js';
 import FormatOne from '../newVersion/components/formatPage/FormatOne.vue';
 import FormatTwo from '../newVersion/components/formatPage/FormatTwo.vue';
 import FormatThree from '../newVersion/components/formatPage/FormatThree.vue';
@@ -204,6 +204,9 @@ export default {
       this.chartInfo = Data.ChartInfo;
       if(!this.chartInfo) return
       if(this.chartInfo.Source === 1) { //常规图
+        //处理下历史默认来源
+        this.setDefaultSourceFrom();
+        
         this.dataList = Data.EdbInfoList;
         //柱形图独立数据
         this.chartInfo.ChartType === 7 && this.initBarData(res.Data);
@@ -375,6 +378,19 @@ export default {
         this.options.xAxis.title.text=this.options.xAxis.title.textEn
     },
 
+    /* 历史图表默认显示图表来源 d毛后端不修复只能自己每次详情处理下*/
+		setDefaultSourceFrom() {
+			if(!this.chartInfo.SourcesFrom) {
+        let themeOpt = JSON.parse(this.chartInfo.ChartThemeStyle);
+				this.chartInfo.SourcesFrom = JSON.stringify({
+					isShow: true,
+					text: this.chartInfo.ChartSource,
+					color: themeOpt&&themeOpt.markerOptions.style.color,
+					fontSize: themeOpt&&themeOpt.markerOptions.style.fontSize
+				});
+			}
+		},
+
     //检查图表英文配置是否完整
     checkChartEnData(){
       let result = true
@@ -515,7 +531,6 @@ export default {
      
     /* 主题样式*/
     const chartTheme =  ChartThemeStyle ? JSON.parse(ChartThemeStyle) : null;
-    console.log(chartTheme)
 
       this.$nextTick(() => {
         let is_linear = options.series 
@@ -552,7 +567,7 @@ export default {
             ...defaultOpts.legend,
             ...chartTheme&&chartTheme.legendOptions
           },
-          colors: chartTheme&&chartTheme.colorsOptions||defaultOpts.colors,
+          colors: options.colors||chartTheme&&chartTheme.colorsOptions||defaultOpts.colors,
           title: isPublish?{
             text: isShowTitle?newStr:null,
             margin:0,
@@ -919,6 +934,39 @@ export default {
 			})
 			this.setEnName = false
 		},
+
+    /* 生成ppt时图表追加底部文字 来源/说明 */
+    transChartBottomInfo(slide,{x,y,width,height},data) {
+      let chartData = data;
+      let yPercent = Number(Math.ceil(height.replace(/%/,''))+Math.ceil(y.replace(/%/,'')))+'%';
+      // console.log(yPercent)
+
+      if(chartData.SourcesFrom&&JSON.parse(chartData.SourcesFrom).isShow) {
+        let sourceObj = JSON.parse(chartData.SourcesFrom);
+        slide.addText(`来源:${sourceObj.text}`,{
+          x:x,
+          y: yPercent,
+          w: width,
+          margin:10,
+          fontSize: sourceObj.fontSize*0.75,
+          color: sourceObj.color.includes('rgb') ? rgbaToHex(sourceObj.color).color.substring(1) : sourceObj.color.indexOf('#')===0 ? sourceObj.color.substring(1): '666',
+        })
+      }
+
+      if(chartData.Instructions&&JSON.parse(chartData.Instructions).isShow) {
+        let instructObj = JSON.parse(chartData.Instructions);
+
+        slide.addText(instructObj.text,{
+          x:x,
+          y: yPercent,
+          w: width,
+          align:'right',
+          margin:10,
+          fontSize: instructObj.fontSize*0.75,
+          color: instructObj.color.includes('rgb') ? rgbaToHex(instructObj.color).color.substring(1) : instructObj.color.indexOf('#')===0 ? instructObj.color.substring(1): '666',
+        })
+      }
+    }
   },
   mounted(){
     this.getpptConfig()

+ 1 - 1
src/views/ppt_manage/newVersion/components/formatEl/ChartEl.vue

@@ -51,7 +51,7 @@
           color: ${ chartSourcesFrom.color };
           fontSize: ${ chartSourcesFrom.fontSize }px;
         `"
-        >数据来源:{{ chartSourcesFrom.text}}</span>
+        >来源:{{ chartSourcesFrom.text}}</span>
     </div>
     <!-- 图表说明 -->
     <div 

+ 17 - 1
src/views/ppt_manage/newVersion/pptEnPublish.vue

@@ -50,7 +50,7 @@
 import Cover from './components/CoverEn.vue';
 import CustomCover from './components/CustomCover.vue';
 import TransReport from './components/catalog/transReport.vue';
-import {countComponentName,pptConfigInit,toTextProps,toJson,svg2Base64,getImgRealSize,calcScale,getShapeOptions,createRandomCode,getTableData} from './utils/untils';
+import {countComponentName,pptConfigInit,toTextProps,toJson,svg2Base64,getImgRealSize,calcScale,getShapeOptions,createRandomCode,getTableData,getChartInfo} from './utils/untils';
 import {marginTop,modelConfig,pptSlideMaster,pptSlideMasterEn,pptCoverEn} from './utils/config';
 import pptmixin from '../mixins/pptMixins';
 import mixins from '../mixins/mixins';
@@ -149,6 +149,19 @@ export default {
         for(let i=0;i<this.pageList.length;i++){
           await this.initPageElements(this.pageList[i],'show')
         }
+
+        //获取已加载图表的信息
+        let chartInfoMap = {}
+        for(let i=0;i<this.pageList.length;i++){
+          this.pageList[i].elements.forEach(item=>{
+            if(item.type==='chart'){
+              let temp = getChartInfo(this.optionMap[item.chartId])
+              chartInfoMap[item.chartId] = temp
+            }
+          })
+        }
+        this.$store.commit('SET_CHART_INFO_MAP',chartInfoMap)
+
         this.dataLoading.close();
         $('.ppt-item').css('background-image',`url(${this.pptBgImage})`);
       }
@@ -293,6 +306,9 @@ export default {
                 size: { type: "contain" },
               });
             }
+
+            //追加生成图表底部文字
+            this.transChartBottomInfo(slide,{x,y,width,height},this.optionMap[this.pageList[i].elements[j].chartId])
             
           }else if (textData){
             slide.addText(textData,{

+ 18 - 3
src/views/ppt_manage/newVersion/pptPublish.vue

@@ -59,7 +59,7 @@ import Cover from './components/Cover.vue';
 import CustomCover from './components/CustomCover.vue';
 import TransReport from './components/catalog/transReport.vue';
 //import {pageList} from './utils/mock';
-import {countComponentName,pptConfigInit,toTextProps,toJson,svg2Base64,getImgRealSize,calcScale,getShapeOptions,createRandomCode,getTableData} from './utils/untils';
+import {countComponentName,pptConfigInit,toTextProps,toJson,svg2Base64,getImgRealSize,calcScale,getShapeOptions,createRandomCode,getTableData,getChartInfo,pptInit,rgbaToHex } from './utils/untils';
 import {marginTop,modelConfig,pptSlideMaster} from './utils/config';
 import pptmixin from '../mixins/pptMixins';
 import mixins from '../mixins/mixins';
@@ -157,6 +157,19 @@ export default {
         for(let i=0;i<this.pageList.length;i++){
           await this.initPageElements(this.pageList[i],'show')
         }
+
+         //获取已加载图表的信息
+        let chartInfoMap = {}
+        for(let i=0;i<this.pageList.length;i++){
+          this.pageList[i].elements.forEach(item=>{
+            if(item.type==='chart'){
+              let temp = getChartInfo(this.optionMap[item.chartId])
+              chartInfoMap[item.chartId] = temp
+            }
+          })
+        }
+        this.$store.commit('SET_CHART_INFO_MAP',chartInfoMap)
+
         this.dataLoading.close();
         $('.ppt-item').css('background-image',`url(${this.pptBgImage})`);
       }else{
@@ -285,7 +298,7 @@ export default {
             this.pageList[i].modelId,
             elements[j].position
           );
-          if (imgData) {
+          if (imgData) { //图表
             if(this.transChartType===1){
               slide.addImage({
                 path:imgData,
@@ -305,7 +318,9 @@ export default {
                 size: { type: "contain" },
               });
             }
-            
+
+            //追加生成图表底部文字
+            this.transChartBottomInfo(slide,{x,y,width,height},this.optionMap[this.pageList[i].elements[j].chartId])
           }else if (textData){
             slide.addText(textData,{
               x:x,

+ 4 - 4
src/views/predictEdb_manage/addPredicEdb.vue

@@ -291,7 +291,7 @@
                     >
                     </el-option>
                   </el-select>
-                  <i class="el-icon-tickets" style="color:#409EFF;font-size:18px" @click="isLookHistory=true;lookEdbId=item.self_target;" v-if="item.self_target"/>
+                  <i class="el-icon-tickets" style="color:#409EFF;font-size:18px" @click="toHistoryPage(item.self_target,$route.matched);lookEdbId=item.self_target;" v-if="item.self_target"/>
                 </div>
                 <div class="item">
                   <span class="label">
@@ -406,14 +406,14 @@
       :edbList="dynamicDifferList"
       :info="dynamicDifferInfo"
       @ensureBack="saveDynamicDifferRule"
-      @lookHistory="id => {isLookHistory=true;lookEdbId=id;}"
+      @lookHistory="id => {toHistoryPage(id,$route.matched);lookEdbId=id;}"
     />
 
     <!-- 指标历史记录 -->
-    <edbHistoryDialog
+    <!-- <edbHistoryDialog
       :isOpenDialog.sync="isLookHistory"
       :edbId="lookEdbId"
-    />
+    /> -->
     
   </div>
 </template>

+ 7 - 27
src/views/predictEdb_manage/predictEdb.vue

@@ -193,7 +193,7 @@
 							<el-button type="text" @click="saveEdbHandle" 
 									v-if="detail_show_chart&&isEdbBtnShow('edbPreData_save')">保存</el-button>
 							<el-button v-permission="permissionBtn.predictEdbPermission.edbPreData_edbSource"
-								type="text" @click="isLookHistory=true;lookEdbId=select_id">指标溯源</el-button>
+								type="text" @click="toHistoryPage(select_id,$route.matched);lookEdbId=select_id">指标溯源</el-button>
 							<el-popover v-if="showPopover"
 								placement="bottom-end" 
 								trigger="hover"
@@ -217,26 +217,6 @@
 								</div>
 							</el-popover>
 						</div>
-						<!-- <div class="edb-tool">
-							<el-button v-permission="permissionBtn.predictEdbPermission.edbPreData_enNameSetting"
-								type="text" @click="clickEdbNameHandle" v-if="currentLang==='ch'||!edb_nameEn">
-								设置英文名称
-							</el-button>
-							<el-button v-permission="permissionBtn.predictEdbPermission.edbPreData_edbSource"
-							type="text" @click="isLookHistory=true;lookEdbId=select_id">指标溯源</el-button>
-							<el-button v-permission="permissionBtn.predictEdbPermission.edbPreData_update"
-								type="text" @click="updateEdbPartHandle">刷新</el-button>
-							<el-button type="text" @click="editEdbHandle('')" 
-								v-if="edbButton.OpButton&&isEdbBtnShow('edbPreData_edit')">编辑</el-button>
-							<el-button type="text" @click="saveEdbHandle" 
-								v-if="detail_show_chart&&isEdbBtnShow('edbPreData_save')">保存</el-button>
-							<el-button v-permission="permissionBtn.predictEdbPermission.edbPreData_recalcu"
-								type="text" @click="updateEdbHandle">重新计算</el-button>
-							<el-button class="deletesty" @click="delEdbHandle" type="text"
-								v-if="edbButton.DeleteButton&&isEdbBtnShow('edbPreData_del')">删除</el-button>
-							<el-button v-permission="permissionBtn.predictEdbPermission.edbPreData_copyData"
-								type="text" @click="copyData">复制数据</el-button>
-						</div> -->
 					</div>
 
 					<!--  -->
@@ -390,7 +370,7 @@
 			@cancel="computed_type=0"
 			@addCallBack="addComputedCallBack"
 			@openPrev="isOpenComputed=true"
-			@lookHistory="id => {isLookHistory=true;lookEdbId=id;}"
+			@lookHistory="id => {toHistoryPage(id,$route.matched);lookEdbId=id;}"
 		/>
 
 		<!-- 同比同差计算弹窗 -->
@@ -402,7 +382,7 @@
 			@cancel="computed_type=0"
 			@addCallBack="addComputedCallBack"
 			@openPrev="isOpenComputed=true"
-			@lookHistory="id => {isLookHistory=true;lookEdbId=id;}"
+			@lookHistory="id => {toHistoryPage(id,$route.matched);lookEdbId=id;}"
 			@changeSource="changeComputedType"
 		/>
 
@@ -421,7 +401,7 @@
 			@cancel="computed_type=0"
 			@addCallBack="addComputedCallBack"
 			@openPrev="isOpenComputed=true"
-			@lookHistory="id => {isLookHistory=true;lookEdbId=id;}"
+			@lookHistory="id => {toHistoryPage(id,$route.matched);lookEdbId=id;}"
 			@changeSource="changeComputedType"
 		/>
 			
@@ -458,10 +438,10 @@
 		/>
 
 		 <!-- 指标历史记录 -->
-    <edbHistoryDialog
+    <!-- <edbHistoryDialog
       :isOpenDialog.sync="isLookHistory"
       :edbId="lookEdbId"
-    />
+    /> -->
 	<!-- 指数修匀弹窗 -->
 	<SmoothEdbDialog 
 			:is-open-smooth="computed_type==='alpha'"
@@ -471,7 +451,7 @@
 			@cancel="computed_type=0"
 			@openPrev="isOpenComputed=true"
 			@addCallBack="addComputedCallBack"
-			@lookHistory="id => {isLookHistory=true;lookEdbId=id;}"
+			@lookHistory="id => {toHistoryPage(id,$route.matched);lookEdbId=id;}"
 		/>
 
 	</div>

+ 3 - 3
src/views/smartReport/editReport.vue

@@ -68,7 +68,7 @@
                     </li>
                 </draggable>
 
-                <div class="report-content-box" id="report-content-box">
+                <div class="report-content-box" id="report-content-box" :style="{backgroundColor:bgColor}">
                     <div class="html-head-img-box">
                         <div class="opt-btn-box" style="display: none;">
                             <div class="del-btn" @click.stop="headImg=''"></div>
@@ -86,7 +86,6 @@
                         @add="handleParentAdd"
                         @remove="handleParentRemove"
                         :move="handleParentMove"
-                        :style="{backgroundColor:bgColor}"
                     >
                         <div 
                             :class="[
@@ -489,6 +488,7 @@ export default {
         handlePreviewReport(){
             const htmlStr=document.getElementById('report-content-box').outerHTML;
             sessionStorage.setItem('smartReportContent', htmlStr);
+            sessionStorage.setItem('smartReportContentBg', this.bgColor);
 			let { href } = this.$router.resolve({ 
                 path: '/smartReportDetail',
                 query:{
@@ -1317,7 +1317,7 @@ div{
         min-height: 100%;
         .report-drag-item-wrap{
             width: 100%;
-            padding: 3px;
+            padding: 6px;
             min-height: 80px;
             border: 1px dashed #0052D9;
             position: relative;

+ 8 - 1
src/views/smartReport/reportDetail.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="smart-report-detail">
-        <div class="main-box">
+        <div class="main-box" :style="{backgroundColor:bgColor}">
             <!-- <div class="top-box">
                 <div class="title">{{reportInfo&&reportInfo.Title}}</div>
                 <div class="flex">
@@ -83,6 +83,7 @@ export default {
         return {
             reportInfo:null,
             content:'',
+            bgColor:'',
             reportImgUrl:'',
             showReportImg:false
         }
@@ -104,8 +105,10 @@ export default {
                     this.reportInfo=res.Data
                     if(this.$route.query.type==='preview'){
                        this.content=sessionStorage.getItem('smartReportContent')
+                       this.bgColor=sessionStorage.getItem('smartReportContentBg')
                     }else{
                         this.content=res.Data.Content
+                        this.bgColor=res.Data.CanvasColor
                     }
                 }else{
                     this.$emit("reportError")
@@ -239,6 +242,10 @@ div{
         }
         .html-wrap{
             // padding: 30px;
+            .report-drag-item-wrap{
+                padding: 6px;
+                margin-bottom: 3px;
+            }
         }
     }
     .report-img-box{

+ 1 - 1
src/views/system_manage/components/smartReportImgSet.vue

@@ -6,7 +6,7 @@
                 <el-option label="版头" :value="1"></el-option>
                 <el-option label="版尾" :value="2"></el-option>
             </el-select>
-            <el-button type="primary" style="float:right" @click="handleShowUploadPop">上传图片</el-button>
+            <el-button type="primary" style="float:right" @click="handleShowUploadPop" v-permission="permissionBtn.baseConfigPermission.etaBaseConfig_source_upload">上传图片</el-button>
         </div>
 
         <div class="select-status-box" v-if="selectIds.length>0">

+ 31 - 5
src/views/system_manage/etaBaseConfig.vue

@@ -2,7 +2,7 @@
     <div class="eta-base-config">
         <div class="nav-type-box">
             <span :class="[sectionType===1?'active':'']" @click="sectionType=1">通用设置</span>
-            <span :class="[sectionType===2?'active':'']" @click="sectionType=2">资源库</span>
+            <span :class="[sectionType===2?'active':'']" @click="sectionType=2" v-if="isShowSource">资源库</span>
         </div>
         <!-- 通用设置 -->
         <template v-if="sectionType==1">
@@ -15,7 +15,7 @@
             ref="baseConfigForm"
         >
             <div class="part-type-box" style="margin-bottom:40px">
-                <el-button type="primary" :plain="partType===1?false:true" @click="partType=1" :style="{width:'120px',border:'none',color:partType==1?'#fff':'#333'}">登录设置</el-button>
+                <el-button v-if="isShowLoginConfig" type="primary" :plain="partType===1?false:true" @click="partType=1" :style="{width:'120px',border:'none',color:partType==1?'#fff':'#333'}">登录设置</el-button>
                 <el-button type="primary" :plain="partType===2?false:true" @click="partType=2" :style="{width:'120px',border:'none',color:partType==2?'#fff':'#333'}">研报设置</el-button>
                 <el-button type="primary" :plain="partType===3?false:true" v-if="isShowPPT||isShowEnPPT" @click="partType=3" :style="{width:'120px',border:'none',color:partType==3?'#fff':'#333'}">PPT配置</el-button>
                 <div class="btn-wrap" style="text-align: center;float:right">
@@ -24,7 +24,7 @@
                 </div>
             </div>
             <!-- 登录设置模块 -->
-            <div class="part" v-show="partType===1">
+            <div class="part" v-show="partType===1&&isShowLoginConfig">
                 <div class="side">
                     <!-- <el-form-item label="国内短信模板" prop="LoginSmsTpId" >
                         <div class="form-item-type-two sms-type">
@@ -97,7 +97,7 @@
                                 v-model="checkList" >
                                 <el-checkbox label="研报图表"></el-checkbox>
                             </el-checkbox-group>
-                            <div>
+                            <div v-if="isShowYBShare">
                                 <el-checkbox label="研报分享" v-model="formData.WatermarkReport"></el-checkbox>
                                 <el-tooltip 
                                     effect="dark" 
@@ -304,7 +304,7 @@
         
         </template>
         <!-- 资源库 -->
-        <smartReportImgSet v-if="sectionType==2"/>
+        <smartReportImgSet v-if="sectionType==2&&isShowSource"/>
 
         <el-image-viewer 
             v-if="showViewer" 
@@ -494,6 +494,32 @@ export default {
             return this.permissionBtn.checkPermissionBtn(
                 this.permissionBtn.baseConfigPermission.etaBaseConfig_watermark_ybChart
             )
+        },
+        // 是否有登录设置
+        isShowLoginConfig(){
+            return this.permissionBtn.checkPermissionBtn(
+                this.permissionBtn.baseConfigPermission.etaBaseConfig_login
+            )
+        },
+        isShowYBShare(){
+            return this.permissionBtn.checkPermissionBtn(
+                this.permissionBtn.baseConfigPermission.etaBaseConfig_watermark_ybShare
+            )
+        },
+        isShowSource(){
+            return this.permissionBtn.checkPermissionBtn(
+                this.permissionBtn.baseConfigPermission.etaBaseConfig_source_see
+            )
+        },
+    },
+    watch: {
+        'isShowLoginConfig':{
+            handler(){
+                if(!this.isShowLoginConfig&&this.partType==1){
+                    this.partType=2
+                }
+            },
+            immediate:true
         }
     },
     methods: {