소스 검색

同步master 解决冲突

jwyu 1 년 전
부모
커밋
64448e3ce8
100개의 변경된 파일3809개의 추가작업 그리고 714개의 파일을 삭제
  1. 5 4
      config/dev.env.js
  2. 7 5
      config/prod.env.js
  3. 6 5
      config/prod.test.env.js
  4. 14 1
      src/api/modules/chartApi.js
  5. 11 2
      src/api/modules/oldApi.js
  6. 21 0
      src/api/modules/positionAnalysis.js
  7. 18 2
      src/api/modules/setApi.js
  8. 9 0
      src/api/modules/sheetApi.js
  9. 97 9
      src/components/chart/chartDetailHandlesWrap.vue
  10. 27 1
      src/components/chart/chartListWrap.vue
  11. 1 0
      src/components/lzTable.vue
  12. 10 4
      src/main.js
  13. 5 4
      src/mixins/theme.js
  14. 21 1
      src/routes/modules/chartRoutes.js
  15. 2 1
      src/routes/modules/oldRoutes.js
  16. 457 0
      src/utils/buttonConfig.js
  17. 45 0
      src/utils/buttonPermission.js
  18. 87 167
      src/views/Home.vue
  19. 10 3
      src/views/chartRelevance_manage/components/chartCard.vue
  20. 43 1
      src/views/chartRelevance_manage/components/selectTarget.vue
  21. 3 2
      src/views/chartRelevance_manage/fittingEquationList.vue
  22. 30 31
      src/views/chartRelevance_manage/list.vue
  23. 1 1
      src/views/chartRelevance_manage/relevanceChartEditor.vue
  24. 3 2
      src/views/chartRelevance_manage/statisticFeatureList.vue
  25. 90 10
      src/views/classify_manage/classifyEnlist.vue
  26. 127 96
      src/views/classify_manage/classifylist.vue
  27. 8 0
      src/views/classify_manage/indexList.vue
  28. 3 2
      src/views/dataEntry_manage/addChart.vue
  29. 2 2
      src/views/dataEntry_manage/adjustdata/adjustData.vue
  30. 20 14
      src/views/dataEntry_manage/chartSetting.vue
  31. 1 0
      src/views/dataEntry_manage/coal/index.vue
  32. 15 0
      src/views/dataEntry_manage/codecount/index.vue
  33. 1 1
      src/views/dataEntry_manage/components/addTarget.vue
  34. 29 29
      src/views/dataEntry_manage/components/chart.vue
  35. 1 1
      src/views/dataEntry_manage/components/editTarget.vue
  36. 5 1
      src/views/dataEntry_manage/dataEntry.vue
  37. 12 0
      src/views/dataEntry_manage/databaseComponents/addTargetDiaBase.vue
  38. 2 1
      src/views/dataEntry_manage/databaseComponents/dataAssociateComputeData.vue
  39. 15 0
      src/views/dataEntry_manage/databaseComponents/updateDialog.vue
  40. 2 2
      src/views/dataEntry_manage/databaseComponents/util.js
  41. 44 27
      src/views/dataEntry_manage/databaseList.vue
  42. 5 3
      src/views/dataEntry_manage/editChart.vue
  43. 27 4
      src/views/dataEntry_manage/mixins/chartPublic.js
  44. 6 3
      src/views/dataEntry_manage/targetList.vue
  45. 2 0
      src/views/dataEntry_manage/thirdBase/BAIINFOTargetbase.vue
  46. 2 1
      src/views/dataEntry_manage/thirdBase/NationalDataBase.vue
  47. 1 0
      src/views/dataEntry_manage/thirdBase/SCITargetbase.vue
  48. 1 0
      src/views/dataEntry_manage/thirdBase/elaSteoBase.vue
  49. 1 0
      src/views/dataEntry_manage/thirdBase/glTargetbase.vue
  50. 1 0
      src/views/dataEntry_manage/thirdBase/lzTargetbase.vue
  51. 1 0
      src/views/dataEntry_manage/thirdBase/smmTargetbase.vue
  52. 4 1
      src/views/dataEntry_manage/thirdBase/steelChemicalbase.vue
  53. 27 4
      src/views/datasheet_manage/common/customTable.js
  54. 49 12
      src/views/datasheet_manage/components/CustomTable.vue
  55. 204 53
      src/views/datasheet_manage/components/MixedTable.vue
  56. 161 0
      src/views/datasheet_manage/components/selectTargetValueDia.vue
  57. 10 2
      src/views/datasheet_manage/customSheetEdit.vue
  58. 31 7
      src/views/datasheet_manage/sheetList.vue
  59. 5 3
      src/views/futures_manage/commodityChartBase.vue
  60. 26 17
      src/views/mychart_manage/components/chartDetailDia.vue
  61. 4 2
      src/views/mychart_manage/index.vue
  62. 402 0
      src/views/positionAnalysis_manage/components/chartBox.vue
  63. 348 0
      src/views/positionAnalysis_manage/components/chartDetail.vue
  64. 139 0
      src/views/positionAnalysis_manage/components/indexContent.vue
  65. 110 0
      src/views/positionAnalysis_manage/detail.vue
  66. 82 0
      src/views/positionAnalysis_manage/list.vue
  67. 23 3
      src/views/ppt_manage/mixins/mixins.js
  68. 11 9
      src/views/ppt_manage/mixins/pptMixins.js
  69. 48 8
      src/views/ppt_manage/newVersion/pptCatalog.vue
  70. 2 1
      src/views/ppt_manage/newVersion/pptEditor.vue
  71. 44 6
      src/views/ppt_manage/newVersion/pptEnCatalog.vue
  72. 2 1
      src/views/ppt_manage/newVersion/pptEnEditor.vue
  73. 2 1
      src/views/predictEdb_manage/components/chartInfo.vue
  74. 35 21
      src/views/predictEdb_manage/predictEdb.vue
  75. 12 5
      src/views/report_manage/addreportNew.vue
  76. 28 8
      src/views/report_manage/cloudDisk.vue
  77. 2 1
      src/views/report_manage/dayOrWeek.vue
  78. 1 1
      src/views/report_manage/editChapterReport.vue
  79. 8 4
      src/views/report_manage/editreportNew.vue
  80. 1 1
      src/views/report_manage/mixins/editor.js
  81. 2 2
      src/views/report_manage/mixins/reportMixin.js
  82. 84 10
      src/views/report_manage/reportAuthor.vue
  83. 4 3
      src/views/report_manage/reportEn/reportEditor.vue
  84. 22 11
      src/views/report_manage/reportEn/reportlist.vue
  85. 6 3
      src/views/report_manage/reportVariety.vue
  86. 9 3
      src/views/report_manage/reportdtl.vue
  87. 30 9
      src/views/report_manage/reportlist.vue
  88. 23 7
      src/views/sandbox_manage/index.vue
  89. 22 7
      src/views/sandbox_manage/sandFlow/index.vue
  90. 4 2
      src/views/semantics_manage/documentPage.vue
  91. 4 2
      src/views/semantics_manage/semanticsPage.vue
  92. 6 3
      src/views/semantics_manage/tagPage.vue
  93. 12 4
      src/views/supply_manage/stockPlant.vue
  94. 1 1
      src/views/system_manage/components/addUserDialog.vue
  95. 16 8
      src/views/system_manage/departManage.vue
  96. 3 2
      src/views/system_manage/enAuthManage.vue
  97. 36 6
      src/views/system_manage/etaBaseConfig.vue
  98. 281 0
      src/views/system_manage/newAuthManage.vue
  99. 58 13
      src/views/system_manage/operateAuthManage.vue
  100. 8 4
      src/views/system_manage/roleManage.vue

+ 5 - 4
config/dev.env.js

@@ -6,11 +6,12 @@ module.exports = merge(prodEnv, {
   VUE_APP_API_ROOT:'"/adminapi"',  //
   Domain:'"brilliantstart.cn"',
   // Login:'"http://localhost:3030/login"',
-  CHART_LINK:'"https://charttest.hzinsights.com/chartshow"',
-  SHEET_LINK:'"https://charttest.hzinsights.com/sheetshow"',
-	REPORT_SHARE_LINK:'"http://rddpweb.brilliantstart.cn"',
+  // CHART_LINK:'"https://charttest.hzinsights.com/chartshow"',
+  // SHEET_LINK:'"https://charttest.hzinsights.com/sheetshow"',
+	// REPORT_SHARE_LINK:'"http://rddpweb.brilliantstart.cn"',
   VUE_APP_HR_MANAGEMENT_SYSTEM:'"http://8.136.199.33:8391/login"',
   VUE_APP_FINANCIAL_MANAGEMENT_SYSTEM:'"http://8.136.199.33:8618/login"',
   VUE_APP_CRM_SYSTEM:'"http://8.136.199.33:7777/temppage"',
-  VUE_APP_ETA_DOCS:'"http://8.136.199.33:8622/update/index"'
+  VUE_APP_ETA_DOCS:'"http://8.136.199.33:8622/update/index"',
+	VUE_APP_ETA_HELP_DOCS:'"http://8.136.199.33:8622/help/index"'
 });

+ 7 - 5
config/prod.env.js

@@ -1,13 +1,15 @@
 module.exports = {
 	NODE_ENV:'"production"',
-	VUE_APP_API_ROOT:'"https://eta.hzinsights.com/adminapi"',  //生产环境
+	VUE_APP_API_ROOT:'"/adminapi"',  //生产环境
 	Domain:'"hzinsights.com"',
 	// Login:'"https://eta.hzinsights.com/login"',
-	CHART_LINK:'"https://chartlib.hzinsights.com/chartshow"',
-	SHEET_LINK:'"https://chartlib.hzinsights.com/sheetshow"',
-	REPORT_SHARE_LINK:'"https://ficc.hzinsights.com"',
+	// CHART_LINK:'"https://chartlib.hzinsights.com/chartshow"',
+	// SHEET_LINK:'"https://chartlib.hzinsights.com/sheetshow"',
+	// REPORT_SHARE_LINK:'"https://ficc.hzinsights.com"',
 	VUE_APP_HR_MANAGEMENT_SYSTEM:'"https://hr.hzinsights.com/login"',
 	VUE_APP_FINANCIAL_MANAGEMENT_SYSTEM:'"https://fms.hzinsights.com/login"',
 	VUE_APP_CRM_SYSTEM:'"https://admin.hzinsights.com/temppage"',
-    VUE_APP_ETA_DOCS:'"https://etadocs.hzinsights.com/update/index"'
+	VUE_APP_ETA_DOCS:'"https://etadocs.hzinsights.com/update/index"',
+	VUE_APP_ETA_HELP_DOCS:'"https://etadocs.hzinsights.com/help/index"'
+		
 }

+ 6 - 5
config/prod.test.env.js

@@ -1,13 +1,14 @@
 module.exports = {
 	NODE_ENV:'"test"',
-	VUE_APP_API_ROOT:'"http://8.136.199.33:7778/adminapi"',  //测试环境
+	VUE_APP_API_ROOT:'"/adminapi"',  //测试环境
 	Domain:'"brilliantstart.cn"',
 	// Login:'"http://8.136.199.33:7778/login"',
-	CHART_LINK:'"https://charttest.hzinsights.com/chartshow"',
-	SHEET_LINK:'"https://charttest.hzinsights.com/sheetshow"',
-	REPORT_SHARE_LINK:'"http://rddpweb.brilliantstart.cn"',
+	// CHART_LINK:'"https://charttest.hzinsights.com/chartshow"',
+	// SHEET_LINK:'"https://charttest.hzinsights.com/sheetshow"',
+	// REPORT_SHARE_LINK:'"http://rddpweb.brilliantstart.cn"',
 	VUE_APP_HR_MANAGEMENT_SYSTEM:'"http://8.136.199.33:8391/login"',
   VUE_APP_FINANCIAL_MANAGEMENT_SYSTEM:'"http://8.136.199.33:8618/login"',
 	VUE_APP_CRM_SYSTEM:'"http://8.136.199.33:7777/temppage"',
-	VUE_APP_ETA_DOCS:'"http://8.136.199.33:8622/update/index"'
+	VUE_APP_ETA_DOCS:'"http://8.136.199.33:8622/update/index"',
+	VUE_APP_ETA_HELP_DOCS:'"http://8.136.199.33:8622/help/index"'
 }

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

@@ -811,7 +811,13 @@ const dataBaseInterface = {
 	getEDBInfoCalculateMap:params=>{
 		return http.get('/datamanage/edb_info/calculate/mapping',params)
 	},
-
+	/**
+	 * 获取创建人列表
+	 * Source - 来源 :1:手工数据指标 2:钢联化工数据库 3:ETA指标库 4:ETA预测指标 5:图库
+	 */
+	getEdbChartAdminList: params => {
+		return http.get('/datamanage/edb_chart/adminList',params)
+	},
 	/* eta图库 图表预览  启用之前根据传参刷数据的详情接口 
 		{
 			ChartType:1,
@@ -849,6 +855,13 @@ const dataBaseInterface = {
 	getChartInfoById: params => {
 		return http.get('/datamanage/chart_info/detail/v2',params)
 	},
+	/**
+	 * 接口获取指标数据来源
+	 * @param params.IsBase
+	 */
+	getDataSource:(params)=>{
+		return http.get('datamanage/edb_source/list',params)
+	},
 	
 }
 

+ 11 - 2
src/api/modules/oldApi.js

@@ -294,7 +294,15 @@ const reportMessageSend=params=>{
 
 // 获取商家code
 const getBusinessCode=params=>{
-    return http.get('/business_conf/code_encrypt',params)
+	return http.get('/business_conf/code_encrypt',params)
+}
+
+/**
+ * 获取动态配配置 系统内部动态链接
+ * @param {*} params 
+ */
+const getPublicSettingsApi = params => {
+	return http.get('/system/config')
 }
 
 export {
@@ -368,5 +376,6 @@ export {
 	reportMessageSend,
 	weekReportValidAudio,
 	getUserUuid,
-    getBusinessCode
+	getBusinessCode,
+	getPublicSettingsApi
 }

+ 21 - 0
src/api/modules/positionAnalysis.js

@@ -0,0 +1,21 @@
+// 持仓分析模块
+
+import http from "@/api/http.js"
+
+/**
+ * 持仓分析详情
+ * @param DataTime 查询日期,日期为空时,默认返回最新日期
+ * @param ClassifyName 品种名称
+ * @param ClassifyType 合约名称
+ * @param Exchange 交易所名称
+ */
+export const apiPositionAnalysisInfo=params=>{
+    return http.get('/trade_analysis/top',params)
+}
+
+/**
+ * 持仓分析列表
+ */
+export const apiPositionAnalysisList=()=>{
+    return http.get('/trade_analysis/classify',{})
+}

+ 18 - 2
src/api/modules/setApi.js

@@ -155,7 +155,7 @@ const departInterence = {
 	getRoleList: params => {
 		return http.get('/system/role/list',params)
 	},
-	/* 新增角色权限
+	/* 新增角色菜单权限 crm14.1上线后弃用
 	MenuIdStr
 	"RoleId" 
 	MenuButtonIdStr
@@ -163,7 +163,7 @@ const departInterence = {
 	saveAuth:params => {
 		return http.post('/system/role/menu/add',params)
 	},
-	/* 获取所有权限
+	/* 获取菜单权限,crm14.1上线后弃用
 	RoleId  */
 	getAuthList:params => {
 		return http.get('/system/role/menu/list',params)
@@ -244,6 +244,22 @@ const departInterence = {
 	//从其他系统跳转来用code换token
 	useCodeLogin:params=>{
 		return http.get('/sysuser/auth_code_login',params)
+	},
+	//获取角色的权限信息,包括菜单和功能 (crm14.1)
+	//RoleId
+	getRoleAuth:params=>{
+		return http.get('/system/role/menu/auth_list',params)
+	},
+	//保存角色菜单权限 (crm14.1)
+	//RoleId
+	//MenuIds
+	//HalfMenuIds
+	saveRoleAuth:params=>{
+		return http.post('/system/role/menu/auth_save',params)
+	},
+	//获取用户所有的按钮权限
+	getRoleBtnAuth:params=>{
+		return http.get('/system/role/menu/buttons',params)
 	}
 }
 

+ 9 - 0
src/api/modules/sheetApi.js

@@ -245,4 +245,13 @@ export const searchTarget  = params => {
  */
 export const insertData = params => {
 	return http.get('/datamanage/edb_info/date_data',params)
+}
+
+/**
+ * 获取日期最近几期的数据
+ * @param {*} params EdbInfoId Date Num
+ * @returns 
+ */
+export const getDateLatelyData = params => {
+	return http.get('/datamanage/edb_info/date_data/before_after',params)
 }

+ 97 - 9
src/components/chart/chartDetailHandlesWrap.vue

@@ -5,18 +5,20 @@
       class="span-item shareLink"
       @click="copyChartConfirm('url')"
       :data-clipboard-text="linkUrl"
-      v-if="!chartInfo.Disabled"
+      v-if="!chartInfo.Disabled&&isShowBtn('share')"
     >
       <i class="el-icon-share" />&nbsp;分享
     </li>
-    <li class="span-item" @click="addMychartHandle(chartInfo)">
+    <li v-if="isShowBtn('addMyChart')"
+        class="span-item" @click="addMychartHandle(chartInfo)">
       <img
         :src="$icons.chart_join_ico"
         alt=""
         style="width: 13px; height: 12px; vertical-align: middle"
       />加入我的图库
     </li>
-    <li class="span-item" @click="refreshHandle">
+    <li v-if="isShowBtn('refresh')"
+        class="span-item" @click="refreshHandle">
       <span
         ><i class="el-icon-refresh" style="margin-left: 0" />&nbsp;刷新
       </span>
@@ -26,12 +28,12 @@
         <i class="el-icon-collection" />&nbsp;保存
       </span>
     </li>
-    <li class="span-item" v-if="chartInfo.Button.IsCopy">
+    <li class="span-item" v-if="chartInfo.Button.IsCopy&&isShowBtn('otherSave')">
       <span @click="saveChartOtherHandle">
         <i class="el-icon-document-add" />&nbsp;另存为
       </span>
     </li>
-    <li class="span-item" v-if="chartInfo.Button.IsEdit" @click="editChartHandle">
+    <li class="span-item" v-if="chartInfo.Button.IsEdit&&isShowBtn('edit')" @click="editChartHandle">
       <img
         src="~@/assets/img/set_m/edit.png"
         alt=""
@@ -41,21 +43,22 @@
     <li
       class="span-item copy"
       @click="copyChartConfirm('office')"
-      v-if="!chartInfo.Disabled"
+      v-if="!chartInfo.Disabled&&isShowBtn('copyOffice')"
     >
       <i class="el-icon-document-copy" />&nbsp;复制至office
     </li>
     <li
       class="span-item copy"
       @click="copyChartConfirm('微信')"
-      v-if="!chartInfo.Disabled"
+      v-if="!chartInfo.Disabled&&isShowBtn('copyWechat')"
     >
       <img
         style="width: 13px; height: 12px; vertical-align: middle"
         src="~@/assets/img/chart_m/WeChat.jpg"
       />&nbsp;复制至微信
     </li>
-    <li class="span-item copy" @click="openEnNameDia">
+    <li v-if="isShowBtn('enNameSetting')"
+        class="span-item copy" @click="openEnNameDia">
       <img
         style="width: 16px; vertical-align: middle"
         :src="$icons.to_en"
@@ -65,7 +68,7 @@
       class="span-item"
       style="color: #ff4040"
       @click="delChartHandle"
-      v-if="chartInfo.Button.IsEdit"
+      v-if="chartInfo.Button.IsEdit&&isShowBtn('del')"
     >
       <i class="el-icon-delete" style="color: #ff4040" />&nbsp;删除
     </li>
@@ -98,6 +101,91 @@ export default {
     },
     delChartHandle() {
       this.$emit('delChartHandle')
+    },
+    //在原先按钮显示的逻辑上,加上权限控制
+    //由于多个图表共用这个操作栏,通过路由判断
+    isShowBtn(btn){
+        const {path} = this.$route
+        const {statisticPermission,productPricePermission,checkPermissionBtn} = this.permissionBtn
+        const chartrelevanceMap = {
+            share:checkPermissionBtn(statisticPermission.corrAnalysis_share),
+            addMyChart:checkPermissionBtn(statisticPermission.corrAnalysis_addMyChart),
+            refresh:checkPermissionBtn(statisticPermission.corrAnalysis_refresh),
+            otherSave:checkPermissionBtn(statisticPermission.corrAnalysis_otherSave),
+            edit:checkPermissionBtn(statisticPermission.corrAnalysis_edit),
+            copyOffice:checkPermissionBtn(statisticPermission.corrAnalysis_copyOffice),
+            copyWechat:checkPermissionBtn(statisticPermission.corrAnalysis_copyWechat),
+            enNameSetting:checkPermissionBtn(statisticPermission.corrAnalysis_enNameSetting),
+            del:checkPermissionBtn(statisticPermission.corrAnalysis_del),
+        }
+        const fittingEquationMap = {
+            share:checkPermissionBtn(statisticPermission.fittingEq_share),
+            addMyChart:checkPermissionBtn(statisticPermission.fittingEq_addMyChart),
+            refresh:checkPermissionBtn(statisticPermission.fittingEq_refresh),
+            otherSave:checkPermissionBtn(statisticPermission.fittingEq_otherSave),
+            edit:checkPermissionBtn(statisticPermission.fittingEq_edit),
+            copyOffice:checkPermissionBtn(statisticPermission.fittingEq_copyOffice),
+            copyWechat:checkPermissionBtn(statisticPermission.fittingEq_copyWechat),
+            enNameSetting:checkPermissionBtn(statisticPermission.fittingEq_enNameSetting),
+            del:checkPermissionBtn(statisticPermission.fittingEq_del),
+        }
+        const statisticFeatureMap = {
+            share:checkPermissionBtn(statisticPermission.statisticFeature_share),
+            addMyChart:checkPermissionBtn(statisticPermission.statisticFeature_addMyChart),
+            refresh:checkPermissionBtn(statisticPermission.statisticFeature_refresh),
+            otherSave:checkPermissionBtn(statisticPermission.statisticFeature_otherSave),
+            edit:checkPermissionBtn(statisticPermission.statisticFeature_edit),
+            copyOffice:checkPermissionBtn(statisticPermission.statisticFeature_copyOffice),
+            copyWechat:checkPermissionBtn(statisticPermission.statisticFeature_copyWechat),
+            enNameSetting:checkPermissionBtn(statisticPermission.statisticFeature_enNameSetting),
+            del:checkPermissionBtn(statisticPermission.statisticFeature_del),
+        }
+        const priceLineMap = {
+            share:checkPermissionBtn(productPricePermission.goodsPrice_priceLine_share),
+            addMyChart:checkPermissionBtn(productPricePermission.goodsPrice_priceLine_addMyChart),
+            refresh:checkPermissionBtn(productPricePermission.goodsPrice_priceLine_refresh),
+            otherSave:checkPermissionBtn(productPricePermission.goodsPrice_priceLine_otherSave),
+            edit:checkPermissionBtn(productPricePermission.goodsPrice_priceLine_edit),
+            copyOffice:checkPermissionBtn(productPricePermission.goodsPrice_priceLine_copyOffice),
+            copyWechat:checkPermissionBtn(productPricePermission.goodsPrice_priceLine_copyWechat),
+            enNameSetting:checkPermissionBtn(productPricePermission.goodsPrice_priceLine_enNameSetting),
+            del:checkPermissionBtn(productPricePermission.goodsPrice_priceLine_del),
+        }
+        const incomeLine = {
+            share:checkPermissionBtn(productPricePermission.goodsPrice_incomeLine_share),
+            addMyChart:checkPermissionBtn(productPricePermission.goodsPrice_incomeLine_addMyChart),
+            refresh:checkPermissionBtn(productPricePermission.goodsPrice_incomeLine_refresh),
+            otherSave:checkPermissionBtn(productPricePermission.goodsPrice_incomeLine_otherSave),
+            edit:checkPermissionBtn(productPricePermission.goodsPrice_incomeLine_edit),
+            copyOffice:checkPermissionBtn(productPricePermission.goodsPrice_incomeLine_copyOffice),
+            copyWechat:checkPermissionBtn(productPricePermission.goodsPrice_incomeLine_copyWechat),
+            enNameSetting:checkPermissionBtn(productPricePermission.goodsPrice_incomeLine_enNameSetting),
+            del:checkPermissionBtn(productPricePermission.goodsPrice_incomeLine_del),
+        }
+        //相关性分析
+        if(path==='/chartrelevance'){
+            return chartrelevanceMap[btn]
+        }
+        //拟合方程曲线
+        if(path==='/fittingEquationList'){
+            return fittingEquationMap[btn]
+        }
+        //统计特性
+        if(path==='/statisticFeatureList'){
+            return statisticFeatureMap[btn]
+        }
+        //商品价格曲线
+        if(path==='/commordityChartBase'){
+            const {Source,ChartType} = this.chartInfo
+            if(Source===2&&ChartType===8){//是商品价格曲线
+                return priceLineMap[btn]
+            }else{//是利润曲线
+                return incomeLine[btn]
+            }
+            
+        }
+
+        return false
     }
   },
 };

+ 27 - 1
src/components/chart/chartListWrap.vue

@@ -25,7 +25,7 @@
           />
           <div class="item-bottom">
             <span>创建时间: {{ chart.CreateTime.slice(0,10) }}</span>
-            <div>
+            <div v-if="isShowBtn(chart)">
               <span
                 class="join_txt"
                 @click="$emit('addMychartHandle',chart)"
@@ -59,6 +59,32 @@ export default {
 
   },
   methods:{
+    isShowBtn(item){
+        const {path} = this.$route
+        const {statisticPermission,productPricePermission,checkPermissionBtn} = this.permissionBtn
+        //相关性分析
+        if(path==='/chartrelevance'){
+            return checkPermissionBtn(statisticPermission.corrAnalysis_addMyChart)
+        }
+        //拟合方程曲线
+        if(path==='/fittingEquationList'){
+            return checkPermissionBtn(statisticPermission.fittingEq_addMyChart)
+        }
+        //统计特性
+        if(path==='/statisticFeatureList'){
+            return checkPermissionBtn(statisticPermission.statisticFeature_addMyChart)
+        }
+        //商品价格曲线
+        if(path==='/commordityChartBase'){
+            const {Source,ChartType} = item
+            if(Source===2&&ChartType===8){//是商品价格曲线
+                return checkPermissionBtn(productPricePermission.goodsPrice_priceLine_addMyChart)
+            }else{//是利润曲线
+                return checkPermissionBtn(productPricePermission.goodsPrice_incomeLine_addMyChart)
+            }
+        }
+        return false
+    }
   },
 }
 </script>

+ 1 - 0
src/components/lzTable.vue

@@ -18,6 +18,7 @@
               {{data[item]}}
               <span v-if="data['IndexCode']&&(item==='Frequency'||item==='Unit')">
                 <img
+                  v-permission="permissionBtn.dataSourcePermission.bcyfData_edit"
                   src="~@/assets/img/set_m/edit.png"
                   alt="edit"
                   style="width: 14px; height: 14px; margin-left: 5px;cursor:pointer;"

+ 10 - 4
src/main.js

@@ -10,6 +10,7 @@ import routes from "./routes/routes";
 import "font-awesome/css/font-awesome.min.css";
 import "@/utils/dialog.js";
 import "@/utils/option-scroll.js";
+import "@/utils/buttonPermission.js";
 import { mixins } from "@/mixins";
 Vue.mixin(mixins);
 
@@ -80,6 +81,9 @@ import { VueMasonryPlugin } from "vue-masonry";
 
 Vue.use(VueMasonryPlugin);
 
+import * as permissionBtn from "@/utils/buttonConfig";
+Vue.prototype.permissionBtn = permissionBtn
+
 // flat
 Array.prototype.flat = function (count) {
   let c = count || 1;
@@ -124,17 +128,17 @@ export const store = new Vuex.Store({
   ...stores,
 });
 
-import { getUserUuid } from "./api/api";
-router.beforeEach((to, from, next) => {
+//import { getUserUuid } from "./api/api";
+router.beforeEach(async(to, from, next) => {
   // 判断本地是否有uuid
-  const uuid = localStorage.getItem("uuid");
+  /* const uuid = localStorage.getItem("uuid");
   if (!uuid) {
     getUserUuid().then((res) => {
       if (res.Ret == 200) {
         localStorage.setItem("uuid", res.Data);
       }
     });
-  }
+  } */
 
   let auth = localStorage.getItem("auth") || false;
   if (to.path != "/login" && to.path!='/temppage' && !auth) {
@@ -161,6 +165,8 @@ router.beforeEach((to, from, next) => {
     if (window._hmt) {
       window._hmt.push(["_trackPageview", "/#" + to.fullPath]);
     }
+    //获取权限按钮
+    to.path != "/login"&&to.path!='/temppage'&&await store.dispatch('getPermissionButtons')
     next();
   } else {
     next({ path: "/404" });

+ 5 - 4
src/mixins/theme.js

@@ -1,4 +1,6 @@
-
+/* 
+一些动态配置和一些全局自定义东西 
+*/
 export default {
 	name: '后台管理系统',
   theme_color: '#0052D9',
@@ -25,7 +27,6 @@ export default {
     },
   ],
   login_bg: require('@/assets/img/login_bg.png'),//登录页的大图
-  login_logo: require('@/assets/img/login_logo.png')
-  // g_logo: require('@/assets/img/home/logo.png'), //主页菜单栏logo
-  // g_mini_logo: require('@/assets/img/home/logo_mini.png'), //主页菜单栏mini-logo
+  login_logo: require('@/assets/img/login_logo.png'),
+  dynamicOutLinks:{}//动态的外部link链接
 }

+ 21 - 1
src/routes/modules/chartRoutes.js

@@ -158,7 +158,7 @@ export default [
 		children: [
 			{
 				path: 'chartrelevance',
-				name: '相关性图表',
+				name: '相关性分析',
 				component:()=>import('@/views/chartRelevance_manage/list.vue')
 			},
 			{
@@ -199,5 +199,25 @@ export default [
 				}
 			}
 		]
+	},
+
+	/* 持仓分析 */
+	{
+		path:'/',
+		component: home,
+		name: '持仓分析',
+		hidden:  false,
+		children: [
+			{
+				path: 'positionAnalysisList',
+				name: '持仓列表',
+				component:()=>import('@/views/positionAnalysis_manage/list.vue')
+			},
+			{
+				path: 'positionAnalysisDetail',
+				name: '持仓详情',
+				component:()=>import('@/views/positionAnalysis_manage/detail.vue'),
+			}
+		]
 	}
 ]

+ 2 - 1
src/routes/modules/oldRoutes.js

@@ -266,7 +266,8 @@ export default [
       },
       {
         path: "Sysauth",
-        component: () => import("@/views/system_manage/authManage.vue"),
+        //component: () => import("@/views/system_manage/authManage.vue"),
+        component: () => import("@/views/system_manage/newAuthManage.vue"),
         name: "设置权限",
         hidden: true,
         meta: {

+ 457 - 0
src/utils/buttonConfig.js

@@ -0,0 +1,457 @@
+//维护 按钮列表 已加载在全局
+//通过 this.permissionBtn 调用
+import {store} from "../main";
+/**
+ * 判断按钮在不在用户的权限内
+ * @param {String} button_code 
+ * @returns Boolean
+ */
+export const checkPermissionBtn = (button_code)=>{
+    const buttonCodes = store.state.permissionButton.permissionButtons.map(item=>item.ButtonCode)
+    return buttonCodes.includes(button_code)
+}
+/*
+ * -----------------------------------------------------------------------------研报管理------------------------------------------------
+ */
+/*
+ *--------中文研报列表----------- 
+ */
+export const reportManageBtn={
+    reportManage_sendMsg:'reportManage:sendMsg',//推送消息/已推送消息
+    reportManage_reportView:'reportManage:reportView',//研报预览:即是否能点击研报名称跳转预览页面
+    reportManage_reportView_wechartShare:'reportManage:reportView:wechartShare',//研报预览页面-微信分享
+    reportManage_reportView_copyWechat:'reportManage:reportView:copyWechat',//研报预览页面-复制链接
+    reportManage_audioDownload:'reportManage:audioDownload',//音频下载
+    reportManage_audioUpload:'reportManage:audioUpload',//音频上传
+    reportManage_reportDel:'reportManage:reportDel',//删除研报
+    reportManage_reportEdit:'reportManage:reportEdit',//编辑研报
+    reportManage_cancelPublish:'reportManage:cancelPublish',//取消发布
+    reportManage_publish:'reportManage:publish',//发布研报
+    reportManage_reportList:'reportManage:reportList',//研报列表的选项
+    reportManage_reportList_uv:'reportManage:reportList:uv',//研报列表-PV/UV
+    reportManage_reportList_sendTime:'reportManage:reportList:sendTime',//研报列表-报告推送时间
+    reportManage_dayWeekReportAdd:'reportManage:dayWeekReportAdd',//添加晨报周报
+    reportManage_reportAdd:'reportManage:reportAdd',//添加研报
+}
+/*
+*--------英文研报列表----------- 
+*/
+export const enReportManageBtn = {
+    enReport_reportView:'enReport:reportView',//研报预览:即是否能点击研报名称跳转预览页面
+    enReport_reportView_wechatShare:'enReport:reportView:wechatShare',//研报预览页面-微信分享
+    enReport_reportView_copyWechat:'enReport:reportView:copyWechat',//研报预览页面-复制链接
+    enReport_sendEmail:'enReport:sendEmail',//群发邮件/群发日志
+    enReport_reportDel:'enReport:reportDel',//删除研报
+    enReport_reportEdit:'enReport:reportEdit',//编辑研报
+    enReport_cancelPublish:'enReport:cancelPublish',//取消发布
+    enReport_publish:'enReport:publish',//发布研报
+    enReport_syncPolicy:'enReport:syncPolicy',//同步策略报告
+    enReport_reportAdd:'enReport:reportAdd',//添加研报
+
+}
+/*
+*--------中文分类----------- 
+*/
+export const classifyBtn={
+    classifyList_cnClassify:'classifyList:cnClassify',//中文分类这个选项卡是否显示
+    classifyList_cnClassify_classifyDel:'classifyList:cnClassify:classifyDel',//一二级分类删除
+    classifyList_cnClassify_authSetting:'classifyList:cnClassify:authSetting',//二级分类权限配置
+    classifyList_cnClassify_chapterSetting:'classifyList:cnClassify:chapterSetting',//晨周报章节设置
+    /*---------添加编辑分类------------- */
+    classifyList_cnClassify_classifyAdd:'classifyList:cnClassify:classifyAdd',//一二级添加编辑分类
+    classifyList_cnClassify_relateSetting:'classifyList:cnClassify:relateSetting',//表单项:关联设置
+    classifyList_cnClassify_miniHidden:'classifyList:cnClassify:miniHidden',//表单项:小程序隐藏
+    classifyList_cnClassify_pcBackColor:'classifyList:cnClassify:pcBackColor',//表单项:PC端背景颜色
+    classifyList_cnClassify_shareImgs:'classifyList:cnClassify:shareImgs',//表单项:分享链接配图
+    classifyList_cnClassify_reportImgs:'classifyList:cnClassify:reportImgs',//表单项:报告合集配图
+    classifyList_cnClassify_ficcIcon:'classifyList:cnClassify:ficcIcon',//表单项:FICCicon
+    classifyList_cnClassify_ficcSort:'classifyList:cnClassify:ficcSort',//表单项:FICC页排序
+    classifyList_cnClassify_backSort:'classifyList:cnClassify:backSort',//表单项:后台排序
+    classifyList_cnClassify_showType:'classifyList:cnClassify:showType',//表单项:展示形式
+    classifyList_cnClassify_childMenu:'classifyList:cnClassify:childMenu',//表单项:子目录
+}
+/*
+*--------英文分类----------- 
+*/
+export const enClassifyBtn = {
+    classifyList_enClassify:'classifyList:enClassify',//英文分类这个选项卡是否展示
+    /* -------------线上路演------------- */
+    classifyList_enClassify_roadshow:'classifyList:enClassify:roadshow',//线上路演这个选项卡是否展示
+    classifyList_enClassify_rsDel:'classifyList:enClassify:rsDel',//线上路演一二级分类删除
+    classifyList_enClassify_rsAuthSetting:'classifyList:enClassify:rsAuthSetting',//线上路演二级分类权限设置
+    classifyList_enClassify_rsEdit:'classifyList:enClassify:rsEdit',//线上路演一二级分类编辑
+    classifyList_enClassify_rsAddClassify:'classifyList:enClassify:rsAddClassify',//线上路演添加分类按钮
+    /* -------------英文研报------------- */
+    classifyList_enClassify_report:'classifyList:enClassify:report',//英文研报这个选项卡是否展示
+    classifyList_enClassify_rpDel:'classifyList:enClassify:rpDel',//英文研报一二级删除
+    classifyList_enClassify_rpAuthSetting:'classifyList:enClassify:rpAuthSetting',//英文研报二级分类权限配置
+    classifyList_enClassify_rpEdit:'classifyList:enClassify:rpEdit',//英文研报一二级编辑
+    classifyList_enClassify_rpAddClassify:'classifyList:enClassify:rpAddClassify',//英文研报添加分类
+}
+/*
+*--------作者管理----------- 
+*/
+export const authorManage = {
+/*------------------英文研报作者管理------------ */
+    authorManage_enReport:'authorManage:enReport',//英文研报选项卡是否展示
+    authorManage_enReport_enable:'authorManage:enReport:enable',//英文研报作者启用/禁用
+    authorManage_enReport_del:'authorManage:enReport:del',//英文研报作者删除
+    authorManage_enReport_edit:'authorManage:enReport:edit',//英文研报作者编辑
+/*------------------中文研报作者管理------------ */
+    authorManage_cnReport:'authorManage:cnReport',//中文研报选项卡是否展示
+    authorManage_cnReport_enable:'authorManage:cnReport:enable',//中文研报作者启用/禁用
+    authorManage_cnReport_del:'authorManage:cnReport:del',//中文研报作者删除
+    authorManage_cnReport_edit:'authorManage:cnReport:edit',//中文研报作者编辑
+
+    authorManage_add:'authorManage:add',//添加作者按钮
+}
+/*
+*--------英文品种配置----------- 
+*/
+export const enChartPermission = {
+    enChartPermission_del:'enChartPermission:del',
+    enChartPermission_save:'enChartPermission:save',
+}
+/*
+*--------云盘----------- 
+*/
+export const cloudDisk = {
+    cloudDisk_del:'cloudDisk:del',
+    cloudDisk_download:'cloudDisk:download',
+    cloudDisk_rename:'cloudDisk:rename',
+    cloudDisk_uploadFile:'cloudDisk:uploadFile',
+    cloudDisk_newDir:'cloudDisk:newDir'
+}
+/*
+ * -----------------------------------------------------------------------------智能PPT------------------------------------------------
+ */
+/*
+*--------中文PPT----------- 
+*/
+export const pptPermission ={
+    /*---------对PPT操作--------- */
+    ppt_del:'ppt:del',
+    ppt_copy:'ppt:copy',
+    ppt_toEn:'ppt:toEn',//转英文PPT
+    ppt_toReport:'ppt:toReport',//转报告
+    ppt_download:'ppt:download',
+    ppt_show:'ppt:show',//演示
+    ppt_publish:'ppt:publish',
+    /*--------页面按钮操作-------- */
+    ppt_save:'ppt:save',//添加PPT按钮,同时也控制编辑权限
+    ppt_merge:'ppt:merge',//合并PPT
+}
+/*
+*--------英文PPT---------- 
+*/
+export const enPPTPermission={
+    /*---------对PPT操作--------- */
+    pptEn_del:'pptEn:del',
+    pptEn_copy:'pptEn:copy',
+    pptEn_toReport:'pptEn:toReport',//转报告
+    pptEn_download:'pptEn:download',
+    pptEn_show:'pptEn:show',//演示
+    pptEn_publish:'pptEn:publish',
+    /*--------页面按钮操作-------- */
+    pptEn_save:'pptEn:save',//添加PPT按钮,同时也控制编辑权限
+    pptEn_merge:'pptEn:merge',//合并PPT
+}
+
+/*
+ * ---------------------------------------------------------------------------数据源------------------------------------------------
+ */
+export const dataSourcePermission = {
+    /*--------手工指标列表---- */
+    manualData_del:'manualData:del',
+    manualData_add:'manualData:add',//新增编辑
+    manualData_add_updateRemind:'manualData:add:updateRemind',//新增编辑-更新提醒
+    /*--------手工数据录入---- */
+    manualDataWrite_edit:'manualDataWrite:edit',//编辑按钮,直接编辑没有禁
+    manualDataWrite_export:'manualDataWrite:export',//导出
+    manualDataWrite_import:'manualDataWrite:import',//导入
+    manualDataWrite_copy:'manualDataWrite:copy',//复制
+    /*--------期货数据库没有要控制的东西---- */
+    /*--------隆众原始数据库---- */
+    longzhongData_export:'longzhongData:export',
+    /*--------钢联原始数据库---- */
+    glData_export:'glData:export',
+    /*--------钢联化工数据库---- */
+    mysteelData_refresh:'mysteelData:refresh',//一键刷新
+    mysteelData_export:'mysteelData:export',
+    mysteelData_add:'mysteelData:add',
+    /*--------SMM原始数据库---- */
+    smmData_export:'smmData:export',
+    /*--------百川盈孚---- */
+    bcyfData_edit:'bcyfData:edit',//编辑指标按钮
+    bcyfData_export:'bcyfData:export',
+    /*--------卓创数据(红桃3)---- */
+    hongtao3Data_export:'hongtao3Data:export',
+    /*--------中国煤炭市场网)---- */
+    zgmtData_export:'zgmtData:export',
+    /*--------EIA  STEO报告---- */
+    eiaData_export:'eiaData:export',
+    /*--------国家统计局---- */
+    gjtjjData_export:'gjtjjData:export'
+
+}
+
+/*
+ * ---------------------------------------------------------------------------ETA指标库------------------------------------------------
+ */
+export const edbDataPermission = {
+    /*-----------指标详情按钮--------- */
+    edbData_refreshAll:'edbData:refreshAll',//全部刷新
+    edbData_newestValue:'edbData:newestValue',//添加最新值
+    edbData_enNameSetting:'edbData:enNameSetting',//设置英文名称
+    edbData_edbSource:'edbData:edbSource',//指标溯源
+    edbData_copyData:'edbData:copyData',//复制数据
+    edbData_toImgs:'edbData:toImgs',//一键成图
+    edbData_edit:'edbData:edit',//指标编辑,也包括列表项的编辑按钮
+    edbData_update:'edbData:update',//更新指标
+    /*------------页面按钮---------- */
+    edbData_batchUpdate:'edbData:batchUpdate',//一键更新
+    edbData_dataAdjust:'edbData:dataAdjust',//数据调整
+    edbData_codeRun:'edbData:codeRun',//代码运算
+    edbData_replaceEdb:'edbData:replaceEdb',//替换指标
+    edbData_calcuEdb:'edbData:calcuEdb',//计算指标
+    edbData_addEdb:'edbData:addEdb',//添加指标
+    edbData_switchEn:'edbData:switchEn',//切换英文版
+}
+/*
+ * ---------------------------------------------------------------------------ETA预测指标------------------------------------------------
+ */
+export const predictEdbPermission = {
+    /*-----------指标详情按钮--------- */
+    edbPreData_switchSeason:'edbPreData:switchSeason',//切换季节性图
+    edbPreData_viewData:'edbPreData:viewData',//查看数据
+    edbPreData_copyData:'edbPreData:copyData',//复制数据
+    edbPreData_del:'edbPreData:del',//删除
+    edbPreData_recalcu:'edbPreData:recalcu',//重新计算
+    edbPreData_save:'edbPreData:save',//保存
+    edbPreData_edit:'edbPreData:edit',//编辑
+    edbPreData_update:'edbPreData:update',//更新
+    edbPreData_edbSource:'edbPreData:edbSource',//指标溯源
+    edbPreData_enNameSetting:'edbPreData:enNameSetting',//设置英文名称
+    /*------------页面按钮---------- */
+    edbPreData_calcuEdb:'edbPreData:calcuEdb',//计算指标
+    edbPreData_addEdb:'edbPreData:addEdb',//添加指标
+    edbPreData_switchEn:'edbPreData:switchEn',//切换英文版
+}
+
+/*
+ * ---------------------------------------------------------------------------ETA图库------------------------------------------------
+ */
+export const chartLibPermission = {
+    /*-----------图表详情按钮--------- */
+    chartLib_viewData:'chartLib:viewData',//查看数据,图表详情的表格操作栏
+    chartLib_copyData:'chartLib:copyData',//复制数据,图表详情的表格操作栏
+    chartLib_del:'chartLib:del',
+    chartLib_enNameSetting:'chartLib:enNameSetting',
+    chartLib_copyWechat:'chartLib:copyWechat',
+    chartLib_copyOffice:'chartLib:copyOffice',
+    chartLib_edit:'chartLib:edit',
+    chartLib_otherSave:'chartLib:otherSave',
+    chartLib_save:'chartLib:save',
+    chartLib_refresh:'chartLib:refresh',
+    chartLib_addMy:'chartLib:addMy',//加入我的图库
+    chartLib_share:'chartLib:share',
+    /*------------页面按钮---------- */
+    chartLib_add:'chartLib:add',
+    chartLib_switchEn:'chartLib:switchEn',
+}
+
+/*
+ * ---------------------------------------------------------------------------My ETA------------------------------------------------
+ */
+export const myETAPermission = {
+    /*-----------图表详情弹窗按钮--------- */
+    myChart_del:'myChart:del',
+    myChart_enNameSetting:'myChart:enNameSetting',
+    myChart_copyWechat:'myChart:copyWechat',
+    myChart_copyOffice:'myChart:copyOffice',
+    myChart_otherSave:'myChart:otherSave',
+    myChart_save:'myChart:save',
+    myChart_edit:'myChart:edit',
+    myChart_refresh:'myChart:refresh',
+    myChart_copyTo:'myChart:copyTo',
+    myChart_share:'myChart:share',
+    myChart_move:'myChart:move',//移出,同时也控制列表项的移出
+    /*-----------页面按钮--------- */
+    myChart_selectChart:'myChart:selectChart',//选择图表
+}
+/*
+ * --------------------------------------------------------------------------ETA表格------------------------------------------------
+*/
+export const etaTablePermission = {
+    /*-----------页面按钮--------- */
+    etaTable_customize:'etaTable:customize',//自定义表格这个按钮显示不显示
+    etaTable_excel:'etaTable:excel',//添加Excel表格这个按钮显示不显示
+    /*-----------自定义表格--------- */
+    etaTable_customize_del:'etaTable:customize:del',
+    etaTable_customize_download:'etaTable:customize:download',
+    etaTable_customize_otherSave:'etaTable:customize:otherSave',
+    etaTable_customize_refresh:'etaTable:customize:refresh',
+    etaTable_customize_edit:'etaTable:customize:edit',
+    /*-----------常规表格--------- */
+    etaTable_excel_del:'etaTable:excel:del',
+    etaTable_excel_download:'etaTable:excel:download',
+    etaTable_excel_save:'etaTable:excel:save'
+}
+/*
+ * --------------------------------------------------------------------------ETA逻辑------------------------------------------------
+*/
+export const sandboxPermission = {
+    sandbox_variety:'sandbox:variety',//沙盘品种选择,控制筛选项和列表项
+    sandbox_addMy:'sandbox:addMy',//复制图片
+    sandbox_del:'sandbox:del',//删除
+    sandbox_saveView:'sandbox:saveView',//添加/编辑/查看
+}
+/*
+ * --------------------------------------------------------------------------语义分析------------------------------------------------
+*/
+export const semanticPermission = {
+    /*-----------文档管理--------- */
+    docPage_save:'docPage:save',//添加编辑文档
+    /*-----------文档对比--------- */
+    saPage_save:'saPage:save',//添加编辑对比文档
+    /*-----------标签管理--------- */
+    tagPage_del:'tagPage:del',
+    tagPage_save:'tagPage:save',//添加编辑标签
+}
+/*
+ * --------------------------------------------------------------------------统计分析------------------------------------------------
+*/
+export const statisticPermission = {
+    /*-----------相关性分析--------- */
+    corrAnalysis_addChart:'corrAnalysis:addChart',//添加图表按钮
+    corrAnalysis_viewData:'corrAnalysis:viewData',//查看表格数据
+    corrAnalysis_copyData:'corrAnalysis:copyData',//复制表格数据
+        /*---图表操作栏--- */
+    corrAnalysis_del:'corrAnalysis:del',
+    corrAnalysis_enNameSetting:'corrAnalysis:enNameSetting',
+    corrAnalysis_copyWechat:'corrAnalysis:copyWechat',
+    corrAnalysis_copyOffice:'corrAnalysis:copyOffice',
+    corrAnalysis_edit:'corrAnalysis:edit',
+    corrAnalysis_otherSave:'corrAnalysis:otherSave',
+    corrAnalysis_refresh:'corrAnalysis:refresh',
+    corrAnalysis_addMyChart:'corrAnalysis:addMyChart',
+    corrAnalysis_share:'corrAnalysis:share',
+
+    /*-----------统计特征--------- */
+    statisticFeature_addChart:'statisticFeature:addChart',//添加图表按钮
+        /*---图表操作栏--- */
+    statisticFeature_del:'statisticFeature:del',
+    statisticFeature_enNameSetting:'statisticFeature:enNameSetting',
+    statisticFeature_copyWechat:'statisticFeature:copyWechat',
+    statisticFeature_copyOffice:'statisticFeature:copyOffice',
+    statisticFeature_edit:'statisticFeature:edit',
+    statisticFeature_otherSave:'statisticFeature:otherSave',
+    statisticFeature_refresh:'statisticFeature:refresh',
+    statisticFeature_addMyChart:'statisticFeature:addMyChart',
+    statisticFeature_share:'statisticFeature:share',
+
+    /*-----------拟合方程曲线--------- */
+    fittingEq_addChart:'fittingEq:addChart',//添加图表按钮
+        /*---图表操作栏--- */
+    fittingEq_del:'fittingEq:del',
+    fittingEq_enNameSetting:'fittingEq:enNameSetting',
+    fittingEq_copyWechat:'fittingEq:copyWechat',
+    fittingEq_copyOffice:'fittingEq:copyOffice',
+    fittingEq_edit:'fittingEq:edit',
+    fittingEq_otherSave:'fittingEq:otherSave',
+    fittingEq_refresh:'fittingEq:refresh',
+    fittingEq_addMyChart:'fittingEq:addMyChart',
+    fittingEq_share:'fittingEq:share',
+}
+/*
+ * --------------------------------------------------------------------------供应分析------------------------------------------------
+*/
+export const stockPlantPermission = {
+    stockPlant_del:'stockPlant:del',
+    stockPlant_anlysisView:'stockPlant:anlysisView',//分析和查看,包括点击品种名称跳转详情
+    stockPlant_saveVariety:'stockPlant:saveVariety',//添加编辑
+}
+/*
+ * --------------------------------------------------------------------------商品价格曲线------------------------------------------------
+*/
+export const productPricePermission = {
+    /*-----------页面按钮--------- */
+    goodsPrice_incomeLine:'goodsPrice:incomeLine',//添加利润曲线
+    goodsPrice_priceLine:'goodsPrice:priceLine',//添加价格曲线
+    /* 利润曲线 */
+    goodsPrice_incomeLine_del:'goodsPrice:incomeLine:del',
+    goodsPrice_incomeLine_enNameSetting:'goodsPrice:incomeLine:enNameSetting',
+    goodsPrice_incomeLine_copyWechat:'goodsPrice:incomeLine:copyWechat',
+    goodsPrice_incomeLine_copyOffice:'goodsPrice:incomeLine:copyOffice',
+    goodsPrice_incomeLine_edit:'goodsPrice:incomeLine:edit',
+    goodsPrice_incomeLine_otherSave:'goodsPrice:incomeLine:otherSave',
+    goodsPrice_incomeLine_refresh:'goodsPrice:incomeLine:refresh',
+    goodsPrice_incomeLine_addMyChart:'goodsPrice:incomeLine:addMyChart',
+    goodsPrice_incomeLine_share:'goodsPrice:incomeLine:share',
+    /* 价格曲线 */
+    goodsPrice_priceLine_del:'goodsPrice:priceLine:del',
+    goodsPrice_priceLine_enNameSetting:'goodsPrice:priceLine:enNameSetting',
+    goodsPrice_priceLine_copyWechat:'goodsPrice:priceLine:copyWechat',
+    goodsPrice_priceLine_copyOffice:'goodsPrice:priceLine:copyOffice',
+    goodsPrice_priceLine_edit:'goodsPrice:priceLine:edit',
+    goodsPrice_priceLine_otherSave:'goodsPrice:priceLine:otherSave',
+    goodsPrice_priceLine_refresh:'goodsPrice:priceLine:refresh',
+    goodsPrice_priceLine_addMyChart:'goodsPrice:priceLine:addMyChart',
+    goodsPrice_priceLine_share:'goodsPrice:priceLine:share',
+}
+/*
+ * --------------------------------------------------------------------------系统设置------------------------------------------------
+*/
+export const sysDepartPermission = {
+    /*-----------部门管理-------- */
+    sysDepart_saveUser:'sysDepart:saveUser',//添加/编辑用户按钮
+    sysDepart_resetPass:'sysDepart:resetPass',//重置密码
+    sysDepart_moveGroup:'sysDepart:moveGroup',//移动分组
+    sysDepart_enable:'sysDepart:enable',//启用禁用
+    sysDepart_del:'sysDepart:del',//用户删除
+    sysDepart_saveUser_researchGroup:'sysDepart:saveUser:researchGroup',//添加/编辑用户表单中,研究方向的按钮
+    sysDepart_saveUser_LabelVal:'sysDepart:saveUser:LabelVal',//姓名角色的标签
+    /*-----------角色管理-------- */
+    sysRole_del:'sysRole:del',//删除角色
+    sysRole_settingAuth:'sysRole:settingAuth',//设置/查看权限
+    sysRole_addRole:'sysRole:addRole',//添加角色
+    /*-----------英文权限配置-------- */
+    enAuthManage_del:'enAuthManage:del',
+    enAuthManage_settingAuth:'enAuthManage:settingAuth'
+}
+/*-----------数据操作权限-------- */
+export const operateAuthPermission = {
+    /*---------图库-------- */
+    operateAuth_chartLib:'operateAuth:chartLib',//图库tab
+    operateAuth_chartLib_edit:'operateAuth:chartLib:edit',//图库的编辑,批量编辑按钮
+    /*---------ETA预测指标库-------- */
+    operateAuth_etaPredictLib:'operateAuth:etaPredictLib',
+    operateAuth_etaPredictLib_authSetting:'operateAuth:etaPredictLib:authSetting',//权限设置/批量权限设置
+    operateAuth_etaPredictLib_edit:'operateAuth:etaPredictLib:edit',
+    /*---------ETA指标库-------- */
+    operateAuth_etaLib:'operateAuth:etaLib',
+    operateAuth_etaLib_authSetting:'operateAuth:etaLib:authSetting',
+    operateAuth_etaLib_edit:'operateAuth:etaLib:edit',
+    /*---------钢联化工数据库-------- */
+    operateAuth_mysteel:'operateAuth:mysteel',
+    operateAuth_mysteel_edit:'operateAuth:mysteel:edit',
+    /*---------手工数据指标-------- */
+    operateAuth_manual:'operateAuth:manual',
+    operateAuth_manual_edit:'operateAuth:manual:edit',
+}
+/*-----------基本配置-------- */
+export const baseConfigPermission = {
+    /*-------其他设置------- */
+    sysJump_updateLog:'sysJump:updateLog',//更新日志
+    sysJump_helpDoc:'sysJump:helpDoc',//帮助文档,如果两个都没权限,就隐藏按钮
+    sysJump_crm:'sysJump:crm',//跳转CRM的按钮
+    sysJump_hr:'sysJump:hr',//跳转HR系统的按钮
+    sysJump_finance:'sysJump:finance',//跳转财务系统的按钮
+    /*-------基本配置表格---*/
+    etaBaseConfig_xunfei:'etaBaseConfig:xunfei',
+    etaBaseConfig_pptEn:'etaBaseConfig:pptEn',
+    etaBaseConfig_ppt:'etaBaseConfig:ppt',
+    etaBaseConfig_watermark:'etaBaseConfig:watermark',
+    etaBaseConfig_watermark_ybChart:'etaBaseConfig:watermark:ybChart',//如果没权限,表单不显示也不校验
+
+}

+ 45 - 0
src/utils/buttonPermission.js

@@ -0,0 +1,45 @@
+//按钮权限判断指令
+import Vue from 'vue';
+import {store} from "../main";
+Vue.directive('permission',{
+    inserted(el,binding){
+        const buttonCodes = store.state.permissionButton.permissionButtons.map(item=>item.ButtonCode)
+        const {value} = binding
+        if(value && typeof(value)=='string'){
+            // 字符类型
+            if(!buttonCodes.includes(value)){
+              // 没有权限,删除dom
+              el.parentNode && el.parentNode.removeChild(el)
+            }
+          }else if(Array.isArray(value)){
+            // 数组类型
+            /**
+             * 权限类型 type
+             * or-只要一个满足 and-全部都满足
+             */
+            let type;
+            let hasType=['or','and'].includes(value[value.length-1].toLocaleLowerCase())
+            if(hasType){
+              //参数中有标明type
+              type=value[value.length-1].toLocaleLowerCase()
+              // 去掉最后一个权限类型参数
+              value.pop()
+              // console.log(value,true);
+              let operation = type=='or'?'some':'every'
+              if(!value[operation](item => buttonCodes.includes(item))){
+                // 没有权限,删除dom
+                el.parentNode && el.parentNode.removeChild(el)
+              }
+            }else{
+              type='or'
+              // console.log(value,false);
+              if(!value.some(item => buttonCodes.includes(item))){
+                // 没有权限,删除dom
+                el.parentNode && el.parentNode.removeChild(el)
+              }
+            }
+          }else{
+            throw new Error('permission指令参数类型错误')
+          }
+    }
+})

+ 87 - 167
src/views/Home.vue

@@ -181,6 +181,9 @@
                           : ""
                       }}客户列表
                     </template>
+                    <template v-if="$route.path==='/positionAnalysisDetail'">
+                      {{breadSelfName||'持仓详情'}}
+                    </template>
                     <template v-else>
                       {{ item.name }}
                     </template>
@@ -221,6 +224,25 @@
                     </svg>
                   </div>
                 </el-tooltip> -->
+                <el-dropdown trigger="click" style="width:130px;" v-if="isUpdateLogShow||isHelpDocShow">
+                  <span class="el-dropdown-link userinfo-inner help-center-inner">
+                    <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" style="color:#333">
+                      <path d="M9.24255 14.5C9.24255 14.0858 9.57834 13.75 9.99255 13.75C10.4068 13.75 10.7426 14.0858 10.7426 14.5C10.7426 14.9142 10.4068 15.25 9.99255 15.25C9.57834 15.25 9.24255 14.9142 9.24255 14.5Z" fill="currentColor"/>
+                      <path d="M9.99261 5.00763C8.32056 5.00763 6.96136 6.36682 6.96136 8.03888H8.21136C8.21136 7.05718 9.01092 6.25763 9.99261 6.25763C10.9743 6.25763 11.7739 7.05718 11.7739 8.03888C11.7739 8.71106 11.2183 9.3851 10.4931 9.67971L10.4899 9.68101C9.82793 9.95419 9.36767 10.6052 9.36767 11.3656V12.5H10.6177V11.3656C10.6177 11.1228 10.7618 10.9216 10.9655 10.837C11.9996 10.4161 13.0239 9.37337 13.0239 8.03888C13.0239 6.36682 11.6647 5.00763 9.99261 5.00763Z" fill="currentColor"/>
+                      <path d="M18.7427 10C18.7427 5.16751 14.8252 1.25 9.99268 1.25C5.16019 1.25 1.24268 5.16751 1.24268 10C1.24267 14.8325 5.16018 18.75 9.99267 18.75C14.8252 18.75 18.7427 14.8325 18.7427 10ZM17.4927 10C17.4927 14.1421 14.1348 17.5 9.99267 17.5C5.85054 17.5 2.49267 14.1421 2.49268 10C2.49268 5.85786 5.85054 2.5 9.99268 2.5C14.1348 2.5 17.4927 5.85787 17.4927 10Z" fill="currentColor"/>
+                    </svg>
+                    <span style="line-height: 20px;margin-left: 4px;">帮助中心</span>
+                    <i class="el-icon-arrow-down el-icon--right" />
+                  </span>
+                  <el-dropdown-menu slot="dropdown">
+                    <el-dropdown-item divided @click.native="toDoc" v-if="isUpdateLogShow"
+                      >更新日志</el-dropdown-item
+                    >
+                    <el-dropdown-item divided @click.native="toOperation" v-if="isHelpDocShow"
+                      >帮助文档</el-dropdown-item
+                    >
+                  </el-dropdown-menu>
+                </el-dropdown>
               </div>
 
               <el-dropdown trigger="click" style="width:130px;">
@@ -236,9 +258,9 @@
                   <el-dropdown-item divided @click.native="logout"
                     >退出登录</el-dropdown-item
                   >
-                  <el-dropdown-item divided @click.native="toDoc"
+                  <!-- <el-dropdown-item divided @click.native="toDoc"
                     >更新日志</el-dropdown-item
-                  >
+                  > -->
                 </el-dropdown-menu>
               </el-dropdown>
             </div>
@@ -277,11 +299,12 @@
 <script>
 import {
   checkPwd,
-  getBusinessCode,
   departInterence,
   customInterence,
   roadshowInterence,
+  getBusinessCode,
 } from "api/api.js";
+import { getPublicSettingsApi } from '@/api/modules/oldApi';
 import PwdDlg from "@/components/pwdDlg.vue";
 import questionMsgDia from "@/components/questionMsgDia.vue";
 import EventBus from "@/api/bus.js";
@@ -310,18 +333,9 @@ export default {
     },
   },
   computed: {
-    done() {
-      //今日待办是否处理完
-      if (!this.todayList) {
-        return false;
-      }
-      // 之前是通过判断列表中是否都有说明,现需要判断列表中都要添加或编辑
-      return this.todayList.every((item) => item.isEdited);
-    },
-    // Role() {
-    //   let role = localStorage.getItem("Role") || "";
-    //   return role;
-    // },
+    breadSelfName() {
+      return this.$store.state.breadSelfName;
+    },  
     isShowRole() {
       let role = localStorage.getItem("RoleIdentity") || "";
       return (
@@ -346,6 +360,18 @@ export default {
         return "left:0;padding-top:0;height:calc(100vh - 68px)";
       }
     },
+    //帮助文档是否展示
+    isHelpDocShow(){
+        return this.permissionBtn.checkPermissionBtn(
+            this.permissionBtn.baseConfigPermission.sysJump_helpDoc
+        )
+    },
+    //更新日志是否展示
+    isUpdateLogShow(){
+        return this.permissionBtn.checkPermissionBtn(
+            this.permissionBtn.baseConfigPermission.sysJump_updateLog
+        )
+    }
   },
   data() {
     return {
@@ -429,6 +455,7 @@ export default {
     if (this.$route.path === "/sealApprovalList") {
       this.isShowApprovalNotice = true;
     }
+    this.resetLinkSys()
   },
   mounted() {
     if (sessionStorage.getItem("hasGetMenu")) {
@@ -437,6 +464,7 @@ export default {
     } else {
       this.getMenuList();
     }
+    this.getPublicSettings();
   },
   methods: {
     //判断是否为初始密码
@@ -611,13 +639,23 @@ export default {
     },
 
     // 操作指南的跳转
-    toOperation(url) {
+    toOperation() {
       // this.$router.replace({name: '/fingerpost', params: {id: 1}})
-      let { href } = this.$router.resolve({
-        path: `/${url}`,
-        query: { contractid: this.contractId },
-      });
-      window.open(href, "_blank");
+      // let { href } = this.$router.resolve({
+      //   path: `/${url}`,
+      //   query: { contractid: this.contractId },
+      // });
+      // window.open(href, "_blank");
+      // 获取商家
+      getBusinessCode().then(res=>{
+        if(res.Ret!==200) return 
+        const bus_code = res.Data||''
+        //打开帮助文档
+        const href = `${process.env.VUE_APP_ETA_HELP_DOCS}?bus_code=${bus_code}`
+        console.log(href);
+        // const href = `http://192.168.77.13:3033/help/index?bus_code=${bus_code}`
+        window.open(href, "_blank");
+      })
     },
     // 跳转去其他的系统
     async linkToOtherMS({path,key}) {
@@ -674,152 +712,7 @@ export default {
         }
       });
     },
-    /* 待办事项列表 */
-    getNotice() {
-      customInterence.noticeList().then((res) => {
-        if (res.Ret === 200) {
-          res.Data.Company.List &&
-            res.Data.Company.List.forEach((item) => {
-              item.CreateTime = item.CreateTime.replace(/-/g, ".");
-            });
-          res.Data.Contract.List &&
-            res.Data.Contract.List.forEach((item) => {
-              item.CreateTime = item.CreateTime.replace(/-/g, ".");
-            });
-          res.Data.Seal.List &&
-            res.Data.Seal.List.forEach((item) => {
-              item.CreateTime = item.CreateTime.replace(/-/g, ".");
-            });
-          res.Data.EdbReplace.List &&
-            res.Data.EdbReplace.List.forEach(
-              (item) => (item.CreateTime = item.CreateTime.replace(/-/g, "."))
-            );
-          res.Data.BusinessTrip.List &&
-            res.Data.BusinessTrip.List.forEach(
-              (item) => (item.CreateTime = item.CreateTime.replace(/-/g, "."))
-            );
-
-          this.noticeList = res.Data;
-          this.noticeCount =
-            this.Role === "admin"
-              ? res.Data.EdbReplace.Total + res.Data.BusinessTrip.Total
-              : res.Data.Company.Total +
-                res.Data.Contract.Total +
-                res.Data.Seal.Total +
-                res.Data.EdbReplace.Total +
-                res.Data.BusinessTrip.Total;
 
-          this.noticeType = this.Role === "admin" ? "更新" : "客户";
-          // 默认显示客户
-          this.currentNoticeList =
-            this.Role === "admin"
-              ? res.Data.EdbReplace.List
-              : res.Data.Company.List;
-
-          // 检查是否有未读的
-          if (this.Role != "admin") {
-            this.flag1 = res.Data.Company.List.some((item) => {
-              return item.MessageStatus === 0;
-            });
-            this.flag2 = res.Data.Contract.List.some((item) => {
-              return item.MessageStatus === 0;
-            });
-            this.flag3 = res.Data.Seal.List.some((item) => {
-              return item.MessageStatus === 0;
-            });
-          }
-
-          this.flag5 = res.Data.ETATrial.List.some((item) => {
-            return item.MessageStatus === 0;
-          });
-          this.flag6 = res.Data.BusinessTrip.List.some((item) => {
-            return item.MessageStatus === 0;
-          });
-
-        }
-      });
-    },
-    /* 点击消息列表 跳转审批列表 */
-    noticeClick(item) {
-      customInterence
-        .readNotice({
-          Id: Number(item.Id),
-        })
-        .then((res) => {
-          if (res.Ret === 200) {
-            item.MessageStatus = 1;
-            if (this.noticeType === "客户") {
-              if (this.$route.path != "/approvalList") {
-                this.$router.push({
-                  path: "/approvalList",
-                });
-              } else {
-                window.location.reload();
-              }
-            } else if (this.noticeType === "合同") {
-              let Role = localStorage.getItem("Role");
-              // 主管跳转合同审批列表
-              if (Role === "ficc_admin" || Role === "rai_admin") {
-                if (this.$route.path != "/contractapprovallist") {
-                  this.$router.push({
-                    path: "/contractapprovallist",
-                  });
-                } else {
-                  window.location.reload();
-                }
-              } else {
-                if (this.$route.path != "/contractmanagelist") {
-                  this.$router.push({
-                    path: "/contractmanagelist",
-                  });
-                } else {
-                  window.location.reload();
-                }
-              }
-            } else if (this.noticeType === "用印") {
-              // 用印
-              if (this.$route.path != "/sealApprovalList") {
-                this.$router.push({
-                  path: "/sealApprovalList",
-                });
-              } else {
-                window.location.reload();
-              }
-            } else if (this.noticeType === "ETA试用") {
-              const path = this.$route.path;
-              let pushPath = "/etaApprovalList";
-              //非管理员:若通过跳转用户列表,若驳回跳转审批列表
-              //const etaApprovalListType = item.Content.includes('通过')?'approved':'all'
-              const etaApprovalListType =
-                item.Redirect === 1 ? "approved" : "all";
-              sessionStorage.setItem(
-                "etaApprovalListType",
-                etaApprovalListType
-              );
-              if (path == pushPath) {
-                window.location.reload();
-              } else {
-                this.$router.push(pushPath);
-              }
-            } else if (this.noticeType === "出差") {
-              const path = this.$route.path;
-              let pushPath;
-              if (item.ApprovalStatus != 1) {
-                // 跳到申请列表
-                pushPath = "/businessTripApplication";
-              } else {
-                // 跳到审批列表
-                pushPath = "/businessTripApproval";
-              }
-              if (path == pushPath) {
-                window.location.reload();
-              } else {
-                this.$router.push(pushPath);
-              }
-            }
-          }
-        });
-    },
     resetpwd() {
       //修改密码
       this.$router.push({ path: "/resetpsd" });
@@ -869,6 +762,7 @@ export default {
     collapseHandle () {
       //折叠导航栏
       this.isCollapse = !this.isCollapse;
+      this.$store.commit('SET_COLLAPSE',this.isCollapse)
       // 派发折叠导航栏事件
       EventBus.$emit("collapseHandle", this.isCollapse);
     },
@@ -890,6 +784,30 @@ export default {
         this.$router.push({ path: "/" + item.meta.pathFrom });
       }
     },
+    resetLinkSys(){
+        const {baseConfigPermission,checkPermissionBtn} = this.permissionBtn
+        const sysMap = {
+            'fd':baseConfigPermission.sysJump_finance,
+            'hr':baseConfigPermission.sysJump_hr,
+            'crm':baseConfigPermission.sysJump_crm,
+        }
+        const linkSystems = this.$setting.linkSystems
+        let linkArr = []
+        for(const k in sysMap){
+            if(checkPermissionBtn(sysMap[k])){
+                linkArr.push(linkSystems.find(i=>i.key===k))
+            }
+        }
+        this.linkSystems = linkArr
+    },
+
+    /* 获取动态配置 外部动态链接 */
+    async getPublicSettings() {
+      const res =  await getPublicSettingsApi();
+      if(res.Ret !== 200) return
+      
+      this.$store.commit('SET_DYNAMIC_LINK',res.Data)
+    }
   },
 };
 </script>
@@ -1158,7 +1076,7 @@ export default {
         .userinfo-fingerpost {
           display: flex;
           align-items: center;
-          margin-right: 50px;
+          // margin-right: 50px;
           color: $theme-color;
           .el-button:hover {
             background: #ecf2fe;
@@ -1179,7 +1097,9 @@ export default {
         .userinfo-inner:hover {
           color: #5882ef;
         }
+        .help-center-inner{
 
+        }
         .icon-box-item {
           padding: 12px;
           border-radius: 4px;

+ 10 - 3
src/views/chartRelevance_manage/components/chartCard.vue

@@ -127,8 +127,7 @@ export default {
           this.chartInfo = data.ChartInfo;
           this.setDefaultChart(data.EdbInfoList);
           break
-        case 3: //3相关性 4滚动相关性
-        case 4:
+        case 3: //3相关性 
           this.chartInfo = data.ChartInfo;
           this.relevanceChartData={
             ChartInfo:data.ChartInfo,
@@ -147,6 +146,14 @@ export default {
           this.tableData=data.EdbInfoList||[]
           this.initRelevanceChartData()
           break
+        case 4: //4滚动相关性
+          this.relevanceChartData = {
+            ChartInfo:data.ChartInfo,
+            CorrelationChartInfo: data.CorrelationChartInfo
+          }
+          this.chartInfo = data.ChartInfo;
+          this.setDefaultChart([data.DataResp]);
+          break
         case 6: //弹性系数
           this.initFittingEquation(data);
           break
@@ -155,7 +162,7 @@ export default {
           this.chartInfo = data.ChartInfo;
           this.setDefaultChart([data.DataResp]);
           break
-        case 9: 
+        case 9: //频率分布
           this.chartInfo = data.ChartInfo;
           this.tableData=data.EdbInfoList||[]
           this.statisticFrequencyData = data.DataResp;

+ 43 - 1
src/views/chartRelevance_manage/components/selectTarget.vue

@@ -14,7 +14,8 @@
         :value="item.val"
       />
     </el-select>
-    <div v-else>
+
+    <div v-else-if="selectStyleType===2">
       <label>选择指标:</label>
       <el-radio-group v-model="targetType" @change="targetTypeChange">
         <el-radio  
@@ -24,9 +25,50 @@
         >{{item.label}}</el-radio>
       </el-radio-group>
     </div>
+
+    <div v-else-if="selectStyleType===3" style="display:flex;align-items:center">
+      <el-select
+        v-model="targetType"
+        placeholder="请选择指标种类"
+        @change="targetTypeChange"
+        style="width: 150px;"
+      >
+        <el-option
+          v-for="item in etaTypeOpt"
+          :key="item.val"
+          :label="item.label"
+          :value="item.val"
+        />
+      </el-select>
+      <el-select
+        v-model="search_txt"
+        v-loadMore="searchLoad"
+        :filterable="!search_txt"
+        remote
+        clearable
+        placeholder="请选择指标名称"
+        style="flex: 1;margin-left: 15px"
+        :remote-method="searchHandle"
+        @click.native="inputFocusHandle"
+        @change="handleSelectTarget"
+      >
+        <i slot="prefix" class="el-input__icon el-icon-search"></i>
+        <el-option
+          v-for="item in searchOptions"
+          :key="item.EdbInfoId"
+          :label="item.EdbName"
+          :value="item.EdbInfoId"
+        >
+          <edbDetailPopover :info="item">
+            <div slot="reference">{{item.EdbName}}</div>
+          </edbDetailPopover>
+        </el-option>
+      </el-select>
+    </div>
     <el-select
       v-model="search_txt"
       v-loadMore="searchLoad"
+      v-if="selectStyleType!==3"
       :filterable="!search_txt"
       remote
       clearable

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

@@ -11,7 +11,8 @@
 		<div class="data-sheet-main" id="box">
       <div class="main-left left" id="left" v-show="!isSlideLeft">
 				<div class="datasheet_top">
-						<el-button type="primary" @click="goAddChart">添加图表</el-button>
+						<el-button v-permission="permissionBtn.statisticPermission.fittingEq_addChart"
+							type="primary" @click="goAddChart">添加图表</el-button>
 						<div style="color: #666">
 							 使用说明
 							<el-tooltip
@@ -261,7 +262,7 @@ export default {
 	computed: {
 		/* 分享地址 */
     linkUrl() {
-      const LINK_CHART_URL = process.env.CHART_LINK;
+      const LINK_CHART_URL = this.$setting.dynamicOutLinks.ChartViewUrl+'/chartshow';
       return `${LINK_CHART_URL}?code=${this.chartInfo.UniqueCode}&fromType=share?&lang=${this.currentLang}`
     }
 	},

+ 30 - 31
src/views/chartRelevance_manage/list.vue

@@ -11,7 +11,8 @@
     <div class="data-sheet-main" id="box">
       <div class="main-left left" id="left" v-show="!isSlideLeft">
         <div class="datasheet_top">
-          <el-button type="primary" @click="goAddChart">添加图表</el-button>
+          <el-button v-permission="permissionBtn.statisticPermission.corrAnalysis_addChart"
+            type="primary" @click="goAddChart">添加图表</el-button>
         </div>
         <div
           style="padding: 0 20px; display: flex; justify-content: space-between"
@@ -233,10 +234,12 @@
             <el-table-column label="操作" key="Copy" align="center" width="140">
               <template slot-scope="scope">
                 <!-- <span @click="delTarget(scope.row)" class="deletesty">删除&nbsp;</span> -->
-                <span class="editsty" @click="copyCode(scope.row)">
+                <span v-permission="permissionBtn.statisticPermission.corrAnalysis_copyData"
+                    class="editsty" @click="copyCode(scope.row)">
                   <i class="el-icon-document-copy" />&nbsp;复制数据</span
                 ><br />
-                <span class="editsty" @click="viewTarget(scope.row)"
+                <span v-permission="permissionBtn.statisticPermission.corrAnalysis_viewData"
+                    class="editsty" @click="viewTarget(scope.row)"
                   >查看数据</span
                 >
               </template>
@@ -320,7 +323,7 @@ export default {
   computed: {
     /* 分享地址 */
     linkUrl() {
-      const LINK_CHART_URL = process.env.CHART_LINK;
+      const LINK_CHART_URL = this.$setting.dynamicOutLinks.ChartViewUrl+'/chartshow';
       return `${LINK_CHART_URL}?code=${this.chartInfo.UniqueCode}&fromType=share?&lang=${this.currentLang}`;
     },
   },
@@ -602,27 +605,29 @@ export default {
 
           this.chartInfo = res.Data.ChartInfo;
           this.tableData = res.Data.EdbInfoList;
-          this.relevanceChartData = {
-            ChartInfo: res.Data.ChartInfo,
-            EdbInfoList: res.Data.EdbInfoList,
-            XEdbIdValue:
-              this.chartInfo.Source === 3
-                ? res.Data.XEdbIdValue
-                : res.Data.DataResp.XDateTimeValue,
-            CorrelationChartInfo: res.Data.CorrelationChartInfo,
-            YDataList: [
-              {
-                Value:
-                  this.chartInfo.Source === 3
-                    ? res.Data.YDataList[0].Value
-                    : res.Data.DataResp.YDataList[0].Value,
-                Color: "#00f",
-                Name: res.Data.ChartInfo.ChartName,
-                NameEn: res.Data.ChartInfo.ChartNameEn,
-              },
-            ],
-          };
-          this.initRelevanceChartData();
+          if(this.chartInfo.Source === 3) {
+            this.relevanceChartData = {
+              ChartInfo: res.Data.ChartInfo,
+              EdbInfoList: res.Data.EdbInfoList,
+              XEdbIdValue:res.Data.XEdbIdValue,
+              CorrelationChartInfo: res.Data.CorrelationChartInfo,
+              YDataList: [
+                {
+                  Value: res.Data.YDataList[0].Value,
+                  Color: "#00f",
+                  Name: res.Data.ChartInfo.ChartName,
+                  NameEn: res.Data.ChartInfo.ChartNameEn
+                },
+              ],
+            };
+            this.initRelevanceChartData() 
+          }else if(this.chartInfo.Source === 4) { //滚动相关性逻辑又换成曲线了
+            this.relevanceChartData = {
+              CorrelationChartInfo: res.Data.CorrelationChartInfo
+            }
+            this.setDefaultChart([res.Data.DataResp]);
+          }
+          
         });
     },
 
@@ -708,12 +713,6 @@ export default {
               fontSize: "18px",
             },
           },
-          xAxis: [
-            {
-              ...this.options.xAxis,
-              offset: -(heightNum - 136) / 2,
-            },
-          ],
           legend: {
             ...copyOtherOptions[chartType],
             ...dynamic_copyOptions[chartType],

+ 1 - 1
src/views/chartRelevance_manage/relevanceChartEditor.vue

@@ -530,7 +530,7 @@ export default {
       }
       const { Correlation,RollingCorrelation } = this.chartInfo;
       if(Correlation.CalculateValue*valueMap[Correlation.CalculateUnit] < Correlation.LeadValue*valueMap[Correlation.LeadUnit]*2) {
-        this.chartInfo.Correlation.CalculateValue = '';
+        this.chartInfo.Correlation.CalculateValue = 0;
         this.$message.warning('相关性计算窗口必须≥2*分析周期')
         checkBool = false
       }

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

@@ -11,7 +11,8 @@
 		<div class="data-sheet-main" id="box">
       <div class="main-left left" id="left" v-show="!isSlideLeft">
 				<div class="datasheet_top">
-						<el-button type="primary" @click="goAddChart">添加图表</el-button>
+						<el-button v-permission="permissionBtn.statisticPermission.statisticFeature_addChart"
+							 type="primary" @click="goAddChart">添加图表</el-button>
 				</div>
 
 				<div class="search-cont">
@@ -246,7 +247,7 @@ export default {
 	computed: {
 		/* 分享地址 */
     linkUrl() {
-      const LINK_CHART_URL = process.env.CHART_LINK;
+      const LINK_CHART_URL = this.$setting.dynamicOutLinks.ChartViewUrl+'/chartshow';
       return `${LINK_CHART_URL}?code=${this.chartInfo.UniqueCode}&fromType=share?&lang=${this.currentLang}`
     }
 	},

+ 90 - 10
src/views/classify_manage/classifyEnlist.vue

@@ -3,11 +3,12 @@
     <el-card>
       <div class="header" slot="header">
         <div class="type-box">
-					<span @click="$emit('typeChange','1')">中文分类</span>
-					<span class="act">英文分类</span>
+					<span @click="$emit('typeChange','1')" v-permission="permissionBtn.classifyBtn.classifyList_cnClassify">中文分类</span>
+					<span class="act" v-permission="permissionBtn.enClassifyBtn.classifyList_enClassify">英文分类</span>
 				</div>
         <div>
-        <el-button type="primary" size="small" @click="addClassify"
+        <el-button v-if="isAddClassifyBtnShow"
+        type="primary" size="small" @click="addClassify"
           >添加分类</el-button
         >
         <el-input
@@ -22,9 +23,10 @@
         </el-input>
         </div>
       </div>
-      <div class="tabs-box">
+      <div class="tabs-box" :style="authTabsOpt.length>1?'':'border:none'"
+        v-if="authTabsOpt.length">
         <span 
-          v-for="item in tabsOpt" 
+          v-for="item in authTabsOpt" 
           :key="item.val"
           :class="item.val==aTab?'active':''"
           @click="handleTabChange(item)"
@@ -32,6 +34,7 @@
       </div>
 
       <el-table
+        v-if="authTabsOpt.length"
         :data="tableData"
         v-loading="dataLoading"
         row-class-name="tableRowClassName"
@@ -63,12 +66,15 @@
 
             <div v-else-if="item.prop === 'handle'">
               <span 
+                
                 class="editsty"
-                v-if="row.ischild" 
+                v-if="row.ischild&&isAuthSetBtnShow" 
                 @click="handleShowSetVariety(row)"
               >权限配置</span>
-              <span class="editsty" style="margin:0 20px" @click="itemHandle('edit',row)">编辑</span>
-              <span class="deletesty" @click="itemHandle('del',row)">删除</span>
+              <span class="editsty" v-if="isEditBtnShow"
+                style="margin:0 20px" @click="itemHandle('edit',row)">编辑</span>
+              <span class="deletesty" v-if="isDeleteBtnShow"
+                @click="itemHandle('del',row)">删除</span>
             </div>
           </template>
         </el-table-column>
@@ -110,7 +116,7 @@
               @change="FormClassifyChange"
               :disabled="classifyForm.title=='编辑英文分类'"
             >
-            <el-option v-for="item in tabsOpt" :key="item.val" :label="item.name" :value="item.val"/>
+            <el-option v-for="item in authTabsOpt" :key="item.val" :label="item.name" :value="item.val"/>
             </el-select>
 
           </el-form-item>
@@ -191,6 +197,77 @@ export default {
       }
     }
   },
+  computed:{
+      //添加分类是否展示
+      isAddClassifyBtnShow(){
+          if(this.aTab===0&&this.authTabsOpt.length){
+              return this.permissionBtn.checkPermissionBtn(
+                  this.permissionBtn.enClassifyBtn.classifyList_enClassify_rpAddClassify
+                )
+          }
+          if(this.aTab===1&&this.authTabsOpt.length){
+            return this.permissionBtn.checkPermissionBtn(
+                  this.permissionBtn.enClassifyBtn.classifyList_enClassify_rsAddClassify
+                )
+          }
+        return false
+      },
+      //编辑是否展示
+      isEditBtnShow(){
+        if(this.aTab===0){
+                return this.permissionBtn.checkPermissionBtn(
+                    this.permissionBtn.enClassifyBtn.classifyList_enClassify_rpEdit
+                )
+            }else{
+            return this.permissionBtn.checkPermissionBtn(
+                    this.permissionBtn.enClassifyBtn.classifyList_enClassify_rsEdit
+                )
+            }
+      },
+      //删除是否展示
+      isDeleteBtnShow(){
+        if(this.aTab===0){
+                return this.permissionBtn.checkPermissionBtn(
+                    this.permissionBtn.enClassifyBtn.classifyList_enClassify_rpDel
+                )
+            }else{
+            return this.permissionBtn.checkPermissionBtn(
+                    this.permissionBtn.enClassifyBtn.classifyList_enClassify_rsDel
+                )
+            }
+      },
+      //权限设置是否展示
+      isAuthSetBtnShow(){
+        if(this.aTab===0){
+                return this.permissionBtn.checkPermissionBtn(
+                    this.permissionBtn.enClassifyBtn.classifyList_enClassify_rpAuthSetting
+                )
+            }else{
+            return this.permissionBtn.checkPermissionBtn(
+                    this.permissionBtn.enClassifyBtn.classifyList_enClassify_rsAuthSetting
+                )
+            }
+      },
+      //英文研报、线上路演选项卡
+      authTabsOpt(){
+        const isShowTabRoadshow = this.permissionBtn.checkPermissionBtn(
+            this.permissionBtn.enClassifyBtn.classifyList_enClassify_roadshow
+        )
+        const isShowTabReport = this.permissionBtn.checkPermissionBtn(
+            this.permissionBtn.enClassifyBtn.classifyList_enClassify_report
+        )
+        //没时间写更好的写法了,有空再优化
+        let authTabs = []
+        if(isShowTabReport){
+            authTabs.push(this.tabsOpt[0])
+        }
+        if(isShowTabRoadshow){
+            authTabs.push(this.tabsOpt[1])
+        }
+        return authTabs
+      },
+      //添加分类时的选项框
+  },
   data() {
     return {
       searchform: {
@@ -415,7 +492,10 @@ export default {
   },
 
   mounted() {
-    this.getList();
+      if(this.authTabsOpt.length){
+        this.aTab = this.authTabsOpt[0].val
+        this.getList();
+      }
   },
 };
 </script>

+ 127 - 96
src/views/classify_manage/classifylist.vue

@@ -3,12 +3,13 @@
 		<el-card class="box-card">
 			<div slot="header" class="header">
 				<div class="type-box">
-					<span class="act">中文分类</span>
-					<span @click="$emit('typeChange','2')">英文分类</span>
+					<span class="act" v-permission="permissionBtn.classifyBtn.classifyList_cnClassify">中文分类</span>
+					<span @click="$emit('typeChange','2')" v-permission="permissionBtn.enClassifyBtn.classifyList_enClassify">英文分类</span>
 				</div>
 				<el-form :inline="true" :model="searchform" @submit.native.prevent>
 					<el-form-item label="">
-						<el-button type="primary" size="small" @click="aeDialogTrue">添加分类</el-button>
+						<el-button v-permission="permissionBtn.classifyBtn.classifyList_cnClassify_classifyAdd"
+                            type="primary" size="small" @click="aeDialogTrue">添加分类</el-button>
 					</el-form-item>
 		  			<el-form-item>
 						<el-input placeholder="分类名称" @change="search" v-model="searchform.key_word" clearable size="small">
@@ -18,7 +19,8 @@
 		  		</el-form>
 			</div>
 			<template>
-				<el-table style="border:1px solid #eaeaea;" :data="tableData" v-loading="listLoading" :row-class-name="tableRowClassName" element-loading-text="数据加载中..." :default-expand-all='isexpand' row-key="Id" :tree-props="{children:'children',hasChildren:'hasChildren'}">
+				<el-table v-if="isTableShow"
+                    style="border:1px solid #eaeaea;" :data="tableData" v-loading="listLoading" :row-class-name="tableRowClassName" element-loading-text="数据加载中..." :default-expand-all='isexpand' row-key="Id" :tree-props="{children:'children',hasChildren:'hasChildren'}">
 					<!-- <el-table-column prop="id" label="序号" width="100px" align="left">
 						<template slot-scope="scope">
 							<span>{{scope.row.ischild?'':scope.row.id}}</span>
@@ -39,20 +41,24 @@
 					<el-table-column label="操作" align="center">
 						<template slot-scope="scope">
 							<div style="color:#4099ef; font-size:24px;">
-								<span class="editsty" v-if="scope.row.ClassifyName=='晨报' || scope.row.ClassifyName=='周报'" @click="chapterSetting(scope.row)">章节设置</span>
-								<span class="editsty" :class="{'editedsty' : editedItems.includes(scope.row.Id)}" v-if="scope.row.ischild" @click="configitem(scope.row)">权限配置</span>
+								<span class="editsty" v-permission="permissionBtn.classifyBtn.classifyList_cnClassify_chapterSetting"
+                                    v-if="scope.row.ClassifyName=='晨报' || scope.row.ClassifyName=='周报'" @click="chapterSetting(scope.row)">章节设置</span>
+								<span class="editsty" v-permission="permissionBtn.classifyBtn.classifyList_cnClassify_authSetting"
+                                    :class="{'editedsty' : editedItems.includes(scope.row.Id)}" v-if="scope.row.ischild" @click="configitem(scope.row)">权限配置</span>
 								&nbsp;&nbsp;
 								<!-- <i class="el-icon-edit-outline" @click="edititem(scope.row)"></i> -->
-								<span class="editsty" @click="edititem(scope.row)">编辑</span>
+								<span class="editsty" v-permission="permissionBtn.classifyBtn.classifyList_cnClassify_classifyAdd"
+                                    @click="edititem(scope.row)">编辑</span>
 								&nbsp;&nbsp;
 								<!-- <i class="el-icon-delete" @click="checkdeleteitem(scope.row)"></i> -->
-								<span class="deletesty" @click="checkdeleteitem(scope.row)">删除</span>
+								<span v-permission="permissionBtn.classifyBtn.classifyList_cnClassify_classifyDel"
+                                    class="deletesty" @click="checkdeleteitem(scope.row)">删除</span>
 							</div>
 		  	    		</template>
 					</el-table-column>
 				</el-table>
 			</template>
-			<el-col :span="24" class="toolbar">
+			<el-col :span="24" class="toolbar" v-if="isTableShow">
 		  		<el-pagination v-if="ispage" layout="total,prev,pager,next,jumper" background @current-change="handleCurrentChange" :page-size="pageSize" @size-change="handleSizeChange" :total="total" style="float:right;"></el-pagination>
 		  	</el-col>
 		</el-card>
@@ -72,113 +78,113 @@
 						<el-option v-for="(item,index) in classifyparentArr" :key="index" :label="item.ClassifyName" :value="item.Id"></el-option>
 					</el-select>
 				</el-form-item>
-				<!-- 子目录 -->
-				<el-form-item label="子目录" v-if="aeForm.parent_id==0&&aeForm.showType==1">
-					<draggable v-model="ClassifyMenuList" animation="300">
-						<div style="display:inline-block;margin-right:5px" v-for="(item,index) in ClassifyMenuList" :key="item">
+				<!-- 下面的表单项除了后台排序,都合成一个buttoncode判断:classifyList_cnClassify_childMenu -->
+				<template v-if="permissionBtn.checkPermissionBtn(permissionBtn.classifyBtn.classifyList_cnClassify_childMenu)">
+					<!-- 一级目录子目录 -->
+					<el-form-item label="子目录"
+						v-if="aeForm.parent_id==0&&aeForm.showType==1">
+						<draggable v-model="ClassifyMenuList" animation="300">
+							<div style="display:inline-block;margin-right:5px" v-for="(item,index) in ClassifyMenuList" :key="item">
+								<el-input
+									v-if="item.inputVisible"
+									v-model="item.MenuName"
+									ref="itemINput"
+									size="small"
+									style="width: 90px;"
+									:autofocus="true"
+									@keyup.enter.native="item.inputVisible=false"
+									@blur="item.inputVisible=false"
+								></el-input>
+								<el-tag
+									v-else
+									closable
+									:disable-transitions="false"
+									@click="showInput(index)"
+									@close="handleClose(index)">
+									{{item.MenuName}}
+								</el-tag>
+							</div>
+						</draggable>
+						<div>
 							<el-input
-								v-if="item.inputVisible"
-								v-model="item.MenuName"
-								ref="itemINput"
+								v-if="inputVisible"
+								v-model="inputValue"
+								ref="saveTagInput"
 								size="small"
+								@keyup.enter.native="handleInputConfirm"
+								@blur="handleInputConfirm"
 								style="width: 90px;"
-								:autofocus="true"
-								@keyup.enter.native="item.inputVisible=false"
-								@blur="item.inputVisible=false"
-							></el-input>
-							<el-tag
-								v-else
-								closable
-								:disable-transitions="false"
-								@click="showInput(index)"
-								@close="handleClose(index)">
-								{{item.MenuName}}
-							</el-tag>
+							>
+							</el-input>
+							<el-button v-else size="small" @click="showInput(-1)">+ 点击新增</el-button>
 						</div>
-					</draggable>
-					<div>
-						<el-input
-							v-if="inputVisible"
-							v-model="inputValue"
-							ref="saveTagInput"
-							size="small"
-							@keyup.enter.native="handleInputConfirm"
-							@blur="handleInputConfirm"
-							style="width: 90px;"
-						>
-						</el-input>
-						<el-button v-else size="small" @click="showInput(-1)">+ 点击新增</el-button>
-					</div>
-					
-				</el-form-item>
-				<el-form-item label="子目录" v-if="aeForm.parent_id!=0">
-					<el-select v-model="aeForm.ClassifyMenuId"  clearable placeholder="请选择" style="width:400px;">
-						<el-option 
-							:label="item.MenuName" 
-							:value="item.MenuId" 
-							v-for="item in selectMenuOpt" 
-							:key="item.MenuId"
-						></el-option>
-					</el-select>
-				</el-form-item>
-
-				<el-form-item prop="label" label="分类标签" v-if="aeForm.parent_id!=0">
-					<el-input type="textarea" autosize v-model="aeForm.label" placeholder="请输入" size="small" style="width:400px;font-size:14px;"></el-input>
-				</el-form-item>
-				<el-form-item label="展示形式" prop="showType" v-if="aeForm.parent_id==0">
-					<el-select v-model="aeForm.showType" placeholder="请选择" style="width:400px;">
-						<el-option label="列表" :value="1"></el-option>
-						<el-option label="专栏" :value="2"></el-option>
-						<el-option label="品种" :value="3"></el-option>
-					</el-select>
-				</el-form-item>
-				<el-form-item label="后台排序" prop="Sort" v-if="aeForm.parent_id==0">
+						
+					</el-form-item>
+					<!-- 二级目录子目录 -->
+					<el-form-item label="子目录" 
+						v-if="aeForm.parent_id!=0">
+						<el-select v-model="aeForm.ClassifyMenuId"  clearable placeholder="请选择" style="width:400px;">
+							<el-option 
+								:label="item.MenuName" 
+								:value="item.MenuId" 
+								v-for="item in selectMenuOpt" 
+								:key="item.MenuId"
+							></el-option>
+						</el-select>
+					</el-form-item>
+				</template>
+				<template v-if="permissionBtn.checkPermissionBtn(permissionBtn.classifyBtn.classifyList_cnClassify_childMenu)">
+					<el-form-item prop="label" label="分类标签" v-if="aeForm.parent_id!=0">
+						<el-input type="textarea" autosize v-model="aeForm.label" placeholder="请输入" size="small" style="width:400px;font-size:14px;"></el-input>
+					</el-form-item>
+					<el-form-item label="展示形式"
+						prop="showType" v-if="aeForm.parent_id==0">
+						<el-select v-model="aeForm.showType" placeholder="请选择" style="width:400px;">
+							<el-option label="列表" :value="1"></el-option>
+							<el-option label="专栏" :value="2"></el-option>
+							<el-option label="品种" :value="3"></el-option>
+						</el-select>
+					</el-form-item>
+				</template>
+				<el-form-item label="后台排序"
+                    prop="Sort" v-if="aeForm.parent_id==0&&permissionBtn.checkPermissionBtn(permissionBtn.classifyBtn.classifyList_cnClassify_backSort)">
 					<el-input-number v-model="aeForm.Sort" placeholder="请输入数字"></el-input-number>
-					<!-- <el-input type="number" v-model="aeForm.Sort" placeholder="请输入数字" size="small" ></el-input> -->
 				</el-form-item>
-				<el-form-item label="FICC页排序" prop="YbFiccSort" v-if="aeForm.parent_id==0">
+				<template v-if="permissionBtn.checkPermissionBtn(permissionBtn.classifyBtn.classifyList_cnClassify_childMenu)">
+					<el-form-item label="FICC页排序"
+                    prop="YbFiccSort" v-if="aeForm.parent_id==0">
 					<el-input-number v-model="aeForm.YbFiccSort" placeholder="请输入数字"></el-input-number>
-					<!-- <el-input type="number" v-model="aeForm.YbFiccSort" placeholder="请输入数字" size="small" style="width:400px;"></el-input> -->
 				</el-form-item>
-				<el-form-item label="FICC页icon" v-if="aeForm.parent_id==0" prop="YbFiccIcon">
+				<el-form-item label="FICC页icon"
+                    v-if="aeForm.parent_id==0" prop="YbFiccIcon">
 					<input type="file" size="small" name="file" @change="fileSelected(6)" id="file6" class="true-file" style="display:none;">
 					<el-input readonly type="text" v-model="aeForm.YbFiccIcon" placeholder="上传FICC页icon" size="medium" style="width:400px;">
 						<el-button slot="append" type="primary" size="mini" @click.native="clickinput(6)">选择图片</el-button>
 					</el-input>
 				</el-form-item>
-        <el-form-item label="报告合集配图" v-if="aeForm.parent_id==0&&aeForm.showType!==2" prop="YbRightBanner">
+				<el-form-item label="报告合集配图"
+					v-if="aeForm.parent_id==0&&aeForm.showType!==2" prop="YbRightBanner">
 					<input type="file" size="small" name="file" @change="fileSelected(11)" id="file11" class="true-file" style="display:none;">
 					<el-input readonly type="text" v-model="aeForm.YbRightBanner" placeholder="上传报告合集配图" size="medium" style="width:400px;">
 					  <el-button slot="append" type="primary" size="mini" @click.native="clickinput(11)">选择图片</el-button>
 				  </el-input>
 				</el-form-item>
-				<!-- <el-form-item label="已购icon" v-if="aeForm.parent_id==0" prop="YbIconUrl">
-					<input type="file" size="small" name="file" @change="fileSelected(7)" id="file7" class="true-file" style="display:none;">
-					<el-input readonly type="text" v-model="aeForm.YbIconUrl" placeholder="上传已购icon" size="medium" style="width:400px;">
-						<el-button slot="append" type="primary" size="mini" @click.native="clickinput(7)">选择图片</el-button>
-					</el-input>
-				</el-form-item>
-				<el-form-item label="已购详情配图" v-if="aeForm.parent_id==0" prop="YbBgUrl">
-					<input type="file" size="small" name="file" @change="fileSelected(8)" id="file8" class="true-file" style="display:none;">
-					<el-input readonly type="text" v-model="aeForm.YbBgUrl" placeholder="上传已购详情配图" size="medium" style="width:400px;">
-						<el-button slot="append" type="primary" size="mini" @click.native="clickinput(8)">选择图片</el-button>
-					</el-input>
-				</el-form-item> -->
-        <!-- 一级分类 展示分享链接配图 -->
-				<el-form-item label="分享链接配图" prop="YbShareBgImg" v-if="aeForm.parent_id==0">
+				<el-form-item label="分享链接配图" 
+					prop="YbShareBgImg" v-if="aeForm.parent_id==0">
 					<input type="file" size="small" name="file" @change="fileSelected(10)" id="file10" class="true-file" style="display:none;">
 					<el-input readonly type="text" v-model="aeForm.YbShareBgImg" placeholder="上传分享链接配图" size="medium" style="width:400px;">
 						<el-button slot="append" type="primary" size="mini" @click.native="clickinput(10)">选择图片</el-button>
 					</el-input>
 				</el-form-item>
-				<el-form-item label="PC端背景颜色" prop="YbFiccPcIcon" v-if="aeForm.parent_id==0">
+				<el-form-item label="PC端背景颜色"
+					prop="YbFiccPcIcon" v-if="aeForm.parent_id==0">
 					<el-select v-model="aeForm.YbFiccPcIcon" placeholder="选择背景颜色" style="width:400px;">
 						<el-option :label="item.label" :value="item.val" v-for="item in YbFiccPcIconList" :key="item.label"></el-option>
 					</el-select>
 				</el-form-item>
-				<el-form-item label="小程序端隐藏" prop="IsShow" v-if="aeForm.parent_id==0">
+				<el-form-item label="小程序端隐藏"
+					prop="IsShow" v-if="aeForm.parent_id==0">
 					<el-switch v-model="aeForm.IsShow" inactive-color="#ededed"></el-switch>
-					<!-- <span>{{aeForm.IsShow?'开':'关'}}</span> -->
 				</el-form-item>
 				<el-form-item label="PPT转报告" prop="hasTel" v-if="aeForm.parent_id!=0">
 					<el-select v-model="aeForm.hasTel" placeholder="请选择" style="width:400px;">
@@ -186,16 +192,17 @@
 						<el-option label="有" :value="1"></el-option>
 					</el-select>
 				</el-form-item>
-				<el-form-item label="关联设置" prop="relate" v-if="!['晨报','周报'].includes(aeForm.classify_name)">
+				<el-form-item label="关联设置" 
+					prop="relate" v-if="!['晨报','周报'].includes(aeForm.classify_name)">
 					<el-select v-model="aeForm.relate" multiple placeholder="请选择" style="width:400px;">
 						<el-option label="报告电话会" :value="1"></el-option>
 						<el-option label="视频关联报告" :value="2"></el-option>
 					</el-select>
 				</el-form-item>
-				<!-- <el-form-item prop="abstract" label="分类简介" v-if="aeForm.parent_id!=0">
-					<el-input type="textarea" v-model="aeForm.abstract" placeholder="请输入" size="small" style="width:400px;"></el-input>
-				</el-form-item> -->
-				<el-form-item label="分享描述" v-if="aeForm.parent_id!=0">
+				</template>
+				<!-- 这里开始是二级目录选项 -->
+				<template v-if="permissionBtn.checkPermissionBtn(permissionBtn.classifyBtn.classifyList_cnClassify_childMenu)">
+					<el-form-item label="分享描述" v-if="aeForm.parent_id!=0">
 					<el-input type="textarea" autosize v-model="aeForm.descript" placeholder="请输入" size="small" style="width:400px;font-size:14px;"></el-input>
 				</el-form-item>
 				<el-form-item label="栏目作者" v-if="aeForm.parent_id!=0&&!parentIsList&&!parentIsVariety" prop="author">
@@ -252,13 +259,14 @@
 						<el-button slot="append" type="primary" size="mini" @click.native="clickinput(9)">选择图片</el-button>
 					</el-input>
 				</el-form-item>
-        <!-- 列表、品种的二级分类 展示分享链接配图 但是不是必填的 -->
-        <el-form-item label="分享链接配图" prop="YbShareBgImg_" v-if="aeForm.parent_id!=0&&(parentIsList||parentIsVariety)">
+				<!-- 列表、品种的二级分类 展示分享链接配图 但是不是必填的 -->
+				<el-form-item label="分享链接配图" prop="YbShareBgImg_" v-if="aeForm.parent_id!=0&&(parentIsList||parentIsVariety)">
 					<input type="file" size="small" name="file" @change="fileSelected(12)" id="file12" class="true-file" style="display:none;">
 					<el-input readonly type="text" v-model="aeForm.YbShareBgImg_" placeholder="上传分享链接配图" size="medium" style="width:400px;">
 						<el-button slot="append" type="primary" size="mini" @click.native="clickinput(12)">选择图片</el-button>
 					</el-input>
 				</el-form-item>
+				</template>
 			</el-form>
 			<div slot="footer" class="dialog-footer" style="text-align:right;">
 				<el-button type="primary" plain size="small" @click.native="aeDialog=false">取 消</el-button>
@@ -315,6 +323,13 @@ export default{
 			}
 			return arr
 		},
+        //通过计算属性判断是否展示
+        //当没有中文分类页面权限时,啥都不展示
+        isTableShow(){
+            return this.permissionBtn.checkPermissionBtn(
+                this.permissionBtn.classifyBtn.classifyList_cnClassify
+            )
+        },
 	},
 	data(){
 		return {
@@ -514,6 +529,7 @@ export default{
 		// 		this.getlist();
 		//     }
 		// }
+        this.setPermissRules()
 	},
 	methods:{
 		showInput(index){
@@ -871,7 +887,22 @@ export default{
       if(!parent) return
       YbShareBgImg = parent.YbShareBgImg||''
       return YbShareBgImg
-    }
+    },
+    //由于表单一些项可配置,表单验证规则也需要过滤掉不展示的项
+    setPermissRules(){
+            const {classifyBtn,checkPermissionBtn} = this.permissionBtn
+            const permissMap={
+                'YbFiccIcon':checkPermissionBtn(classifyBtn.classifyList_cnClassify_ficcIcon),
+                'YbRightBanner':checkPermissionBtn(classifyBtn.classifyList_cnClassify_reportImgs),
+                'YbShareBgImg':checkPermissionBtn(classifyBtn.classifyList_cnClassify_shareImgs),
+                'YbFiccPcIcon':checkPermissionBtn(classifyBtn.classifyList_cnClassify_pcBackColor)
+            }
+            for(let k in permissMap){
+                if(!permissMap[k]&&this.aerules[k]){
+                    delete this.aerules[k]
+                }
+            }
+        }
 	}
 }	
 </script>

+ 8 - 0
src/views/classify_manage/indexList.vue

@@ -22,6 +22,14 @@ export default {
         typeChange(e){
             this.type=e
         }
+    },
+    mounted(){
+        const {classifyBtn,enClassifyBtn,checkPermissionBtn} = this.permissionBtn
+        if(checkPermissionBtn(classifyBtn.classifyList_cnClassify)){
+            this.type = '1'
+        }else if(checkPermissionBtn(enClassifyBtn.classifyList_enClassify)){
+            this.type = '2'
+        }
     }
 }
 </script>

+ 3 - 2
src/views/dataEntry_manage/addChart.vue

@@ -452,10 +452,11 @@
 						>
 							<template slot-scope="scope">
 								<span @click="delTarget(scope.row)" class="deletesty">删除&nbsp;</span>
-								<span class="editsty" @click="copyCode(scope.row)">
+								<span v-permission="permissionBtn.chartLibPermission.chartLib_copyData"
+									class="editsty" @click="copyCode(scope.row)">
 									<i class="el-icon-document-copy" />&nbsp;复制数据</span
 								><br>
-								<span
+								<span v-permission="permissionBtn.chartLibPermission.chartLib_viewData"
 									class="editsty"
 									@click="viewTarget(scope.row)"
 								>查看数据</span>

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

@@ -30,9 +30,9 @@
             <i class="el-icon-tickets" style="color:#409EFF;font-size:18px" @click="isLookHistory=true;lookEdbId=select_target" v-if="select_target"/>
           </li>
           <li v-show="old_edb_info.id">
-            <label style="margin-right:5px;"> 查询结果:( </label>
+            <label style="margin-right:5px;"> 查询结果:</label>
             <span style="margin-right: 20px">指标ID:{{old_edb_info.id}}</span>
-            <span>指标名称:{{old_edb_info.name}})</span>
+            <span>指标名称:{{old_edb_info.name}}</span>
           </li>
         </ul>
         <div v-if="edb_id" style="margin-bottom:20px">

+ 20 - 14
src/views/dataEntry_manage/chartSetting.vue

@@ -22,8 +22,10 @@
       <div class="main-left left" id="left" v-show="!isSlideLeft">
         
         <div class="add-chart-cont">
-          <el-button @click="$router.push({path: '/addchart'})" type="primary">添加图表</el-button>
-          <change-lang :lang="currentLang" @changeLang="changeLanguage" style="margin-left: 10px;"/>
+          <el-button v-permission="permissionBtn.chartLibPermission.chartLib_add"
+            @click="$router.push({path: '/addchart'})" type="primary">添加图表</el-button>
+          <change-lang v-permission="permissionBtn.chartLibPermission.chartLib_switchEn"
+            :lang="currentLang" @changeLang="changeLanguage" style="margin-left: 10px;"/>
 
         </div>
         
@@ -480,6 +482,7 @@
                 <ul class="right-actions">
                     <li>操作</li>
                     <li
+                      v-permission="permissionBtn.chartLibPermission.chartLib_share"
                       class="span-item shareLink"
                       @click="copyChartConfirm('url')"
                       :data-clipboard-text="linkUrl"
@@ -488,6 +491,7 @@
                       <i class="el-icon-share"/>&nbsp;分享
                     </li>
                     <li
+                      v-permission="permissionBtn.chartLibPermission.chartLib_addMy"
                       class="span-item"
                       @click="addMychartHandle(chartInfo)"
                     >
@@ -497,24 +501,25 @@
                         style="width: 13px; height: 12px; vertical-align: middle"
                       />加入我的图库
                     </li>
-                    <li class="span-item" @click="refreshHandle">
+                    <li v-permission="permissionBtn.chartLibPermission.chartLib_refresh"
+                        class="span-item" @click="refreshHandle">
                       <span><i class="el-icon-refresh" style="margin-left:0"/>&nbsp;刷新 </span>
                     </li>
-                    <li
+                    <li v-permission="permissionBtn.chartLibPermission.chartLib_save"
                       class="span-item"
                     >
                       <span @click="saveChartHandle('')">
                         <i class="el-icon-collection" />&nbsp;保存
                       </span>
                     </li>
-                    <li
+                    <li v-permission="permissionBtn.chartLibPermission.chartLib_otherSave"
                       class="span-item"
                     >
                       <span @click="saveChartOtherHandle">
                         <i class="el-icon-document-add" />&nbsp;另存为
                       </span>
                     </li>
-                    <li
+                    <li v-permission="permissionBtn.chartLibPermission.chartLib_edit"
                       class="span-item"
                       v-if="chartInfo.IsEdit"
                       @click="editChartHandle"
@@ -525,27 +530,27 @@
                         style="width: 13px; height: 12px;"
                       />&nbsp;编辑
                     </li>
-                    <li
+                    <li v-permission="permissionBtn.chartLibPermission.chartLib_copyOffice"
                       class="span-item copy"
                       @click="copyChartConfirm('office')"
                       v-if="!chartInfo.Disabled"
                     >
                       <i class="el-icon-document-copy" />&nbsp;复制至office
                     </li>
-                    <li
+                    <li v-permission="permissionBtn.chartLibPermission.chartLib_copyWechat"
                       class="span-item copy"
                       @click="copyChartConfirm('微信')"
                       v-if="!chartInfo.Disabled"
                     >
                       <img style="width: 13px; height: 12px;vertical-align: middle" src="~@/assets/img/chart_m/WeChat.jpg" />&nbsp;复制至微信
                     </li>
-                    <li
+                    <li v-permission="permissionBtn.chartLibPermission.chartLib_enNameSetting"
                       class="span-item copy"
                       @click="openEnNameDia"
                     >
                       <img style="width: 16px;vertical-align: middle" :src="$icons.to_en" />&nbsp;设置英文名称
                     </li>
-                    <li
+                    <li v-permission="permissionBtn.chartLibPermission.chartLib_del"
                       class="span-item"
                       style="color: #ff4040"
                       @click="delChartHandle"
@@ -590,10 +595,11 @@
                 width="110"
               >
                 <template slot-scope="scope">
-                  <span class="editsty" @click="copyCode(scope.row)">
+                  <span v-permission="permissionBtn.chartLibPermission.chartLib_copyData"
+                    class="editsty" @click="copyCode(scope.row)">
                     <i class="el-icon-document-copy" />&nbsp;复制数据</span
                   >
-                  <span
+                  <span v-permission="permissionBtn.chartLibPermission.chartLib_viewData"
                     class="editsty"
                     @click="viewTarget(scope.row)"
                   >查看数据</span>
@@ -632,7 +638,7 @@
                 />
                 <div class="item-bottom">
                   <span>创建时间: {{ chart.CreateTime.slice(0,10) }}</span>
-                  <span
+                  <span v-permission="permissionBtn.chartLibPermission.chartLib_addMy"
                     class="join_txt"
                     @click="addMychartHandle(chart)"
                   >
@@ -939,7 +945,7 @@ export default {
     },
     /* 分享地址 */
     linkUrl() {
-      const LINK_CHART_URL = process.env.CHART_LINK;
+      const LINK_CHART_URL = this.$setting.dynamicOutLinks.ChartViewUrl+'/chartshow';
       return `${LINK_CHART_URL}?code=${this.chartInfo.UniqueCode}&fromType=share&lang=${this.currentLang}`
     }
   },

+ 1 - 0
src/views/dataEntry_manage/coal/index.vue

@@ -4,6 +4,7 @@
       <div class="left-top">
         <!-- <el-button type="primary" plain size="medium" @click="exportClick" :loading="btnload">导出Excel</el-button> -->
         <el-button
+          v-permission="permissionBtn.dataSourcePermission.zgmtData_export"
           style="width: 100%"
           type="primary"
           plain

+ 15 - 0
src/views/dataEntry_manage/codecount/index.vue

@@ -404,10 +404,25 @@ export default {
 			if(!this.search_have_more) return;
 			this.searchApi(this.current_search,++this.search_page);
 		},
+		getTargetSource(){
+			this.allFromArr = []
+			dataBaseInterface.getDataSource().then(res=>{
+				if(res.Ret!==200) return
+				if(res.Data){
+					this.allFromArr = res.Data.map(i=>{
+						return {
+							name:i.SourceName,
+							key:i.EdbSourceId
+						}
+					})
+				}
+			})
+		}
 	},
 	mounted() {
 		this.getEdbInfo();
 		this.getMenu();
+		this.getTargetSource()
 	},
 }
 </script>

+ 1 - 1
src/views/dataEntry_manage/components/addTarget.vue

@@ -88,7 +88,7 @@
 							<!-- <span class="require_tag">*</span> -->
 							<el-input v-model="formData.targetName"  placeholder="请输入指标名称" style="width: 321px;"></el-input>
 						</el-form-item>
-						<el-form-item label="更新提醒" prop="up_week">
+						<el-form-item label="更新提醒" prop="up_week" v-permission="permissionBtn.dataSourcePermission.manualData_add_updateRemind">
 							<el-select v-model="formData.up_week" placeholder="请选择更新周" style="width:145px" v-if="formData.frequency === '周度'">
 								<el-option label="周一" value="周一"></el-option>
 								<el-option label="周二" value="周二"></el-option>

+ 29 - 29
src/views/dataEntry_manage/components/chart.vue

@@ -54,21 +54,21 @@ export default {
 	methods: {
 
 		init() {
-			if(this.options.isRelevanceChart){//相关性图表设置x轴在y轴0刻度
-				this.$nextTick(()=>{
-					// let h = $('.highcharts-yaxis .highcharts-axis-line')[0].getBoundingClientRect().height;
-					// console.log(h)
-					// this.options.xAxis.offset=-h/2;
-					const h=$(`#container${this.index}`)[0].style.height
-					if(h=='500px'){
-						this.options.xAxis.offset=-200.5
-					}else if(h=='440px'){
-						this.options.xAxis.offset=-170.5
-					}else if(h=='350px'){
-						this.options.xAxis.offset=-125.5
-					}
-				})
-			}
+			// if(this.options.isRelevanceChart){//相关性图表设置x轴在y轴0刻度
+			// 	this.$nextTick(()=>{
+			// 		// let h = $('.highcharts-yaxis .highcharts-axis-line')[0].getBoundingClientRect().height;
+			// 		// console.log(h)
+			// 		// this.options.xAxis.offset=-h/2;
+			// 		const h=$(`#container${this.index}`)[0].style.height
+			// 		if(h=='500px'){
+			// 			this.options.xAxis.offset=-200.5
+			// 		}else if(h=='440px'){
+			// 			this.options.xAxis.offset=-170.5
+			// 		}else if(h=='350px'){
+			// 			this.options.xAxis.offset=-125.5
+			// 		}
+			// 	})
+			// }
 
 			const options = {...defaultOpts,...this.options}
 			let thatThis = this
@@ -127,20 +127,20 @@ export default {
 			}else {
 				$(`#container${this.index}`)[0].style.height = this.height || '440px';
 			}
-			if(this.options.isRelevanceChart){//相关性图表设置x轴在y轴0刻度
-				this.$nextTick(()=>{
-					const h=$(`#container${this.index}`)[0].style.height
-					if(h=='500px'){
-						this.options.xAxis.offset=-200.5
-					}else if(h=='440px'){
-						this.options.xAxis.offset=-170.5
-					}else if(h=='350px'){
-						this.options.xAxis.offset=-125.5
-					}
-					// let h = $('.highcharts-yaxis .highcharts-axis-line')[0].getBoundingClientRect().height;
-					// this.options.xAxis.offset=-h/2;
-				})
-			}
+			// if(this.options.isRelevanceChart){//相关性图表设置x轴在y轴0刻度
+			// 	this.$nextTick(()=>{
+			// 		const h=$(`#container${this.index}`)[0].style.height
+			// 		if(h=='500px'){
+			// 			this.options.xAxis.offset=-200.5
+			// 		}else if(h=='440px'){
+			// 			this.options.xAxis.offset=-170.5
+			// 		}else if(h=='350px'){
+			// 			this.options.xAxis.offset=-125.5
+			// 		}
+			// 		// let h = $('.highcharts-yaxis .highcharts-axis-line')[0].getBoundingClientRect().height;
+			// 		// this.options.xAxis.offset=-h/2;
+			// 	})
+			// }
 
 		}
 	},

+ 1 - 1
src/views/dataEntry_manage/components/editTarget.vue

@@ -86,7 +86,7 @@
 							<!-- <span class="require_tag">*</span> -->
 							<el-input v-model="formData.targetName"  placeholder="请输入指标名称" style="width: 321px"></el-input>
 						</el-form-item>
-						<el-form-item label="更新提醒" prop="up_week">
+						<el-form-item label="更新提醒" prop="up_week" v-permission="permissionBtn.dataSourcePermission.manualData_add_updateRemind">
 							<el-select v-model="formData.up_week" placeholder="请选择更新周" style="width:145px" v-if="formData.frequency === '周度'">
 								<el-option label="周一" value="周一"></el-option>
 								<el-option label="周二" value="周二"></el-option>

+ 5 - 1
src/views/dataEntry_manage/dataEntry.vue

@@ -7,16 +7,19 @@
           v-if="role != 'special_researcher'"
         >
           <el-button
+            v-permission="permissionBtn.dataSourcePermission.manualDataWrite_import"
             type="primary"
             style="width: 47%"
             @click="isShowinsert = true"
             >导入excel数据</el-button
           >
-          <el-button type="primary" style="width: 47%" @click="copyExcelNew"
+          <el-button v-permission="permissionBtn.dataSourcePermission.manualDataWrite_copy"
+          type="primary" style="width: 47%" @click="copyExcelNew"
             >复制excel数据</el-button
           >
           <a style="width: 100%" :href="exportUrl" download>
             <el-button
+              v-permission="permissionBtn.dataSourcePermission.manualDataWrite_export"
               type="primary"
               style="width: 100%; margin-top: 14px"
               plain
@@ -68,6 +71,7 @@
         element-loading-spinner="el-icon-loading"
       >
         <el-button
+          v-permission="permissionBtn.dataSourcePermission.manualDataWrite_edit"
           type="primary"
           style="
             font-size: 16px;

+ 12 - 0
src/views/dataEntry_manage/databaseComponents/addTargetDiaBase.vue

@@ -220,10 +220,22 @@ export default {
 			this.search_txt = '';
 			this.search_company_txt = '';
 			this.loading && this.loading.close();
+		},
+		getTargetSource(){
+			this.fromArr = []
+			dataBaseInterface.getDataSource({IsBase:1}).then(res=>{
+				if(res.Ret!==200) return
+				if(res.Data){
+					this.fromArr = res.Data.map(i=>{
+						return i.SourceName
+					})
+				}
+			})
 		}
 	},
 	created() { },
 	mounted() {
+		this.getTargetSource()
 	},
 }
 </script>

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

@@ -48,7 +48,8 @@
             </el-table-column>
             <el-table-column label="操作" key="Copy" align="center" width="110">
                 <template slot-scope="scope">
-                <span class="editsty" @click="copyCode(scope.row)">
+                <span v-permission="permissionBtn.edbDataPermission.edbData_copyData"
+                class="editsty" @click="copyCode(scope.row)">
                     <i class="el-icon-document-copy" />&nbsp;复制数据</span
                 >
                 <span class="editsty" @click="viewTarget(scope.row)">查看数据</span>

+ 15 - 0
src/views/dataEntry_manage/databaseComponents/updateDialog.vue

@@ -388,9 +388,24 @@ export default {
       this.init();
       this.$emit('cancel');
     },
+    getTargetSource(){
+        this.sourceArr = []
+        dataBaseInterface.getDataSource({IsBase:1}).then(res=>{
+            if(res.Ret!==200) return
+            if(res.Data){
+                this.sourceArr = res.Data.map(i=>{
+                    return {
+                        label:i.SourceName,
+                        value:i.EdbSourceId
+                    }
+                })
+            }
+        })
+    }
   },
   created() { },
   mounted() {
+      this.getTargetSource()
   },
 };
 </script>

+ 2 - 2
src/views/dataEntry_manage/databaseComponents/util.js

@@ -30,7 +30,7 @@ export const computedTypes = [
 		type:4
 	},
 	{
-		name:'累计值转月/季值',
+		name:'累计值转月/季值',
 		type:'toMonthSeason'
 	},
 	{
@@ -118,7 +118,7 @@ export const computedBatchTypes = [
 		type:14
 	},
 	{
-		name:'累计值转月/季值',
+		name:'累计值转月/季值',
 		type:'toMonthSeason'
 	},
 	{

+ 44 - 27
src/views/dataEntry_manage/databaseList.vue

@@ -2,16 +2,23 @@
 	<div class="database_container">
 		<div class="database_top">
 			<div>
-				<el-button type="primary" @click="addHandler">添加指标</el-button>
-				<el-button type="primary" @click="addComputedHandler">计算指标</el-button>
-				<el-button type="primary" @click="replaceEdbHandler">替换指标</el-button>
-				<el-button type="primary" @click="$router.push({path: '/codecount'})">代码运算</el-button>
-				<el-button type="primary" @click="$router.push({path: '/adjustdata'})">数据调整</el-button>
-				<el-button type="primary" plain @click="updateHandler">一键更新</el-button>
+				<el-button v-permission="permissionBtn.edbDataPermission.edbData_addEdb"
+					type="primary" @click="addHandler">添加指标</el-button>
+				<el-button v-permission="permissionBtn.edbDataPermission.edbData_calcuEdb"
+					type="primary" @click="addComputedHandler">计算指标</el-button>
+				<el-button v-permission="permissionBtn.edbDataPermission.edbData_replaceEdb"
+					type="primary" @click="replaceEdbHandler">替换指标</el-button>
+				<el-button v-permission="permissionBtn.edbDataPermission.edbData_codeRun"
+					type="primary" @click="$router.push({path: '/codecount'})">代码运算</el-button>
+				<el-button v-permission="permissionBtn.edbDataPermission.edbData_dataAdjust"
+					type="primary" @click="$router.push({path: '/adjustdata'})">数据调整</el-button>
+				<el-button v-permission="permissionBtn.edbDataPermission.edbData_batchUpdate"
+					type="primary" plain @click="updateHandler">一键更新</el-button>
 			</div>
 			<div class="top-right">
 
-				<change-lang :lang="currentLang" style="height: 32px;" @changeLang="changeLanguage"/>
+				<change-lang v-permission="permissionBtn.edbDataPermission.edbData_switchEn"
+					:lang="currentLang" style="height: 32px;" @changeLang="changeLanguage"/>
 
 				<el-select
 					v-model="search_txt"
@@ -112,12 +119,15 @@
 									@click.stop="addNode(node,data)"
 									v-if="data.Button.AddButton"
 								/>
+								<!--如果是分类,判断data.Button.OpButton不变;如果是指标,再加上checkPermissionBtn判断-->
 								<img
 									src="~@/assets/img/set_m/edit.png"
 									alt=""
 									style="width: 15px; height: 14px; margin-right: 8px"
 									@click.stop="editNode(node,data)"
-									v-if="data.Button.OpButton"
+									v-if="data.EdbCode
+										?(data.Button.OpButton&&permissionBtn.checkPermissionBtn(permissionBtn.edbDataPermission.edbData_edit))
+										:(data.Button.OpButton)"
 								/>
 								<img
 									slot="reference"
@@ -213,8 +223,10 @@
 						label="操作"
 					>
 						<template slot-scope="scope">
-							<el-button size="mini" type="text" @click="refreshTargetHandle" >更新</el-button>
+							<el-button v-permission="permissionBtn.edbDataPermission.edbData_update"
+								size="mini" type="text" @click="refreshTargetHandle" >更新</el-button>
 							<el-button 
+								v-permission="permissionBtn.edbDataPermission.edbData_edit"
 								size="mini" 
 								type="text" 
 								:disabled="!scope.row.Button.OpButton"
@@ -232,16 +244,20 @@
 								},scope.row)"
 								>编辑</el-button>
 							<el-button size="mini" type="text" @click.stop="reCalculateHandler" v-if="scope.row.EdbType===2" :loading="calculateLoading">重新计算</el-button>
-							<el-button size="mini" type="text" @click.stop="createChartHandle(scope.row.EdbInfoId)">一键成图</el-button>
-							<el-button size="mini" type="text" @click="copyCode">复制数据</el-button>
-
+							<el-button v-if="permissionBtn.checkPermissionBtn(permissionBtn.edbDataPermission.edbData_toImgs)"
+								size="mini" type="text" @click.stop="createChartHandle(scope.row.EdbInfoId)">一键成图</el-button>
+							<el-button v-if="permissionBtn.checkPermissionBtn(permissionBtn.edbDataPermission.edbData_copyData)"
+								size="mini" type="text" @click="copyCode">复制数据</el-button>
 							<!-- <lookEdbHistory :showType="2" :edbId="selected_edbid" v-if="scope.row.EdbType===2"/> -->
 							<el-button size="mini" type="text"
-							v-if="scope.row.EdbType===2" @click="isLookHistory=true;lookEdbId=selected_edbid">指标溯源</el-button>
+							v-if="scope.row.EdbType===2&&permissionBtn.checkPermissionBtn(permissionBtn.edbDataPermission.edbData_edbSource)" @click="isLookHistory=true;lookEdbId=selected_edbid">指标溯源</el-button>
 							
-							<el-button size="mini" type="text" @click="openEnNameDia">设置英文名称</el-button>
-							<el-button size="mini" type="text" @click.stop="updateNewestDataHandle" v-if="scope.row.Button.InsertNewDataButton" >{{scope.row.DataInsertConfig.Date?'编辑最新值':'添加最新值'}}</el-button>
-							<el-button size="mini" type="text" @click.stop="refreshBaseHandler" v-if="scope.row.EdbType===1" :loading="refreshLoading">全部刷新</el-button>
+							<el-button v-if="permissionBtn.checkPermissionBtn(permissionBtn.edbDataPermission.edbData_enNameSetting)"
+								size="mini" type="text" @click="openEnNameDia">设置英文名称</el-button>
+							<el-button size="mini" type="text" @click.stop="updateNewestDataHandle" 
+							v-if="scope.row.Button.InsertNewDataButton&&permissionBtn.checkPermissionBtn(permissionBtn.edbDataPermission.edbData_newestValue)" >{{scope.row.DataInsertConfig.Date?'编辑最新值':'添加最新值'}}</el-button>
+							<el-button size="mini" type="text" @click.stop="refreshBaseHandler" 
+								v-if="scope.row.EdbType===1&&permissionBtn.checkPermissionBtn(permissionBtn.edbDataPermission.edbData_refreshAll)" :loading="refreshLoading">全部刷新</el-button>
 						</template>
 					</el-table-column>
 					<div slot="empty" style="padding: 50px 0 320px;">
@@ -1829,6 +1845,7 @@ export default {
 };
 </script>
 <style lang="scss">
+@import "~@/styles/theme-vars.scss";
 .database_container {
 	$mini_font: 12px;
 	$normal_font: 14px;
@@ -1843,12 +1860,12 @@ export default {
 	}
 
 	.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
-		background-color: #409eff !important;
-		border-color: #409eff;
+		background-color: $theme-color !important;
+		border-color: $theme-color;
 	}
 	.el-checkbox__input.is-disabled.is-indeterminate .el-checkbox__inner {
-		background-color: #409eff !important;
-		border-color: #409eff;
+		background-color: $theme-color !important;
+		border-color: $theme-color;
 	}
 	.el-icon-refresh {
 		font-size: 17px;
@@ -1920,7 +1937,7 @@ export default {
 						margin-right: 2px;
 					}
 					.el-icon-view {
-						color: #409EFF;
+						color: #409eff;
 						font-size: 18px;
 						margin-left: 5px;
 					}
@@ -1931,7 +1948,7 @@ export default {
 					right:0; */
 					height:3px;
 					// margin-top: 8px;
-					background-color:#409EFF;
+					background-color:$theme-color;
 				}
 				.el-tree-node__content {
 					margin-bottom: 14px !important;
@@ -1972,7 +1989,7 @@ export default {
 				display: flex;
 				align-items: center;
 				justify-content: center;
-				color: #409eff;
+				color: $theme-color;
 				font-size: 16px;
 				cursor: pointer;
 			}
@@ -2054,11 +2071,11 @@ export default {
 			.cpmputed-li {
 				width: 180px;
 				padding: 19px 0;
-				color: #409EFF;
+				color: $theme-color;
 				font-size: 16px;
 				background:#ECF5FF;
 				border-radius: 8px;
-				border: 1px solid #B3D8FF;
+				border: 1px solid #99baf0;
 				text-align: center;
 				cursor: pointer;
 				margin-right: 65px;
@@ -2067,11 +2084,11 @@ export default {
 					margin-right:0;
 				}
 				&:hover {
-					background: #409EFF;
+					background: $theme-color;
 					color: #fff;
 				}
 				&.act {
-					background: #409EFF;
+					background: $theme-color;
 					color: #fff;
 				}
 			}

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

@@ -14,7 +14,8 @@
 					@click="saveHandle"
 					:disabled="chartInfo.ChartType === 5 && tableData.length !== 2"
 					>保存</el-button>
-				<el-button type="primary" @click="saveChartOtherHandle">另存为</el-button>
+				<el-button v-permission="permissionBtn.chartLibPermission.chartLib_otherSave"
+					type="primary" @click="saveChartOtherHandle">另存为</el-button>
         <el-button type="primary" plain @click="$router.replace({
 					path: '/chartsetting',
 					query: {
@@ -453,10 +454,11 @@
 						>
 							<template slot-scope="scope">
 								<span @click="delTarget(scope.row)" class="deletesty">删除&nbsp;</span>
-								<span class="editsty" @click="copyCode(scope.row)">
+								<span v-permission="permissionBtn.chartLibPermission.chartLib_copyData"
+									class="editsty" @click="copyCode(scope.row)">
 									<i class="el-icon-document-copy" />&nbsp;复制数据</span
 								><br>
-								<span
+								<span v-permission="permissionBtn.chartLibPermission.chartLib_viewData"
 									class="editsty"
 									@click="viewTarget(scope.row)"
 								>查看数据</span>

+ 27 - 4
src/views/dataEntry_manage/mixins/chartPublic.js

@@ -468,7 +468,7 @@ export const chartSetMixin = {
     /* 曲线图设置 */
     setDefaultChart(newval) {
       /* 上下限显示和值的设置 */
-      if([6,7,8].includes(this.chartInfo.Source)) {
+      if([4,6,7,8].includes(this.chartInfo.Source)) {
         this.leftIndex = -1;
         this.rightIndex = -1;
         this.rightTwoIndex = -1;
@@ -566,10 +566,33 @@ export const chartSetMixin = {
       });
 
       this.xLabelDealHandle();
+
       this.options = {
         series: data,
         yAxis: ydata,
       };
+
+      //滚动相关性独立tooltip
+      if(this.chartInfo.Source === 4) {
+        const { LeadValue,LeadUnit } = this.relevanceChartData.CorrelationChartInfo;
+        let relevanceUnitEnMap = this.relevanceUnitEnMap;
+        this.options.tooltip = {
+          formatter: function() {
+            let str = `${Highcharts.dateFormat('%Y/%m/%d',this.x)}<br><p>相关性系数:${this.y.toFixed(4)}</p><br><p>领先${LeadValue+LeadUnit}</p>`
+            return str
+          },
+          formatterCh: function() {
+            let str = `${Highcharts.dateFormat('%Y/%m/%d',this.x)}<br><p>相关性系数:${this.y.toFixed(4)}</p><br><p>领先${LeadValue+LeadUnit}</p>`
+            return str
+          },
+          formatterEn: function() {
+            let str = `${Highcharts.dateFormat('%Y/%m/%d',this.x)}<br><p>Correlation coefficient:${this.y.toFixed(4)}</p><br><p>lead${LeadValue+relevanceUnitEnMap[LeadUnit]}</p>`
+            return str
+          }
+        }
+      }
+
+
       if(this.currentLang=='en') this.changeOptions()
     },
 
@@ -1382,11 +1405,11 @@ export const chartSetMixin = {
           },
           align: 'center',
         },
-        min: -1,
-        max: 1,
+        // min: -1,
+        // max: 1,
         opposite: false,
         tickWidth: 1,
-        tickInterval:0.2,
+        // tickInterval:0.2,
       }
 
       //处理series

+ 6 - 3
src/views/dataEntry_manage/targetList.vue

@@ -5,7 +5,8 @@
 			<el-button type="primary" size="medium" style="marginRight:20px;" @click="insertData(2)">新增指标</el-button>
 			<el-button type="primary" size="medium" style="marginRight:20px;" @click="handleImport">导入数据</el-button>
 			<el-button size="medium" @click="handleExport">导出数据</el-button> -->
-			<el-button type="primary" size="medium" @click="insertData(2)">新增指标</el-button>
+			<el-button v-permission="permissionBtn.dataSourcePermission.manualData_add"
+                type="primary" size="medium" @click="insertData(2)">新增指标</el-button>
 			<!-- <el-button type="primary" size="medium" @click="handleImport">导入新指标</el-button> -->
 			<el-input
 				placeholder="关键字搜索"
@@ -98,8 +99,10 @@
 				<el-table-column label="操作" align="center">
 					<template slot-scope="scope">
 						<div style="color:#4099ef; font-size:24px;">
-							<span class="editsty" @click="editHandle(scope.row)" style="marginRight:20px;">编辑</span>
-							<span class="deletesty" @click="delHandle(scope.row)">删除</span>
+							<span v-permission="permissionBtn.dataSourcePermission.manualData_add"
+                                class="editsty" @click="editHandle(scope.row)" style="marginRight:20px;">编辑</span>
+							<span v-permission="permissionBtn.dataSourcePermission.manualData_del"
+                                class="deletesty" @click="delHandle(scope.row)">删除</span>
 						</div>
 					</template>
 				</el-table-column>

+ 2 - 0
src/views/dataEntry_manage/thirdBase/BAIINFOTargetbase.vue

@@ -3,6 +3,7 @@
     <div class="left-cont minHeight" id="left">
       <div class="left-top">
         <el-button
+          v-permission="permissionBtn.dataSourcePermission.bcyfData_export"
           style="width: 100%"
           type="primary"
           plain
@@ -80,6 +81,7 @@
                 v-if="data.Button.AddButton"
               />
               <img
+                v-permission="permissionBtn.dataSourcePermission.bcyfData_edit"
                 src="~@/assets/img/set_m/edit.png"
                 v-if="data.Button.OpButton"
                 alt=""

+ 2 - 1
src/views/dataEntry_manage/thirdBase/NationalDataBase.vue

@@ -32,7 +32,8 @@
           </template>
         </el-menu>
       </div>
-      <el-button type="primary" :disabled="isDisabled" @click="handleExport"
+      <el-button v-permission="permissionBtn.dataSourcePermission.gjtjjData_export"
+        type="primary" :disabled="isDisabled" @click="handleExport"
         >导出</el-button
       >
     </div>

+ 1 - 0
src/views/dataEntry_manage/thirdBase/SCITargetbase.vue

@@ -3,6 +3,7 @@
     <div class="left-cont minHeight" id="left">
       <div class="left-top">
         <el-button
+          v-permission="permissionBtn.dataSourcePermission.hongtao3Data_export"
           style="width: 100%"
           type="primary"
           plain

+ 1 - 0
src/views/dataEntry_manage/thirdBase/elaSteoBase.vue

@@ -3,6 +3,7 @@
     <div class="left-cont minHeight">
       <div class="left-top">
         <el-button
+          v-permission="permissionBtn.dataSourcePermission.eiaData_export"
           style="width: 100%"
           type="primary"
           plain

+ 1 - 0
src/views/dataEntry_manage/thirdBase/glTargetbase.vue

@@ -4,6 +4,7 @@
       <div class="left-top">
         <!-- <el-button type="primary" plain size="medium" @click="exportClick" :loading="btnload">导出Excel</el-button> -->
         <el-button
+          v-permission="permissionBtn.dataSourcePermission.glData_export"
           style="width: 100%"
           type="primary"
           plain

+ 1 - 0
src/views/dataEntry_manage/thirdBase/lzTargetbase.vue

@@ -3,6 +3,7 @@
     <div class="left-cont minHeight">
       <div class="left-top">
         <el-button
+          v-permission="permissionBtn.dataSourcePermission.longzhongData_export"
           style="width: 100%;margin-bottom: 10px;"
           type="primary"
           plain

+ 1 - 0
src/views/dataEntry_manage/thirdBase/smmTargetbase.vue

@@ -3,6 +3,7 @@
     <div class="left-cont minHeight" id="left">
       <div class="left-top">
         <el-button
+          v-permission="permissionBtn.dataSourcePermission.smmData_export"
           style="width: 100%"
           type="primary"
           plain

+ 4 - 1
src/views/dataEntry_manage/thirdBase/steelChemicalbase.vue

@@ -3,10 +3,12 @@
     <div class="left-cont minHeight" id="left">
       <div class="left-top">
         <div>
-          <el-button type="primary" size="medium" @click="addTargetHandle"
+          <el-button v-permission="permissionBtn.dataSourcePermission.mysteelData_add"
+          type="primary" size="medium" @click="addTargetHandle"
             >新增指标</el-button
           >
           <el-button
+          v-permission="permissionBtn.dataSourcePermission.mysteelData_export"
             type="primary"
             plain
             size="medium"
@@ -129,6 +131,7 @@
     >
       <template v-if="rightShow">
         <el-button
+        v-permission="permissionBtn.dataSourcePermission.mysteelData_refresh"
           type="primary"
           size="medium"
           @click="edbRefreshHandle"

+ 27 - 4
src/views/datasheet_manage/common/customTable.js

@@ -149,7 +149,9 @@ export function getRightClickMenu(pos) {
       { label: "删除", key: "del" },
     ],
     'cell': [
+      { label: "选择指标", key: "choose-target" },
       { label: "插入指标值", key: "insert-value" },
+      { label: "清空", key: "reset" },
     ]
   }
 
@@ -159,6 +161,9 @@ export function getRightClickMenu(pos) {
 //日期格式识别转换
 export function checkDateFormat(str) {
   const dateRegex = /^(?:(?:19|20)\d\d)([-/.])(0?[1-9]|1[0-2])\1(0?[1-9]|[12][0-9]|3[01])$/;
+
+  //也支持年-月
+  const dateMonthRegex = /^(?:(?:19|20)\d\d)([-])(0[1-9]|1[0-2])$/;
   
   if(dateRegex.test(str)) {
     const date = new Date(str);
@@ -171,19 +176,21 @@ export function checkDateFormat(str) {
     } else {
       return false;
     }
-  }else {
+  } else if(dateMonthRegex.test(str)){
+    return str
+  } else {
     return false
   }
 }
 
-/* 根据key找到关联格子 设置关联格子样式 */
-export function setRelationStyle(query) {
+/* 根据key找到格子 设置格子样式 */
+export function setRelationStyle(query,classname="td-relation") {
   const { key } = query;
 
   let table = document.querySelector('.table');
   let el = table.querySelector("td[data-key='" + key + "']");
   
-  el.nodeName==='TD' && $(el).addClass("td-relation")
+  el.nodeName==='TD' && $(el).addClass(classname)
 }
 
 //根据cell key找到cell数据
@@ -203,3 +210,19 @@ export function findCellByKey(arr,key) {
   return cell
 }
 
+/* 清空插入单元格重置关联样式 */
+export function resetRelationStyle() {
+  let table = document.querySelector('.table');
+  table.querySelectorAll(".td-relation").forEach(el => {
+    el.classList.remove('td-relation')
+  })
+}
+
+/* 重置右键选择指标时的单元格标识样式 弹窗消失样式就消失 */
+export function resetDialogCellStyle() {
+  let table = document.querySelector('.table');
+  table.querySelectorAll(".td-choose-insert-target").forEach(el => {
+    el.classList.remove('td-choose-insert-target')
+  })
+}
+

+ 49 - 12
src/views/datasheet_manage/components/CustomTable.vue

@@ -48,7 +48,9 @@
                 :data-cindex="columnHeader[sub_index]"
                 @click="() => { !disabled && item==='EdbName' && clickEdbName(edb)}"
               >
-                <template v-if="item === 'EdbName'">{{ edb.EdbAliasName||edb[item] }}</template>
+                <template v-if="item === 'EdbName'">
+                  <span :class="{'edbname-td':disabled}" @click="edbJumpToBase(edb)">{{ edb.EdbAliasName||edb[item] }}</span>
+                </template>
                 <template v-else>{{ edb[item] }}/{{ edb.Frequency }}</template>
               </td>
             </tr>
@@ -72,7 +74,7 @@
                 :key="edb_index"
                 :data-rindex="rowHeader[dateIndex]"
                 :data-cindex="columnHeader[edb_index]"
-                :class="([2,3].includes(edb.Data.find(_ =>_.DataTime === date).DataType)&&edb.Data.find(_ =>_.DataTime === date).ShowValue)?'insert': ''"
+                :class="([2,3,5].includes(edb.Data.find(_ =>_.DataTime === date).DataType)&&edb.Data.find(_ =>_.DataTime === date).ShowValue)?'insert': ''"
                 @click="clickCell($event,edb.Data.find(_ =>_.DataTime === date))"
                 @dblclick="dblClickCell($event,edb.Data.find(_ =>_.DataTime === date))"
               >
@@ -113,7 +115,7 @@
                 :key="`${index}_${cell_index}`"
                 :data-rindex="rowHeader[index+dateArr.length]"
                 :data-cindex="cell_index===0?-1:columnHeader[cell_index-1]"
-                :class="([2,3].includes(cell.DataType)&&cell.ShowValue)?'insert': ''"
+                :class="([2,3,5].includes(cell.DataType)&&cell.ShowValue)?'insert': ''"
                 @click="clickCell($event,cell)"
                 @dblclick="dblClickCell($event,cell)"
               >
@@ -189,7 +191,7 @@
                 :key="index"
                 :data-cindex="-1"
                 :data-rindex="rowHeader[index+dateArr.length]"
-                :class="([2,3].includes(column[0].DataType)&&column[0].ShowValue)?'insert': ''"
+                :class="([2,3,5].includes(column[0].DataType)&&column[0].ShowValue)?'insert': ''"
                 @click="clickCell($event,column[0])"
                  @dblclick="dblClickCell($event,column[0])"
               >
@@ -233,7 +235,9 @@
                 :data-cindex="columnHeader[edb_index]"
                 @click="() => { !disabled && item==='EdbName' && clickEdbName(edb)}"
               >
-                <template v-if="item === 'EdbName'">{{ edb[item] }}</template>
+                <template v-if="item === 'EdbName'">
+                  <span :class="{'edbname-td':disabled}" @click="edbJumpToBase(edb)">{{ edb.EdbAliasName||edb[item] }}</span>
+                </template>
                 <template v-else>{{ edb[item] }}/{{ edb.Frequency }}</template>
               </td>
 
@@ -243,7 +247,7 @@
                 :key="`${edb.EdbInfoId}_${rowHeader[data_index]}_${columnHeader[edb_index]}`"
                 :data-rindex="rowHeader[data_index]"
                 :data-cindex="columnHeader[edb_index]"
-                :class="([2,3].includes(data.DataType)&&data.ShowValue)?'insert': ''"
+                :class="([2,3,5].includes(data.DataType)&&data.ShowValue)?'insert': ''"
                 @click="clickCell($event,data)"
                 @dblclick="dblClickCell($event,data)"
               >
@@ -274,7 +278,7 @@
                 :key="`${rowHeader[column_index+dateArr.length]}_${columnHeader[edb_index]}`"
                 :data-rindex="rowHeader[column_index+dateArr.length]"
                 :data-cindex="columnHeader[edb_index]"
-                :class="([2,3].includes(column[edb_index+1].DataType)&&column[edb_index+1].ShowValue)?'insert': ''"
+                :class="([2,3,5].includes(column[edb_index+1].DataType)&&column[edb_index+1].ShowValue)?'insert': ''"
                 @click="clickCell($event,column[edb_index+1])"
                 @dblclick="dblClickCell($event,column[edb_index+1])"
               >
@@ -303,7 +307,7 @@
 
 
       <!-- 添加 -->
-      <div class="add-fixed" v-if="!disabled">
+      <div class="add-fixed" v-if="!disabled" draggable @dragend="dragEnd" :style="isCollapse?'left:70px;':'left:200px;'">
         <div class="add-wrapper" v-show="!isSlideLeft">
           <div @click="addDateRow"> <i class="el-icon-circle-plus-outline"></i> 添加日期</div>
           <div @click="addTextRow"> <i class="el-icon-circle-plus-outline"></i> 添加文本</div>
@@ -396,6 +400,7 @@ import {
 } from '../common/customTable';
 import addDateCellDia from './addDateCellDia';
 import * as sheetInterface from '@/api/modules/sheetApi.js';
+import { dataBaseInterface }  from '@/api/api.js';
 import mDialog from '@/components/mDialog.vue'
 export default {
   props: {
@@ -429,6 +434,9 @@ export default {
     dateArr() {
       console.log(this.config.data)
       return this.config.data.length ? this.config.data[0].Data.map(_ => _.DataTime) : []
+    },
+    isCollapse() {
+      return this.$store.state.isCollapse
     }
   },
   data() {
@@ -437,9 +445,9 @@ export default {
       formula: '',
       config: {
         type: this.sheetType,
-        order: 1,// 1降序 2升序
+        order: 2,// 1降序 2升序
         EdbKeys: ["EdbName", "Unit"],
-        data: [],
+        data: [], //单元格类型 1默认格 2补充格 3自定义输入 4公式求值格 5预测值
         textRowData: [],
         contextMenuOption: [
           { label: '删除',key: 'del' },
@@ -746,10 +754,32 @@ export default {
       }
     },
 
+    /* 跳转到指标库 */
+    async edbJumpToBase(edb) {
+      //非详情页不跳转
+      if(!this.disabled) return
+
+      const res = await dataBaseInterface.targetDetail({EdbInfoId:edb.EdbInfoId})
+      if(res.Ret !== 200) return
+
+       //EdbInfoType=1 跳预测指标详情,=0跳指标库详情
+      const {ClassifyId,UniqueCode,EdbInfoId,EdbInfoType} = res.Data;
+      let {href} = this.$router.resolve({
+        path:EdbInfoType===1?'/predictEdb':'/database',
+        query:{code:UniqueCode,id:EdbInfoId,classifyId:ClassifyId}
+      });
+      window.open(href,'_blank');
+    },
+
     /* 清空所有数据 */
     reset() {
       this.config.data = [];
       this.config.textRowData = [];
+    },
+
+    dragEnd(e) {
+      let dom = document.querySelector('.add-fixed');
+      dom.style.top = e.clientY-10 + 'px';
     }
   },
 };
@@ -835,6 +865,11 @@ export default {
     &.insert {
       background: #FFEFDD;
     }
+    .edbname-td {
+      &:hover {
+        text-decoration: underline;
+      }
+    }
   }
   
   .th-tg {
@@ -874,9 +909,11 @@ export default {
   }
 
   .add-fixed {
-    position: absolute;
-    bottom: 20%;
+    cursor: move;
+    position: fixed;
+    top: 70%;
     left: 0;
+    z-index: 99;
     .add-wrapper {
       position: relative;
       padding: 5px 50px 5px 20px;

+ 204 - 53
src/views/datasheet_manage/components/MixedTable.vue

@@ -46,15 +46,43 @@
               :data-key="cell.Uid"
               @click="clickCell($event, cell)"
               @contextmenu.prevent="rightClickHandle($event,cell)"
+              @mouseenter="getRelationEdbInfo(cell)"
             >
+
+            <!-- 插入单元格禁止编辑 -->
+            <template v-if="[4,5].includes(cell.DataType) || disabled">
+              <!-- 单元格类型5显示指标浮窗 -->
+              <el-popover
+                v-if="cell.DataType===5&&!disabled"
+                placement="top-start"
+                width="350"
+                trigger="hover"
+              >
+                <ul>
+                  <li style="display:flex;margin:10px;">
+                    <label style="min-width:80px;">指标名称</label> 
+                    {{cellrelationEdbInfo.EdbName}}
+                  </li>
+                  <li style="display:flex;margin:10px;">
+                    <label style="min-width:80px;">指标ID</label> 
+                    {{cellrelationEdbInfo.EdbCode}}
+                  </li>
+                </ul>
+                <span
+                  slot="reference"
+                  :data-rindex="rowHeader[index]"
+                  :data-cindex="columnHeader[cell_index]"
+                  :data-key="cell.Uid"
+                >{{ cell.ShowValue }}</span>
+              </el-popover>
+
               <span
                 :data-rindex="rowHeader[index]"
                 :data-cindex="columnHeader[cell_index]"
                 :data-key="cell.Uid"
-                v-if="cell.DataType === 4 || disabled"
-              >
-                {{ cell.ShowValue }}</span
-              >
+                v-else
+              >{{ cell.ShowValue }}</span>
+            </template>
 
               <el-autocomplete
                 v-else
@@ -64,15 +92,19 @@
                 :data-key="cell.Uid"
                 :data-rindex="rowHeader[index]"
                 :data-cindex="columnHeader[cell_index]"
+                :highlight-first-item="cell.DataType===2"
                 @select="selectTarget($event,cell)"
                 @click="clickCell($event, cell)"
                 @change.native="changeVal($event, cell)"
               >
                 <template slot-scope="scope">
                     <edbDetailPopover :info="scope.item">
-                      <div slot="reference">
-                          {{ scope.item.EdbName }}
+                      <div slot="reference" v-if="cell.DataType===2" class="edb-item">
+                         <span class="edb-item-name text_oneLine">{{ scope.item.EdbName }}</span>
+                         <i class="el-icon-check" style="color:#0052D9;font-size:18px;"/>
                       </div>
+
+                      <div slot="reference" v-else>{{ scope.item.EdbName }}</div>
                     </edbDetailPopover>
                 </template>
               </el-autocomplete>
@@ -83,13 +115,20 @@
 
       <!-- 右键菜单 -->
       <div class="contextMenu-wrapper" id="contextMenu-wrapper" @mouseleave="hideContextMenu">
-        <div class="item" v-for="menu in config.contextMenuOption" :key="menu.key" @click="handleContext(menu.key)">{{menu.label}}</div>
+        <div :class="['item',{'deletesty': menu.key==='reset'}]" v-for="menu in config.contextMenuOption" :key="menu.key" @click="handleContext(menu.key)">{{menu.label}}</div>
       </div>
     </template>
 
     <div class="nodata" v-else>
       <tableNoData text="暂无数据"/>
     </div>
+
+    <!-- 选择指标 -->
+    <selectTargetValueDia
+      :isShow.sync="isSelectTargetValueDialog"
+      @insert="insertSelectData"
+      ref="selectTargetValueRef"
+    />
   </div>
 </template>
 <script>
@@ -102,18 +141,22 @@ import {
   getRightClickMenu,
   checkDateFormat,
   setFocus,
-  findCellByKey
-  
+  findCellByKey,
+  resetRelationStyle,
+  resetDialogCellStyle
 } from "../common/customTable";
 import * as sheetInterface from "@/api/modules/sheetApi.js";
-import md5 from '@/utils/md5.js'
+import { dataBaseInterface } from '@/api/api.js';
+import md5 from '@/utils/md5.js';
+import selectTargetValueDia from './selectTargetValueDia.vue';
 export default {
   props: {
     disabled: { //是否只预览
       type: Boolean,
-      default: false
+      default: false,
     }
   },
+  components: { selectTargetValueDia },
   computed: {
     //列头
     columnHeader() {
@@ -131,15 +174,21 @@ export default {
   data() {
     return {
       config: {
-        data: [],
+        data: [], //单元格类型 1日期格 2指标格 3自定义输入 4插入值 有关联的日期和指标格 5弹窗里的插入值 有关联日期格
         contextMenuOption: [],
       },
 
-      selectCell: {},
+      selectCell: {},//选中单元格info
+
+      rightClickCell: {},//右键单元格 key c r
+
+      insertTargetCell: {},//选择右键插入指标的单元格 可和右键单元格不一样 key c r
+
+      insertRelationArr: [],
 
-      rightClickCell: {},
+      isSelectTargetValueDialog: false,
 
-      insertRelationArr: []
+      cellrelationEdbInfo: {}
     };
   },
   mounted() {
@@ -148,17 +197,21 @@ export default {
   methods: {
 
     async searchTarget(query,cb) {
-      if(!query) return cb([])
-      // cb([])
+      if(!query||checkDateFormat(query)) return cb([])
       
-      const res = await sheetInterface.searchTarget({
-        KeyWord: query,
-        CurrentIndex: 1,
-        PageSize: 1000
-      })
+      const { DataType,EdbInfoId } = this.selectCell;
+
+      const res = DataType===2 
+        ? await dataBaseInterface.targetDetail({EdbInfoId})
+        : await sheetInterface.searchTarget({
+            KeyWord: query,
+            CurrentIndex: 1,
+            PageSize: 1000
+          })
       if(res.Ret !== 200) return
 
-      cb(res.Data.List)
+      let arr = DataType===2 ? [res.Data] : (res.Data.List||[])
+      cb(arr);
     },
 
     /* 单击 */
@@ -171,14 +224,16 @@ export default {
       setFocus(e);
 
       //插入值时寻找关联依赖的单元格 设置选框
-      if(cell.DataType === 4) {
+      if([4,5].includes(cell.DataType)) {
         const { key } = e.target.dataset;
         if(!this.insertRelationArr.find(_ => _.key===key)) return
         let { relation_date,relation_edb } = this.insertRelationArr.find(_ => _.key===key)
 
-        setRelationStyle(relation_date)
-        setRelationStyle(relation_edb)
+        relation_date.key && setRelationStyle(relation_date)
+        relation_edb.key && setRelationStyle(relation_edb)
       }
+
+      this.isSelectTargetValueDialog&&this.$refs.selectTargetValueRef.chooseEdb(this.$refs.selectTargetValueRef.edbInfo)
     },
 
     /* 插入值 往左往上寻找同行同列是否有符合条件的一指标一日期 */
@@ -223,10 +278,10 @@ export default {
     },
     
     // 建立插入单元格和依赖单元格关联关系
-    setRelation(data) {
+    setRelation(data,cellType=4) {
       const { insert_cell } = data;
       let relation_obj = {
-        type: 4,
+        type: cellType,
         key: insert_cell.key,
         relation_date: {
           type: 1,
@@ -291,24 +346,27 @@ export default {
 
     },
 
-    /* 选择指标 单元格类型为2*/
+    /* 选择指标 单元格类型为2 已经是指标单元格了就重置单元格 否则就视为选择指标*/
     selectTarget(e,cell) {
       const { EdbName,EdbInfoId }  = e;
 
-      cell.DataType = 2;
-      cell.DataTime = '';
-      cell.ShowValue = EdbName;
-      cell.Value = EdbName;
-      cell.EdbInfoId = EdbInfoId;
-
+      //如果已经是指标单元格了再次点击就清空
+      if(cell.DataType===2&&cell.EdbInfoId) {
+        this.clearCell()
+      }else {
+        cell.DataType = 2;
+        cell.DataTime = '';
+        cell.ShowValue = EdbName;
+        cell.Value = EdbName;
+        cell.EdbInfoId = EdbInfoId;
+      }
 
-      this.checkCellRelation(e,cell)
+      this.checkCellRelation(cell)
     },
 
     /* 输入框失焦  */
     async changeVal(e, cell) {
       // 是日期格式 DataType为1
-      //是指标 DataType为2
       // 否则是3
 
       const {value} = e.target;
@@ -319,6 +377,9 @@ export default {
         cell.EdbInfoId = 0;
         cell.DataTime = '';
       }else {
+        //指标类型不做格式处理
+        if(cell.DataType===2) return
+        
         console.log(checkDateFormat(value))
         if(checkDateFormat(value)) { //是日期格式
           cell.DataType = 1;
@@ -337,11 +398,11 @@ export default {
       }
 
       //判断是否是有插入值的依赖单元格 更新值或重置关系
-      this.checkCellRelation(e,cell)
+      this.checkCellRelation(cell)
     },
 
     /* 当前单元格是否和插入值有关联 无就不管 */
-    async checkCellRelation(e,cell) {
+    async checkCellRelation(cell) {
       if(!this.insertRelationArr.length) return
 
       const key= cell.Uid;
@@ -360,7 +421,7 @@ export default {
           //刷新插入值结果
           let params = null;
           if(relation_date.key === key && cell.DataType === 1) { //修改的是依赖日期格
-            let { EdbInfoId } = findCellByKey(this.config.data,relation_edb.key)
+            let { EdbInfoId } = findCellByKey(this.config.data,relation.key)
             params = {
               EdbInfoId,
               Date: cell.ShowValue
@@ -377,12 +438,12 @@ export default {
           const res = await sheetInterface.insertData(params)
           if(res.Ret !==200) return
 
-          !res.Data && this.updateInsertCell(relation.key,true);
+          !res.Data && this.updateInsertCell(relation.key);
   
           res.Data && this.config.data.forEach(row => {
             row.forEach(cell => {
               if(cell.Uid === relation.key) {
-                  cell.DataType = 4;
+                  cell.DataType = relation.type;
                   cell.ShowValue = res.Data;
                   cell.Value = res.Data;
                   cell.EdbInfoId = params.EdbInfoId;
@@ -400,17 +461,15 @@ export default {
     },
 
     // 清除插入值单元格式和关联关系
-    updateInsertCell(key,initValue=false) {
+    updateInsertCell(key) {
       this.config.data.forEach(row => {
         row.forEach(cell => {
           if(cell.Uid === key) {
             cell.DataType = 3;
             cell.EdbInfoId = 0;
             cell.DataTime = '';
-            if(initValue) {
-                cell.ShowValue = '';
-                cell.Value = '';
-            }
+            cell.ShowValue = '';
+            cell.Value = '';
           }
         })
       })
@@ -466,12 +525,61 @@ export default {
         'insert-col-right': this.insertCol,
         'insert-row-up': this.insertRow,
         'insert-row-down': this.insertRow,
-        'insert-value': this.insertValue
+        'insert-value': this.insertValue,
+        'choose-target': this.selectTargetOpen,
+        'reset': this.clearCell
       }
       keyMap[key] && keyMap[key](key)
+      
       this.hideContextMenu()
     },
 
+    /* 打开选择指标弹窗  
+    打开弹窗后仍可以在页面上点击 多存一个选择指标时的信息 */
+    selectTargetOpen() {
+      this.insertTargetCell = this.selectCell;
+      resetDialogCellStyle();
+      setRelationStyle({ key:this.insertTargetCell.Uid },'td-choose-insert-target')
+      this.isSelectTargetValueDialog = true;
+    },
+
+    /* 插入选择指标的值 */
+    insertSelectData({ edbId,value }) {
+
+      this.insertTargetCell.DataType = 5;
+      this.insertTargetCell.ShowValue = value;
+      this.insertTargetCell.Value = value;
+      this.insertTargetCell.EdbInfoId = edbId;
+      this.insertTargetCell.DataTime = this.selectCell.ShowValue;
+
+      this.$message.success('插入成功')
+
+      //建立新的关联关系
+      let relation = {
+        insert_cell: {
+          key: this.insertTargetCell.Uid,
+          relation_date: this.selectCell.Uid,
+          relation_edb: '',
+        }
+      }
+
+      this.setRelation(relation,5);
+
+    },
+
+    /* 清除单元格内容 格式 关联关系 */
+    clearCell() {
+      if([4,5].includes(this.selectCell.DataType)) resetRelationStyle();
+
+      this.selectCell.DataType = 3;
+      this.selectCell.ShowValue = '';
+      this.selectCell.Value = '';
+      this.selectCell.DataTime = '';
+      this.selectCell.EdbInfoId = 0;
+
+      this.checkCellRelation(this.selectCell)
+    },
+
     /* 删除行列 */
     delColOrRow() {
       let { rindex,cindex } = this.rightClickCell;
@@ -486,7 +594,8 @@ export default {
         //删除时清除关系
         if(this.insertRelationArr.length) {
           let delCellIds = this.config.data.map(row => row[index].Uid);
-          this.insertRelationArr = this.insertRelationArr.filter(_ => !delCellIds.includes(_.key)&&!delCellIds.includes(_.relation_date.key)&&!delCellIds.includes(_.relation_edb.key))
+          
+          this.clearRelationInsertCell(delCellIds);
         }
 
         this.config.data.forEach(row => {
@@ -502,13 +611,27 @@ export default {
         if(this.insertRelationArr.length) {
           //删除时清除关系
           let delCellIds = this.config.data[index].map(cell => cell.Uid);
-          this.insertRelationArr = this.insertRelationArr.filter(_ => !delCellIds.includes(_.key)&&!delCellIds.includes(_.relation_date.key)&&!delCellIds.includes(_.relation_edb.key));
+          
+          this.clearRelationInsertCell(delCellIds);
         }
 
         this.config.data.splice(index,1)
 
       }
-      console.log(this.insertRelationArr)
+      // console.log(this.insertRelationArr)
+    },
+
+    /* 删除时清除关联关系 和删除单元格有关联的插入值单元格和 */
+    clearRelationInsertCell(delCellIds) {
+      //清除关联插入值得单元格
+      let haveRelationArr = this.insertRelationArr.filter(_ => delCellIds.includes(_.relation_date.key)||delCellIds.includes(_.relation_edb.key));
+      // console.log(haveRelationArr)
+
+      haveRelationArr.forEach(relation => {
+        !delCellIds.includes(relation)&&this.updateInsertCell(relation.key);
+      })
+
+      this.insertRelationArr = this.insertRelationArr.filter(_ => !delCellIds.includes(_.key)&&!delCellIds.includes(_.relation_date.key)&&!delCellIds.includes(_.relation_edb.key))
     },
 
     /* 插入列 */
@@ -549,6 +672,17 @@ export default {
 
     },
 
+    /* 单元格类型5 浮到上面展示指标信息浮窗 */
+    async getRelationEdbInfo({EdbInfoId,DataType}) {
+      if(DataType!==5||this.disabled) return
+
+      const res = await dataBaseInterface.targetDetail({EdbInfoId})
+
+      if(res.Ret !== 200) return
+
+      this.cellrelationEdbInfo =  res.Data;
+    },
+
     /* 初始化8行5列 */
     initData(initData=null) {
       if(initData) {
@@ -645,8 +779,17 @@ export default {
       border-left: none;
       border-right: none;
     }
-    &.insert {
-      background: #ffefdd;
+    &.td-choose-insert-target::after {
+      position: absolute;
+      top: 0;
+      left: 0;
+      right: 0;
+      bottom: 0;
+      content: "";
+      display: block;
+      outline: 0;
+      border: 2px dashed orange;
+      box-shadow: 0 0 5px rgba(73, 177, 249, 0.5);
     }
   }
 
@@ -716,5 +859,13 @@ export default {
 }
 .edb-select-popover {
   width: 300px !important;
+  .edb-item {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    .edb-item-name {
+      max-width: 260px;
+    }
+  }
 }
 </style>

+ 161 - 0
src/views/datasheet_manage/components/selectTargetValueDia.vue

@@ -0,0 +1,161 @@
+<template>
+<div v-dialogDrag v-show="isShow" >
+  <div class="select-target-value-dia el-dialog" >
+    <div class="header el-dialog__header">
+      <span>选择指标</span>
+      <i class="el-icon-close" @click="cancelHandle"/>
+    </div>
+    <div class="main">
+      <selectTarget
+        ref="selectRef"
+        :selectStyleType="3"
+        @select="chooseEdb"
+      />
+
+      <ul class="data-cont">
+        <template v-if="result.List">
+          <li v-for="(item,index) in result.List" :key="index" :class="[{'choose': item.DataTime===result.Date},'data-li']">
+            <span>{{item.DataTime}}</span>
+            <span style="min-width:150px">{{item.Value}}</span>
+          </li>
+        </template>
+        <tableNoData size="mini" v-else/>
+      </ul>
+
+      <div class="dia-bot">
+        <el-button type="primary" style="margin-right: 20px" :disabled="!result.Date" @click="insertData"
+          >插入值</el-button
+        >
+        <el-button type="primary" plain @click="cancelHandle">取消</el-button>
+      </div>
+    </div>
+    
+  </div>
+</div>
+</template>
+<script>
+import * as sheetInterface from "@/api/modules/sheetApi.js";
+import selectTarget from '@/views/chartRelevance_manage/components/selectTarget.vue';
+import { resetDialogCellStyle } from "../common/customTable";
+export default {
+  props: {
+    isShow: {
+      type: Boolean,
+    }
+  },
+  components: { selectTarget },
+  data() {
+    return {
+      result: {},
+      edbInfo: null,
+      chooseItem: {
+        edbId: 0,
+        value:''
+      }
+    }
+  },
+  methods:{
+    /* 选择指标和日期获取近5期数据 */
+    async chooseEdb(edb) {
+      if(!edb){
+        this.initData();
+        return
+      } 
+
+      this.edbInfo = edb;
+      
+      if(this.$parent.selectCell.DataType !== 1){
+
+        this.$message.warning('请在表格中选择日期')
+        this.initData();
+        return
+      }
+
+      const res = await sheetInterface.getDateLatelyData({ 
+        EdbInfoId: edb.EdbInfoId,
+        Date: this.$parent.selectCell.ShowValue
+      })
+      if(res.Ret !== 200) return
+
+      this.result = res.Data;
+      if(!this.result.Date) return this.$message.warning('所选指标所选日期无值')
+      this.chooseItem = {
+        edbId: edb.EdbInfoId,
+        value: this.result.Date?this.result.List.find(_ =>_.DataTime===this.result.Date).Value.toString():''
+      }
+
+    },
+
+    insertData() {
+      this.$emit('insert',this.chooseItem)
+      this.cancelHandle();
+    },
+
+    initData() {
+      this.$refs.selectRef.search_txt='';
+      this.result = {};
+      this.edbInfo=null;
+      this.chooseItem = { edbId: 0,value: '' }
+    },
+
+    cancelHandle() {
+      this.initData();
+      this.$emit('update:isShow',false);
+      resetDialogCellStyle();
+    }
+  },
+}
+</script>
+<style scoped lang='scss'>
+@import "../../../styles/theme-vars.scss";
+.select-target-value-dia {
+  background: #fff;
+  position: fixed;
+  top: 20%;
+  left: 55%;
+  width: 500px;
+  border-radius: 2px;
+  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
+  z-index: 999;
+  .header { 
+    height: 50px;
+    font-size: 16px;
+    background: $theme-color;
+    color: #fff;
+    padding: 0 15px;
+    display: flex;
+    align-content: center;
+    justify-content: space-between;
+    span {
+      line-height: 50px;
+    }
+    .el-icon-close {
+      font-size: 20px;
+      line-height: 50px;
+      cursor: pointer;
+    }
+  }
+  .main {
+    padding: 20px 15px;
+    .data-cont {
+      margin: 15px 0;
+      border: 1px solid #DCDFE6;
+      /* padding: 20px; */
+      .data-li {
+        display: flex;
+        padding: 15px;
+        text-align: center;
+        justify-content: space-around;
+        &.choose {
+          background: #ECF5FF;
+        }
+      }
+    }
+    .dia-bot {
+      margin-top: 20px; 
+      display: flex;
+      justify-content: center;
+    }
+  }
+}
+</style>

+ 10 - 2
src/views/datasheet_manage/customSheetEdit.vue

@@ -140,8 +140,16 @@ export default {
       if(this.$refs.customTableRef.config.data.find(_ => _.EdbInfoId===EdbInfoId)) return this.$message.warning('指标已存在')
       
       const {Data} = this.$refs.customTableRef.config.data.length 
-      ? await sheetInterface.getEdbInsertDataOther({EdbInfoId: EdbInfoId,DateList: this.$refs.customTableRef.dateArr})
-      : await sheetInterface.getEdbInsertDataA({EdbInfoId: EdbInfoId,Num: 12})
+      ? await sheetInterface.getEdbInsertDataOther({
+        EdbInfoId: EdbInfoId,
+        DateList: this.$refs.customTableRef.dateArr,
+        SortType: this.$refs.customTableRef.config.order===1 ? 'desc' : 'asc'
+      })
+      : await sheetInterface.getEdbInsertDataA({
+        EdbInfoId: EdbInfoId,
+        SortType: this.$refs.customTableRef.config.order===1 ? 'desc' : 'asc',
+        Num: 12
+      })
       
       this.$refs.customTableRef.updateEdbData({
         Data: Data.Data.map(_ => ({..._,DataTimeType: 1,})),

+ 31 - 7
src/views/datasheet_manage/sheetList.vue

@@ -10,10 +10,12 @@
     <div class="data-sheet-main" id="box">
       <div class="main-left left" id="left" v-show="!isSlideLeft">
         <div class="datasheet_top">
-          <el-button type="primary" style="margin-right:20px" @click="goAddSheetHandle(1)"
+          <el-button v-permission="permissionBtn.etaTablePermission.etaTable_excel"
+            type="primary" style="margin-right:20px" @click="goAddSheetHandle(1)"
           >添加Excel表格</el-button >
 
-          <el-dropdown @command="goAddSheetHandle">
+          <el-dropdown v-permission="permissionBtn.etaTablePermission.etaTable_customize"
+            @command="goAddSheetHandle">
             <el-button type="primary">
               自定义表格<i class="el-icon-arrow-down el-icon--right"></i>
             </el-button>
@@ -169,7 +171,7 @@
                 @click="saveHandle"
                 v-if="
                   sheetDetailInfo.Source === 1 &&
-                  sheetDetailInfo.Button.OpButton
+                  sheetDetailInfo.Button.OpButton&&permissionBtn.checkPermissionBtn(permissionBtn.etaTablePermission.etaTable_excel_save)
                 "
               >
                 保存
@@ -178,32 +180,34 @@
                 <li
                   class="editsty"
                   @click="goEditHandle"
-                  v-if="sheetDetailInfo.Button.OpButton"
+                  v-if="sheetDetailInfo.Button.OpButton&&permissionBtn.checkPermissionBtn(permissionBtn.etaTablePermission.etaTable_customize_edit)"
                 >
                   编辑
                 </li>
                 <li
                   class="editsty"
                   @click="refreshSheet"
-                  v-if="sheetDetailInfo.Button.RefreshButton"
+                  v-if="sheetDetailInfo.Button.RefreshButton&&permissionBtn.checkPermissionBtn(permissionBtn.etaTablePermission.etaTable_customize_refresh)"
                 >
                   刷新
                 </li>
                 <li
                   class="editsty"
                   @click="saveOtherHandle"
-                  v-if="sheetDetailInfo.Button.CopyButton"
+                  v-if="sheetDetailInfo.Button.CopyButton&&permissionBtn.checkPermissionBtn(permissionBtn.etaTablePermission.etaTable_customize_otherSave)"
                 >
                   另存为
                 </li>
               </template>
-              <li class="editsty" @click="downloadExcel(sheetDetailInfo)">
+              <li v-if="isDownLoadShow(sheetDetailInfo)"
+                class="editsty" @click="downloadExcel(sheetDetailInfo)">
                 下载
               </li>
               <li
                 class="deletesty"
                 v-if="
                   sheetDetailInfo.Button && sheetDetailInfo.Button.DeleteButton
+                  &&isDeleteShow(sheetDetailInfo)
                 "
                 @click="delSheetHandle(sheetDetailInfo, 'del')"
               >
@@ -266,12 +270,14 @@
                   <span>创建时间: {{ cell.CreateTime.slice(0, 10) }}</span>
                   <div>
                     <span
+                      v-if="isDownLoadShow(cell)"
                       class="editsty"
                       style="margin-right: 10px"
                       @click="downloadExcel(cell)"
                       >下载</span
                     >
                     <span
+                      v-if="isDeleteShow(cell)"
                       class="deletesty"
                       @click="delSheetHandle(cell, 'del-list')"
                       >删除</span
@@ -855,6 +861,24 @@ export default {
               : 150;
         });
     },
+    //判断右侧列表的下载按钮是否显示
+    isDownLoadShow(cell){
+        const {checkPermissionBtn,etaTablePermission} = this.permissionBtn
+        if(cell.Source===1){
+            return checkPermissionBtn(etaTablePermission.etaTable_excel_download)
+        }else{
+            return checkPermissionBtn(etaTablePermission.etaTable_customize_download)
+        }
+    },
+    //判断右侧列表的删除按钮是否显示
+    isDeleteShow(cell){
+        const {checkPermissionBtn,etaTablePermission} = this.permissionBtn
+        if(cell.Source===1){
+            return checkPermissionBtn(etaTablePermission.etaTable_excel_del)
+        }else{
+            return checkPermissionBtn(etaTablePermission.etaTable_customize_del)
+        }
+    },
   },
   mounted() {
     if (this.$route.query.code) {

+ 5 - 3
src/views/futures_manage/commodityChartBase.vue

@@ -11,8 +11,10 @@
 		<div class="data-sheet-main" id="box">
       <div class="main-left left" id="left" v-show="!isSlideLeft">
 				<div class="datasheet_top">
-						<el-button type="primary" @click="goAddChart('price')">添加价格曲线</el-button>
-						<el-button type="primary" @click="goAddChart('profit')">添加利润曲线</el-button>
+						<el-button v-permission="permissionBtn.productPricePermission.goodsPrice_priceLine"
+							type="primary" @click="goAddChart('price')">添加价格曲线</el-button>
+						<el-button v-permission="permissionBtn.productPricePermission.goodsPrice_incomeLine"
+							type="primary" @click="goAddChart('profit')">添加利润曲线</el-button>
 				</div>
 
 				<div class="search-cont">
@@ -271,7 +273,7 @@ export default {
 	computed: {
 		/* 分享地址 */
     linkUrl() {
-      const LINK_CHART_URL = process.env.CHART_LINK;
+      const LINK_CHART_URL = this.$setting.dynamicOutLinks.ChartViewUrl+'/chartshow';
       return `${LINK_CHART_URL}?code=${this.chartInfo.UniqueCode}&fromType=share?&lang=${this.currentLang}`
     }
 	},

+ 26 - 17
src/views/mychart_manage/components/chartDetailDia.vue

@@ -52,10 +52,12 @@
             />
           </div>
           <div class="top-right" v-if="chartInfo.Button">
-            <span class="collected" @click="removeMychart(chartInfo)" v-if="classifyUserId === roleId">
+            <span v-permission="permissionBtn.myETAPermission.myChart_move"
+                class="collected" @click="removeMychart(chartInfo)" v-if="classifyUserId === roleId">
               <i class="el-icon-remove-outline"></i>移出
             </span>
             <el-popover
+              v-permission="permissionBtn.myETAPermission.myChart_share"
               v-if="!chartInfo.Disabled"
               placement="top"
               width="200"
@@ -72,7 +74,8 @@
                 <i class="el-icon-share"/>&nbsp;分享
               </span>
             </el-popover>
-            <span class="span-item" @click="$parent.moveMychart(chartInfo.ChartInfoId)" v-if="classifyUserId === roleId">
+            <span v-permission="permissionBtn.myETAPermission.myChart_copyTo"
+                class="span-item" @click="$parent.moveMychart(chartInfo.ChartInfoId)" v-if="classifyUserId === roleId">
               <img
                 :src="$icons.chart_move_ico"
                 alt=""
@@ -85,7 +88,8 @@
               />
               复制到
             </span>
-            <span class="span-item" @click="refreshHandle" style="margin-left: 7px;">
+            <span v-permission="permissionBtn.myETAPermission.myChart_refresh"
+                class="span-item" @click="refreshHandle" style="margin-left: 7px;">
               <span><i class="el-icon-refresh" style="font-size: 15px;"/>&nbsp;刷新 </span>
             </span>
             <span
@@ -102,6 +106,7 @@
                 加入我的图库
             </span>
             <span
+              v-permission="permissionBtn.myETAPermission.myChart_edit"
               class="span-item"
               style="margin-left: 7px"
               v-if="chartInfo.Button.IsEdit"
@@ -110,14 +115,16 @@
               <span> <i class="el-icon-edit" />&nbsp;编辑 </span>
             </span>
             <span
+              v-permission="permissionBtn.myETAPermission.myChart_save"
               class="span-item"
               style="margin-left: 7px"
               @click="saveChartMapHandle"
-              v-if="![3,6,7,8,9].includes(chartInfo.Source)"
+              v-if="![3,4,6,7,8,9].includes(chartInfo.Source)"
             >
               <span> <i class="el-icon-collection" />&nbsp;保存 </span>
             </span>
             <span
+              v-permission="permissionBtn.myETAPermission.myChart_otherSave"
               class="span-item"
               style="margin-left: 7px"
               v-if="chartInfo.Button.IsCopy"
@@ -126,6 +133,7 @@
               <span> <i class="el-icon-document-add" />&nbsp;另存为 </span>
             </span>
             <el-popover
+              v-permission="permissionBtn.myETAPermission.myChart_copyOffice"
               v-if="!chartInfo.Disabled"
               placement="top"
               width="200"
@@ -148,6 +156,7 @@
             </span>
             </el-popover>
             <el-popover
+              v-permission="permissionBtn.myETAPermission.myChart_copyWechat"
               v-if="!chartInfo.Disabled"
               placement="top"
               width="200"
@@ -170,6 +179,7 @@
               </span>
             </el-popover>
             <span
+              v-permission="permissionBtn.myETAPermission.myChart_enNameSetting"
               class="span-item"
               style="margin-left: 7px"
               @click="openEnNameDia"
@@ -177,6 +187,7 @@
               <span> <img style="width: 16px;vertical-align: middle" :src="$icons.to_en" />&nbsp;设置英文名称 </span>
             </span>
             <el-popconfirm
+              v-permission="permissionBtn.myETAPermission.myChart_del"
               title="删除后该图表将不能再引用,确认删除吗?"
               icon="el-icon-info"
               @onConfirm="delChartHandle"
@@ -599,7 +610,7 @@ export default {
     },
     /* 分享地址 */
     linkUrl() {
-      const LINK_CHART_URL = process.env.CHART_LINK;
+      const LINK_CHART_URL = this.$setting.dynamicOutLinks.ChartViewUrl+'/chartshow';
       return `${LINK_CHART_URL}?code=${this.chartInfo.UniqueCode}&fromType=share?&lang=${this.currentLang}`
     }
   },
@@ -678,16 +689,16 @@ export default {
             } : res.Data.ChartInfo;
             //商品价格图
             this.initCommodityData(res.Data);
-          }else if([3,4].includes(this.chartInfo.Source)){//相关性 滚动相关性
+          }else if([3].includes(this.chartInfo.Source)){//相关性 滚动相关性
 
             this.relevanceChartData={
                 ChartInfo:res.Data.ChartInfo,
                 EdbInfoList:res.Data.EdbInfoList,
-                XEdbIdValue:this.chartInfo.Source === 3 ? res.Data.XEdbIdValue : res.Data.DataResp.XDateTimeValue,
+                XEdbIdValue:res.Data.XEdbIdValue,
                 CorrelationChartInfo:res.Data.CorrelationChartInfo,
                 YDataList:[
                   {
-                    Value: this.chartInfo.Source === 3 ? res.Data.YDataList[0].Value : res.Data.DataResp.YDataList[0].Value,
+                    Value: res.Data.YDataList[0].Value,
                     Color:'#00f',
                     Name:res.Data.ChartInfo.ChartName,
                     NameEn:res.Data.ChartInfo.ChartNameEn
@@ -697,6 +708,13 @@ export default {
             
             this.initRelevanceChartData()
             this.tableData = res.Data.EdbInfoList
+          }else if(this.chartInfo.Source===4) {//滚动相关性换成曲线图绘图
+            this.tableData = res.Data.EdbInfoList
+            this.relevanceChartData = {
+              CorrelationChartInfo: res.Data.CorrelationChartInfo
+            }
+            this.setDefaultChart([res.Data.DataResp]);
+
           }else if([6,7,8].includes(this.chartInfo.Source)){//拟合方程 标准差 百分比
             this.tableData = res.Data.EdbInfoList;
             
@@ -964,15 +982,6 @@ export default {
           ...dynamic_copyOptions[chartType]
         },
       }
-      if(this.options.isRelevanceChart){
-        svgObj={
-          ...svgObj,
-          xAxis:[{
-            ...this.options.xAxis,
-            offset:-(heightNum-136)/2
-          }],
-        }
-      }
       let svg = this.$refs.chartRef.chart.getSVG(svgObj);
       this.copyBlobItem(widthNum,heightNum,svg,type);
     },500),

+ 4 - 2
src/views/mychart_manage/index.vue

@@ -16,7 +16,8 @@
       </span>
       <span class="move-btn resize" v-drag id="resize"></span>
       <div class="left-top">
-        <span class="add-cont" @click="chooseChartHandle">
+        <span v-permission="permissionBtn.myETAPermission.myChart_selectChart"
+            class="add-cont" @click="chooseChartHandle">
           <img
             :src="$icons.choose_blue"
             alt=""
@@ -209,7 +210,8 @@
                     >创建时间: {{ chart.CreateTime.slice(0,10) }}</span
                   >
                   <div v-if="select_classify_userid === roleId">
-                    <span class="join_txt" @click="removeMyChart(chart)">
+                    <span v-permission="permissionBtn.myETAPermission.myChart_move"
+                        class="join_txt" @click="removeMyChart(chart)">
                       <i
                         class="el-icon-remove-outline"
                         style="font-size: 14px"

+ 402 - 0
src/views/positionAnalysis_manage/components/chartBox.vue

@@ -0,0 +1,402 @@
+<template>
+  <div :class="['chart-render-box', isPcShow ? 'chart-render-box-pc' : '']">
+    <div class="label-box">
+      <div>
+        <span
+          class="color-box"
+          :style="{ background: colorMap.get(keyVal)[0] }"
+        ></span>
+        <span>{{ data.labelName }}</span>
+      </div>
+      <div>
+        <span
+          class="color-box"
+          :style="{ background: colorMap.get(keyVal)[1] }"
+        ></span>
+        <span>增</span>
+      </div>
+      <div>
+        <span
+          class="color-box"
+          :style="{ background: colorMap.get(keyVal)[2] }"
+        ></span>
+        <span>减</span>
+      </div>
+    </div>
+    <div class="chart-content">
+      <!-- <img class="mark-img" src="../../../../../assets/hzyb/chart/mark.png" alt=""> -->
+      <div class="chart-box" :id="'chart-box-' + keyVal"></div>
+    </div>
+
+    <!-- 详情弹窗 -->
+    <el-dialog
+      :visible.sync="showDetailDia"
+      title="详情"
+      :width="500"
+      draggable
+      :close-on-click-modal="false"
+      append-to-body
+      custom-class="position-analysis-detail-page-dialog"
+    >
+      <div class="detail-pop-wrap">
+        <h2 class="title">{{ showDetailData.DealShortName }}</h2>
+        <div class="table-box">
+          <div class="item">
+            <div>持{{ showDetailData.TypeName }}</div>
+            <div>{{ showDetailData.DealValue }}</div>
+          </div>
+          <div class="item">
+            <div>增减</div>
+            <div>{{ showDetailData.DealChange }}</div>
+          </div>
+          <div class="item">
+            <div>占比</div>
+            <div>{{ (showDetailData.Rate * 100).toFixed(2) }}%</div>
+          </div>
+          <div class="item">
+            <div>前{{ showDetailData.Rank }}名持净多单</div>
+            <div>{{ showDetailData.BeforeAllValue }}</div>
+          </div>
+          <div class="item">
+            <div>增减</div>
+            <div>{{ showDetailData.BeforeAllChange }}</div>
+          </div>
+          <div class="item">
+            <div>占比</div>
+            <div>{{ (showDetailData.BeforeAllRate * 100).toFixed(2) }}%</div>
+          </div>
+        </div>
+        <div class="close-btn" @click="showDetailDia = false">知道了</div>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import Highcharts from "highcharts";
+import HighchartsMore from "highcharts/highcharts-more";
+import HighchartszhCN from "@/utils/highcahrts-zh_CN";
+
+HighchartszhCN(Highcharts);
+HighchartsMore(Highcharts);
+export default {
+  props: {
+    keyVal: String,
+    data: Object,
+  },
+  computed: {
+    //图表默认配置项
+    chartDefaultOpts() {
+      let that = this;
+      const chartDefaultOpts = {
+        chart: {
+          type: "column",
+          inverted: true, //xy轴换位置
+          marginRight: 85,
+        },
+        title: {
+          text: "",
+        },
+        //版权信息
+        credits: { enabled: false },
+        plotOptions: {
+          column: {
+            pointPadding: 0,
+            stacking: "normal",
+            dataLabels: {
+              enabled: true,
+              align: "right",
+              color: "#333",
+              inside: false,
+              crop: false,
+              overflow: true,
+              x: 80,
+              formatter: function (e) {
+                return this.point.options.isLabel;
+              },
+            },
+            events: {
+              click: function (event) {
+                const name = event.point.category;
+                that.showDetail(name);
+              },
+            },
+          },
+        },
+        legend: {
+          enabled: false, //关闭图例
+        },
+        tooltip: {
+          enabled: false,
+        },
+      };
+      return chartDefaultOpts;
+    },
+  },
+  watch: {
+    data(nval) {
+      nval.List && this.chartRender();
+    },
+  },
+  data() {
+    return {
+      //配色表
+      colorMap: new Map([
+        ["BuyList", ["#FFD600", "#F32F2F", "#52D424"]],
+        ["SoldList", ["#C6DDFF", "#363EFF", "#52D424"]],
+        ["CleanBuyList", ["#FFD600", "#F32F2F", "#52D424"]],
+        ["CleanSoldList", ["#C6DDFF", "#363EFF", "#52D424"]],
+      ]),
+
+      isPcShow: true,
+
+      //点击柱子显示弹窗
+      showDetailDia: false,
+      showDetailData: {},
+    };
+  },
+
+  methods: {
+    //绘图
+    chartRender() {
+      let options = {};
+      let categories = [];
+      let series = [
+        {
+          name: "总数",
+          data: [],
+        },
+        {
+          name: "增长",
+          data: [],
+        },
+        {
+          name: "减少",
+          data: [],
+        },
+      ];
+      let totalArr = [],
+        increaseArr = [],
+        reduceArr = [];
+      this.data.List.forEach((item, index) => {
+        categories.push(item.DealShortName);
+        // 处理series
+        if (item.DealChange < 0) {
+          //减少
+          totalArr.push({ y: item.DealValue });
+          increaseArr.push({ y: 0 });
+          reduceArr.push({
+            y: -item.DealChange,
+            isLabel: `${item.DealValue}/${item.DealChange}`,
+          });
+        } else {
+          totalArr.push({ y: item.DealValue - item.DealChange });
+          reduceArr.push({ y: 0 });
+          increaseArr.push({
+            y: item.DealChange,
+            isLabel: `${item.DealValue}/+${item.DealChange}`,
+          });
+        }
+      });
+      series[0].data = totalArr;
+      series[1].data = increaseArr;
+      series[2].data = reduceArr;
+      let xAxis = {
+        categories: categories,
+        tickWidth: 1,
+        tickPosition: "outside",
+      };
+      let yAxis = {
+        opposite: true,
+        gridLineWidth: 1,
+        gridLineColor: "#E4E4E4",
+        gridLineDashStyle: "longdash",
+        endOnTick: false,
+        showLastLabel: true,
+        lineWidth: 1,
+        tickWidth: 1,
+        tickPosition: "outside",
+        title: {
+          text: "",
+        },
+        reversedStacks: false,
+      };
+
+      options.colors = this.colorMap.get(this.keyVal);
+      options.xAxis = xAxis;
+      options.yAxis = yAxis;
+      options.series = series;
+      options = { ...this.chartDefaultOpts, ...options };
+      // console.log('渲染',options);
+      Highcharts.chart(`chart-box-${this.keyVal}`, options);
+    },
+
+    showDetail(name) {
+      let data = {};
+      this.data.List.forEach((item) => {
+        if (item.DealShortName === name) {
+          data = item;
+        }
+      });
+      // 判断是否是在pc中 如果是则通知pc显示弹窗
+      // console.log(window.innerWidth);
+
+      this.showDetailDia = true;
+      this.showDetailData = {
+        ...data,
+        type_name: this.data.name,
+      };
+    },
+  },
+  mounted() {
+    this.data.List && this.chartRender();
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+@import "~@/styles/theme-vars.scss";
+* {
+  box-sizing: border-box;
+}
+.chart-render-box {
+  width: 100%;
+  overflow: hidden;
+  .label-box {
+    display: flex;
+    justify-content: center;
+    div {
+      margin-right: 30px;
+    }
+    .color-box {
+      display: inline-block;
+      width: 22px;
+      height: 22px;
+      margin-right: 10px;
+      border-radius: 4px;
+    }
+  }
+  .chart-content {
+    width: 100%;
+    height: 70vh;
+    position: relative;
+    .mark-img {
+      position: absolute;
+      width: 58%;
+      left: 50%;
+      top: 50%;
+      transform: translate(-50%, -50%);
+      pointer-events: none;
+      z-index: 2;
+    }
+    .chart-box {
+      width: 100%;
+      height: 100%;
+    }
+  }
+}
+.mobile-detail-pop-wrap {
+  width: 90vw;
+  .title {
+    text-align: center;
+    font-size: 32px;
+    padding: 30px;
+  }
+  .table-box {
+    display: flex;
+    flex-wrap: wrap;
+    .item {
+      width: 33.33%;
+      text-align: center;
+      padding: 30px 20px;
+      border-right: 1px solid #e5e5e5;
+      border-bottom: 1px solid #e5e5e5;
+      div:first-child {
+        color: #999999;
+        font-size: 24px;
+      }
+      div:last-child {
+        font-size: 32px;
+        font-weight: 600;
+      }
+    }
+  }
+  .close-btn {
+    text-align: center;
+    line-height: 96px;
+    color: #e3b377;
+  }
+}
+
+.detail-pop-wrap {
+  .title {
+    text-align: center;
+    font-size: 16px;
+    padding-bottom: 10px;
+    margin-top: 0;
+  }
+  .table-box {
+    display: flex;
+    flex-wrap: wrap;
+    .item {
+      width: 33.33%;
+      text-align: center;
+      padding: 30px 20px;
+      border-right: 1px solid #e5e5e5;
+      border-bottom: 1px solid #e5e5e5;
+      div:first-child {
+        color: #999999;
+        font-size: 14px;
+      }
+      div:last-child {
+        font-size: 16px;
+        font-weight: 600;
+      }
+    }
+    .item:nth-child(3n) {
+      border-right: none;
+    }
+    .item:nth-child(n + 4) {
+      border-bottom: none;
+    }
+  }
+  .close-btn {
+    text-align: center;
+    line-height: 40px;
+    color: #fff;
+    width: 300px;
+    height: 40px;
+    background: $theme-color;
+    border-radius: 41px;
+    margin-left: auto;
+    margin-right: auto;
+    margin-top: 30px;
+    margin-bottom: 20px;
+    cursor: pointer;
+  }
+}
+// @media (min-width: 600px){
+.chart-render-box-pc {
+  .label-box {
+    display: flex;
+    justify-content: center;
+    font-size: 14px;
+    div {
+      margin-right: 20px;
+    }
+    .color-box {
+      display: inline-block;
+      width: 14px;
+      height: 14px;
+      margin-right: 8px;
+      border-radius: 4px;
+      position: relative;
+      top: 2px;
+    }
+  }
+  .chart-content {
+    height: 800px;
+  }
+}
+// }
+</style>

+ 348 - 0
src/views/positionAnalysis_manage/components/chartDetail.vue

@@ -0,0 +1,348 @@
+<template>
+  <div
+    :class="[
+      'chart-position-analysis-page',
+      isPcShow ? 'chart-position-analysis-page-pc' : '',
+    ]"
+    v-loading="pageLoading"
+    element-loading-text="加载中"
+  >
+    <div class="chart-wrap-box">
+      <div class="wrap-top">
+        <div>
+          <el-radio-group
+            v-model="tabKey"
+            @change="chartItemInfo = chartListState[tabKey]"
+            v-show="chartListState.BuyList.List"
+          >
+            <el-radio-button
+              :label="tab.key"
+              v-for="tab in tabKeys"
+              :key="tab.key"
+              >{{ tab.label }}</el-radio-button
+            >
+          </el-radio-group>
+        </div>
+        <div>
+          <el-date-picker
+            v-model="selectDate"
+            type="date"
+            placeholder="请选择日期"
+            value-format="yyyy-MM-dd"
+            :picker-options="pickerOption"
+            @change="getInfo"
+            style="margin-right: 10px"
+          />
+          <el-button type="primary" @click="handleDateChange('before')"
+            >查看前一天</el-button
+          >
+          <el-button type="primary" @click="handleDateChange('next')"
+            >查看后一天</el-button
+          >
+        </div>
+      </div>
+      <div
+        class="chart-wrap"
+        v-if="chartItemInfo&&chartItemInfo.List && chartListState.BuyList.List"
+      >
+        <div class="top-info-box">
+          <span>{{ chartItemInfo.name }}</span>
+          <span
+            ><span style="color: #999; margin-right: 2px">总计 </span
+            >{{ chartItemInfo.TotalDealValue }}</span
+          >
+          <span
+            ><span style="color: #999; margin-right: 2px">较昨日 </span
+            >{{ chartItemInfo.TotalDealChange }}</span
+          >
+        </div>
+        <chart-box :keyVal="tabKey" :data="chartItemInfo" />
+      </div>
+
+      <div class="empty-wrap" v-else>
+        <tableNoData text="该日期无数据" />
+      </div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import {
+  apiPositionAnalysisInfo,
+  apiPositionAnalysisList,
+} from "@/api/modules/positionAnalysis";
+import chartBox from "./chartBox.vue";
+export default {
+  components: { chartBox },
+  computed: {
+    pickerOption() {
+      let that = this;
+      let obj = {
+        // 周六日禁用
+        disabledDate(t) {
+          if ([5, 6].includes(that.$moment(t).weekday())) {
+            return true;
+          } else {
+            return false;
+          }
+        },
+      };
+      return obj;
+    },
+  },
+  watch: {
+    "$route.query": {
+      handler(nval) {
+        this.selectDate = "";
+        this.getInfo();
+      },
+    },
+  },
+  data() {
+    return {
+      isPcShow: true,
+
+      isRefresh: false,
+
+      minDate: new Date("2000/01/01"),
+      currentDate: "", //
+      selectDate: "",
+
+      allClassifyTypeList: [],
+
+      pageLoading: false,
+      chartListState: {
+        BuyList: {
+          name: "多单",
+          labelName: "持多单量",
+        },
+        SoldList: {
+          name: "空单",
+          labelName: "持空单量",
+        },
+        CleanBuyList: {
+          name: "净多单",
+          labelName: "净多单量",
+        },
+        CleanSoldList: {
+          name: "净空单",
+          labelName: "净空单量",
+        },
+      },
+
+      tabKeys: [
+        { label: "多单", key: "BuyList" },
+        { label: "空单", key: "SoldList" },
+        { label: "净多单", key: "CleanBuyList" },
+        { label: "净空单", key: "CleanSoldList" },
+      ],
+      tabKey: "BuyList",
+      chartItemInfo: null,
+    };
+  },
+
+  methods: {
+    getAllClassifyType() {
+      apiPositionAnalysisList().then((res) => {
+        if (res.Ret !== 200) return;
+        const arr = res.Data || [];
+        // 将数据展开
+        arr.forEach((item) => {
+          item.Items &&
+            item.Items.forEach((itemC1) => {
+              itemC1.Items &&
+                itemC1.Items.forEach((itemC2) => {
+                  this.allClassifyTypeList.push({
+                    exchange: item.Exchange,
+                    classify_name: itemC1.ClassifyName,
+                    classify_type: itemC2.ClassifyType,
+                  });
+                });
+            });
+        });
+      });
+    },
+
+    handleClassifyTypeChange(type) {
+      if (!this.allClassifyTypeList.length) return;
+
+      const currentExchange = this.$route.query.exchange;
+      const currentClassifyName = this.$route.query.classify_name;
+      const currentClassifyType = this.$route.query.classify_type;
+      // 找index
+      let indexNum = 0;
+      this.allClassifyTypeList.forEach((item, index) => {
+        if (
+          item.exchange === currentExchange &&
+          item.classify_name === currentClassifyName &&
+          item.classify_type === currentClassifyType
+        )
+          indexNum = index;
+      });
+      // console.log(indexNum);
+      let obj = {};
+      if (type === "before") {
+        obj =
+          this.allClassifyTypeList[
+            indexNum === 0 ? this.allClassifyTypeList.length - 1 : indexNum - 1
+          ];
+      } else {
+        obj =
+          this.allClassifyTypeList[
+            indexNum === this.allClassifyTypeList.length - 1 ? 0 : indexNum + 1
+          ];
+      }
+      // console.log(obj);
+
+      this.$router.replace({
+        query: {
+          ...this.$route.query,
+          exchange: obj.exchange,
+          classify_name: obj.classify_name,
+          classify_type: obj.classify_type,
+        },
+      });
+      // window.location.reload();
+    },
+
+    //切换 前一天\后一天 如果遇到周六日则跳过
+    handleDateChange(type) {
+      let num = 1;
+      if (type === "before") {
+        if (this.$moment(this.selectDate).isoWeekday() === 1) {
+          //向前一天时 当前为周一则 跳到 上周五
+          num = 3;
+        }
+        this.selectDate = this.$moment(this.selectDate)
+          .add(-num, "days")
+          .format("YYYY-MM-DD");
+      } else {
+        if (this.$moment(this.selectDate).isoWeekday() === 5) {
+          //向前一天时 当前为周五则 跳到 下周一
+          num = 3;
+        }
+        this.selectDate = this.$moment(this.selectDate)
+          .add(num, "days")
+          .format("YYYY-MM-DD");
+      }
+
+      this.getInfo();
+    },
+
+    async getInfo() {
+      this.pageLoading = true;
+      const res = await apiPositionAnalysisInfo({
+        DataTime: this.selectDate || "",
+        ClassifyName: this.$route.query.classify_name,
+        ClassifyType: this.$route.query.classify_type,
+        Exchange: this.$route.query.exchange,
+      });
+      this.pageLoading = false;
+      if (res.Ret === 200) {
+        const obj = res.Data || {};
+        for (let key in this.chartListState) {
+          this.chartListState[key] = {
+            ...this.chartListState[key],
+            ...obj[key],
+          };
+        }
+        this.chartItemInfo = this.chartListState[this.tabKey];
+        if (res.Data.DataTime) {
+          this.selectDate = this.$moment(res.Data.DataTime).format(
+            "YYYY-MM-DD"
+          );
+        }
+
+        this.$store.commit(
+          "SET_TITLE",
+          `${this.$route.query.classify_type} ${this.$moment(
+            this.selectDate
+          ).format("YYYYMMDD")}持仓`
+        );
+      } else {
+        // 清空数据
+        for (let key in this.chartListState) {
+          this.chartListState[key].List = null;
+        }
+      }
+    },
+
+    getHandles(data) {
+      // 监听选择的日期改变
+      if (data.opt == "date") {
+        this.selectDate = data.val;
+        this.getInfo();
+      } else if (data.opt === "beforeDate") {
+        this.handleDateChange("before");
+      } else if (data.opt === "nextDate") {
+        this.handleDateChange("next");
+      } else if (data.opt === "beforeClassifyType") {
+        this.handleClassifyTypeChange("before");
+      } else if (data.opt === "nextClassifyType") {
+        this.handleClassifyTypeChange("next");
+      }
+    },
+  },
+
+  mounted() {
+    this.getAllClassifyType();
+    this.getInfo();
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.chart-position-analysis-page {
+  padding-bottom: calc(160px + constant(safe-area-inset-bottom));
+  padding-bottom: calc(160px + env(safe-area-inset-bottom));
+}
+.chart-wrap {
+  width: 100%;
+  margin-bottom: 60px;
+  .top-info-box {
+    padding: 0 34px 30px 34px;
+    text-align: center;
+    span {
+      display: inline-block;
+      margin-right: 50px;
+    }
+  }
+}
+.wrap-top {
+  display: flex;
+  justify-content: space-between;
+  margin-bottom: 20px;
+}
+.empty-wrap {
+  text-align: center;
+  padding: 150px 0;
+}
+
+// @media (min-width: 600px){
+.chart-position-analysis-page-pc {
+  padding: 0;
+  .top-sticky-wrap {
+    display: none;
+  }
+  .bot-fixed-wrap {
+    display: none;
+  }
+  .empty-wrap {
+    font-size: 16px;
+  }
+  .chart-wrap {
+    margin-bottom: 60px;
+    .top-info-box {
+      padding: 0 20px 20px;
+      text-align: center;
+      font-size: 20px;
+      span {
+        display: inline-block;
+        margin-right: 30px;
+      }
+    }
+  }
+}
+// }
+</style>

+ 139 - 0
src/views/positionAnalysis_manage/components/indexContent.vue

@@ -0,0 +1,139 @@
+<template>
+    <div class="index-content-wrap">
+        <div class="top-box">
+            <span style="margin-right:20px">{{num}}品种</span>
+            <span>{{time}}</span>
+        </div>
+        <div style="margin:30px 0">
+            <el-switch
+                v-model="isHistory"
+                size="large"
+                active-text="历史合约"
+            />
+        </div>
+        <div class="list-wrap">
+            <div class="item" v-for="item in clist" :key="item.ClassifyName">
+                <div class="label">{{item.ClassifyName}}</div>
+                <div style="flex:1">
+                    <div 
+                        class="opt" 
+                        v-for="_item in item.Items" 
+                        :key="_item.ClassifyType"
+                        @click="goDetail(_item,item)"
+                    >{{_item.ClassifyType}}</div>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+  props: {
+    num:Number,
+    time:String,
+    exchange:String,
+    now:String,
+    list:null
+  },
+  computed: {
+    clist() {
+      if(this.isHistory){
+          console.log('看历史');
+          return this.list
+      }
+
+      const now=this.$moment(this.now).format('YYMM')//当前时间
+      const arr=this.list?JSON.parse(JSON.stringify(this.list)):[]
+      let resArr=[]
+      if(this.exchange!='郑商所'){
+          resArr=arr.map(item=>{
+              item.Items=item.Items.filter(_item=>{
+                  const t=_item.ClassifyType.substr(-4)
+                  
+                  //15号之后过滤非当月合约
+				  return Number(this.now.substr(-2)) <= 15 ? Number(t)>=now : Number(t)>now;
+              })
+              return item
+          })
+      }else{
+          resArr=arr.map(item=>{
+              item.Items=item.Items.filter(_item=>{
+                  // 如果合约编号没有含日期 肯定是少于4位的 因为至少为一个字母加三位数的日期
+                  if(_item.ClassifyType.length<4) return true
+                  const t=2+_item.ClassifyType.substr(-3)
+                  
+                  return Number(this.now.substr(-2)) <= 15 ? Number(t)>=now : Number(t)>now;
+              })
+              return item
+          })
+      }
+
+      return resArr
+    }
+  },
+  data() {
+    return {
+      isHistory: false,
+
+    }
+  },
+
+  methods: {
+    goDetail(_item,item){
+      this.$router.push({
+          path:"/positionAnalysisDetail",
+          query:{
+              classify_name:item.ClassifyName,
+              classify_type:_item.ClassifyType,
+              exchange:this.exchange
+          }
+      })      
+    }
+  },
+
+  mounted() {
+
+  }
+}
+
+</script>
+
+<style lang="scss" scoped>
+@import '~@/styles/theme-vars.scss';
+.index-content-wrap{
+    .top-box{
+        background: #e6eefb;
+        padding: 15px 30px;
+        span{
+            display: inline-block;
+        }
+    }
+    .list-wrap{
+        padding: 30px 0;
+        .item{
+            margin-bottom: 40px;
+            display: flex;
+
+            .label{
+                color: #666;
+                width: 100px;
+                padding-top: 10px;
+                font-size: 14px;
+            }
+            .opt{
+                padding: 6px 10px;
+                min-width: 100px;
+                text-align: center;
+                display: inline-block;
+                margin-right: 20px;
+                margin-bottom: 20px;
+                background: #e6eefb;
+                border: 1px solid $theme-color;
+                border-radius: 4px;
+                cursor: pointer;
+            }
+        }
+    }
+}
+</style>

+ 110 - 0
src/views/positionAnalysis_manage/detail.vue

@@ -0,0 +1,110 @@
+<template>
+  <div class="hasrightaside-box position-analysis-detail-page">
+    <div class="detail-top">
+      <span></span>
+      <div>
+        <el-button type="primary" @click="refreshData" plain>一键刷新</el-button>
+        <el-button type="primary" @click="handleOpt('beforeClassifyType')">上一个合约</el-button>
+        <el-button type="primary" @click="handleOpt('nextClassifyType')">下一个合约</el-button>
+      </div>
+    </div>
+    <div class="content-box detail-content">
+        <chartDetail ref="chartDetailRef"/>
+    </div>
+   
+  </div>
+</template>
+
+<script>
+import chartDetail from './components/chartDetail.vue'
+export default {
+  components: { chartDetail },
+  data() {
+    return {
+    }
+  },
+
+  methods: {
+    // 操作选项
+    handleOpt(type){
+        let obj={}
+        if(type==='date'){
+            obj={
+                opt:type,
+                val:this.selectDate
+            }
+        }else if(type==='beforeDate'){
+            obj={
+                opt:type
+            }
+        }else if(type==='nextDate'){
+            obj={
+                opt:type
+            }
+        }else if(type==='beforeClassifyType'){
+            obj={
+                opt:type
+            }
+        }else if(type==='nextClassifyType'){
+            obj={
+                opt:type
+            }
+        }
+        this.$refs.chartDetailRef&&this.$refs.chartDetailRef.getHandles(obj);
+    },
+
+    refreshData() {
+      if(this.$refs.chartDetailRef) {
+        this.$refs.chartDetailRef.selectDate=''
+        this.$refs.chartDetailRef.getInfo()  
+      }
+    }
+  },
+
+  mounted() {
+  }
+}
+
+</script>
+
+<style lang="scss">
+    .el-date-editor--date{
+        width: 180px !important;
+        .el-input__wrapper{
+            background: #F6F6F6;
+            border: 1px solid #EBEBEB;
+            border-radius: 20px;
+            height: 40px;
+            box-shadow: none;
+        }
+    }
+    .position-analysis-detail-page-dialog{
+        .el-dialog__header{
+            border-bottom: 1px solid #E9E9E9;
+            margin-right: 0;
+        }
+
+    }
+</style>
+
+<style lang="scss" scoped>
+@import '~@/styles/theme-vars.scss';
+.position-analysis-detail-page{
+  min-height: calc(100vh - 410px);
+  .detail-top {
+    padding: 20px;
+    margin-bottom: 20px;
+    background: #fff;
+    border: 1px solid #ececec;
+    border-radius: 4px;
+    box-shadow: 0 3px 6px rgba(0,0,0,.05);
+    display: flex;
+    justify-content: space-between;
+  }
+  .detail-content {
+    padding: 20px;
+    background: #fff;
+    border-right: 2px solid #F2F2F2;
+  }
+}
+</style>

+ 82 - 0
src/views/positionAnalysis_manage/list.vue

@@ -0,0 +1,82 @@
+<template>
+    <div class="position-analysis-index-page" v-loading="loading" element-loading-text="Loading...">
+        <el-tabs 
+            class="tabs-wrap"
+            v-model="activeType"
+        >
+            <el-tab-pane 
+                v-for="item in list"
+                :key="item.Exchange"
+                :label="item.Exchange" 
+                :name="item.Exchange"
+            >
+                <indexContent 
+                  :list="item.Items" 
+                  :num="item.Num" 
+                  :time="item.DataTime" 
+                  :exchange="item.Exchange"
+                  :now="item.CurrDate"
+                />
+            </el-tab-pane>
+        </el-tabs>
+    </div>
+</template>
+
+<script>
+import {apiPositionAnalysisList} from '@/api/modules/positionAnalysis'
+import indexContent from './components/indexContent.vue'
+export default {
+  components: { indexContent },
+  data() {
+    return {
+      activeType: '',
+      list: [],
+      loading: false,
+
+    }
+  },
+
+  methods: {
+    getList(){
+      this.loading=true
+      apiPositionAnalysisList().then(res=>{
+          this.loading=false
+          if(res.Ret!==200) return
+          this.list=res.Data||[]
+          this.activeType=res.Data[0]&&res.Data[0].Exchange
+      })
+    }
+  },
+
+  mounted() {
+    this.getList()
+  }
+}
+
+
+
+</script>
+
+<style lang="scss" scoped>
+.position-analysis-index-page{
+    min-height: 60vh;
+    padding: 20px;
+    background: #fff;
+    border: 1px solid #ececec;
+    border-radius: 4px;
+    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.05);
+    .tabs-wrap{
+        .el-tabs__nav-wrap::after{
+            display: none;
+        }
+        .el-tabs__item{
+            font-size: 16px;
+        }
+    }
+}
+</style>
+<style lang="scss">
+.position-analysis-index-page {
+  .el-tabs__nav-wrap::after { background-color: transparent; }
+}  
+</style>

+ 23 - 3
src/views/ppt_manage/mixins/mixins.js

@@ -185,6 +185,26 @@ export default {
         series: data,
         yAxis: ydata
       };
+
+       //滚动相关性独立tooltip
+      if(this.chartInfo.Source === 4) {
+        const { LeadValue,LeadUnit } = this.relevanceChartData.CorrelationChartInfo;
+        let relevanceUnitEnMap = this.relevanceUnitEnMap;
+        this.options.tooltip = {
+          formatter: function() {
+            let str = `${Highcharts.dateFormat('%Y/%m/%d',this.x)}<br><p>相关性系数:${this.y.toFixed(4)}</p><br><p>领先${LeadValue+LeadUnit}</p>`
+            return str
+          },
+          formatterCh: function() {
+            let str = `${Highcharts.dateFormat('%Y/%m/%d',this.x)}<br><p>相关性系数:${this.y.toFixed(4)}</p><br><p>领先${LeadValue+LeadUnit}</p>`
+            return str
+          },
+          formatterEn: function() {
+            let str = `${Highcharts.dateFormat('%Y/%m/%d',this.x)}<br><p>Correlation coefficient:${this.y.toFixed(4)}</p><br><p>lead${LeadValue+relevanceUnitEnMap[LeadUnit]}</p>`
+            return str
+          }
+        }
+      }
     },
 
     /* 堆叠柱 堆叠面积 组合图 */
@@ -970,11 +990,11 @@ export default {
           },
           align: 'center',
         },
-        min: -1,
-        max: 1,
+        // min: -1,
+        // max: 1,
         opposite: false,
         tickWidth: 1,
-        tickInterval:0.2,
+        // tickInterval:0.2,
       }
 
       //处理series

+ 11 - 9
src/views/ppt_manage/mixins/pptMixins.js

@@ -144,7 +144,7 @@ export default {
         this.dataList = [Data.EdbInfoList[0]];
         this.initCommodityData(res.Data)
         this.setCommodityLang(currentLang)
-      }else if([3,4].includes(this.chartInfo.Source)){
+      }else if([3].includes(this.chartInfo.Source)){//相关性
         this.relevanceChartData={
             ChartInfo:res.Data.ChartInfo,
 						EdbInfoList:res.Data.EdbInfoList,
@@ -161,6 +161,14 @@ export default {
         }
         this.initRelevanceChartData()
         this.changeRelevanceOptions(currentLang)
+      }else if(this.chartInfo.Source===4) {//滚动相关性换成曲线图绘图
+        this.dataList = [res.Data.DataResp];
+        this.relevanceChartData = {
+          CorrelationChartInfo: res.Data.CorrelationChartInfo
+        }
+        this.setDefaultChart([res.Data.DataResp]);
+        this.changeRelevanceOptions(currentLang)
+
       }else if([6,7,8].includes(this.chartInfo.Source)) {
         //拟合方程 标准差 百分比
         this.dataList = [res.Data.DataResp];
@@ -451,12 +459,6 @@ export default {
 
         if(!$(`#${refName}`)[0]) return
 
-        // 相关性图表判断当前图区域大小 动态设置x轴offset
-        if(options.isRelevanceChart){
-          const h=($(`#${refName}`)[0].offsetHeight-100)/2
-          options.xAxis.offset=-h
-        }
-
         if(is_linear)
           Highcharts.chart({
             // Highcharts 配置
@@ -529,7 +531,7 @@ export default {
     //加载iframe
     initSheetIframe(idName,sheetId){
       console.log('init sheet iframe',idName)
-      const LINK_URL = process.env.SHEET_LINK;
+      const LINK_URL = this.$setting.dynamicOutLinks.ChartViewUrl+'/sheetshow';
       $(`#${idName}`).append(`<iframe 
           src='${LINK_URL}?code=${sheetId}' 
           width='100%'
@@ -541,7 +543,7 @@ export default {
     },
     //获取表格iframe的高度,用于ppt转报告
     reInitIframe(e) {
-      const LINK_URLS=[process.env.CHART_LINK,process.env.SHEET_LINK]
+      const LINK_URLS=[this.$setting.dynamicOutLinks.ChartViewUrl+'/chartshow',this.$setting.dynamicOutLinks.ChartViewUrl+'/sheetshow']
       if(!LINK_URLS.includes(e.origin)) return
       /* console.log('iframe加载完成',e.data) */
       const { height,code } = e.data;

+ 48 - 8
src/views/ppt_manage/newVersion/pptCatalog.vue

@@ -9,8 +9,10 @@
       </span>
     <div class="list-wrap ppt-page-wrap" id="left" v-show="!isSlideLeft">
       <div class="add-btn">
-        <el-button type="primary" @click="handleChooseCatalog('add')">添加ppt</el-button>
-        <el-button type="primary" plain @click="handleOpenMergeDialog">合并ppt</el-button>
+        <el-button type="primary" v-permission="permissionBtn.pptPermission.ppt_save"
+            @click="handleChooseCatalog('add')">添加ppt</el-button>
+        <el-button v-permission="permissionBtn.pptPermission.ppt_merge"
+            type="primary" plain @click="handleOpenMergeDialog">合并ppt</el-button>
       </div>
       <div class="select-wrap">
         <el-select
@@ -59,6 +61,7 @@
                   style="display: flex; align-items: center"
                 >
                   <i class="el-icon-document-copy"
+                    v-permission="permissionBtn.pptPermission.ppt_copy"
                     style="display:inline-block;width: 14px; height: 14px; margin-right: 8px;color:#409eff;"
                     v-show="(data.copyIconShow&&data.PptVersion===2)||checkNode(data)"
                     @click.stop="handleCopy(data)"
@@ -120,17 +123,21 @@
                     </el-dropdown-item>
                   </el-dropdown-menu>
                 </el-dropdown>
-                <el-dropdown @command="handleOperateCommand" trigger="click">
+                <el-dropdown @command="handleOperateCommand" trigger="click" v-if="checkDropDownShow(data.PptVersion===2?'ppt':'catalog')">
                   <span class="el-dropdown-link"> 
                     <i class="el-icon-more" style="font-size: 16px;transform: rotate(90deg);cursor: pointer"/>
                   </span>
                   <el-dropdown-menu slot="dropdown">
-                    <el-dropdown-item :command="{key:'copy',item:data}" v-if="(data.PptVersion&&data.PptVersion===2)||(data.GroupId&&!data.OnlyOld)">复制</el-dropdown-item>
-                    <el-dropdown-item :command="{key:'edit',item:data}" v-if="data.GroupId">重命名</el-dropdown-item>
-                    <el-dropdown-item :command="{key:'del',item:data}">删除</el-dropdown-item>
+                    <el-dropdown-item v-permission="permissionBtn.pptPermission.ppt_copy"
+                        :command="{key:'copy',item:data}" v-if="(data.PptVersion&&data.PptVersion===2)||(data.GroupId&&!data.OnlyOld)">复制</el-dropdown-item>
+                    <el-dropdown-item v-permission="permissionBtn.pptPermission.ppt_save"
+                        :command="{key:'edit',item:data}" v-if="data.GroupId">重命名</el-dropdown-item>
+                    <el-dropdown-item v-permission="permissionBtn.pptPermission.ppt_del"
+                        :command="{key:'del',item:data}">删除</el-dropdown-item>
                     <el-dropdown-item :command="{key:'openShare',item:data}" v-if="data.PptVersion && !data.IsGrant">设置共享</el-dropdown-item>
                     <el-dropdown-item :command="{key:'cancelShare',item:data}" v-if="data.PptVersion && data.IsGrant">取消共享</el-dropdown-item>
-                    <el-dropdown-item :command="{key:'transform',item:data}">转英文PPT</el-dropdown-item>
+                    <el-dropdown-item v-permission="permissionBtn.pptPermission.ppt_toEn"
+                        :command="{key:'transform',item:data}">转英文PPT</el-dropdown-item>
                   </el-dropdown-menu>
                 </el-dropdown>
                 </span>
@@ -540,6 +547,27 @@ export default {
           i.label = labelName
         }
       })
+      //crm14.1 根据权限按钮对pptToolList做进一步的filter
+      const {checkPermissionBtn,pptPermission} = this.permissionBtn
+      const authMap = {
+          'publish':checkPermissionBtn(pptPermission.ppt_publish),
+          'present':checkPermissionBtn(pptPermission.ppt_show),
+          'download':checkPermissionBtn(pptPermission.ppt_download),
+          'transform':checkPermissionBtn(pptPermission.ppt_toReport),
+          'transEn':checkPermissionBtn(pptPermission.ppt_toEn),
+          'edit':checkPermissionBtn(pptPermission.ppt_save),
+          'copy':checkPermissionBtn(pptPermission.ppt_copy),
+          'delete':checkPermissionBtn(pptPermission.ppt_del),
+      }
+      let authArr = []
+      for(let k in authMap){
+          if(authMap[k]){
+            authArr.push(k)
+          }
+      }
+      this.pptToolList = this.pptToolList.filter((i)=>{
+          return authArr.includes(i.key)
+        })
     },
     //判断公共目录按钮是否显示
     checkNode(data){
@@ -1203,7 +1231,19 @@ export default {
       })
       if(res.Ret!==200) return
       this.$message.success('批量转英文PPT成功')
-    }
+    },
+    //如果下拉框一个选项都没有,就不显示下拉框按钮
+    checkDropDownShow(type){
+        const {pptPermission,checkPermissionBtn} = this.permissionBtn
+        if(type==='catalog'){
+            return checkPermissionBtn(pptPermission.ppt_copy)||
+                   checkPermissionBtn(pptPermission.ppt_save)||
+                   checkPermissionBtn(pptPermission.ppt_del)||
+                   checkPermissionBtn(pptPermission.ppt_toEn)
+        }
+        //如果是PPT,会有设置共享按钮,下拉框至少会有一个选项
+        return true
+    },
   },
   mounted(){
     this.getCatalogsList('load')

+ 2 - 1
src/views/ppt_manage/newVersion/pptEditor.vue

@@ -108,7 +108,8 @@
         </div>
         <div class="ppt-tool flex-column">
             <div class="tool-btn">
-                <el-button type="primary" @click="handlePublish">去发布</el-button>
+                <el-button v-permission="permissionBtn.pptPermission.ppt_publish"
+                 type="primary" @click="handlePublish">去发布</el-button>
                 <el-button @click="handleSave('save')">保存</el-button>
                 <el-button type="text" @click="handleChangeEditModal"><i class="el-icon-sort" style="transform: rotate(90deg);margin-right:5px;"></i>{{isEditLayer?'ppt编辑':'图层编辑'}}</el-button>
             </div>

+ 44 - 6
src/views/ppt_manage/newVersion/pptEnCatalog.vue

@@ -9,8 +9,10 @@
       </span>
     <div class="list-wrap ppt-page-wrap" id="left" v-show="!isSlideLeft">
       <div class="add-btn">
-        <el-button type="primary" @click="handleChooseCatalog('add')">添加ppt</el-button>
-        <el-button type="primary" plain @click="handleOpenMergeDialog">合并ppt</el-button>
+        <el-button type="primary" v-permission="permissionBtn.enPPTPermission.pptEn_save"
+        @click="handleChooseCatalog('add')">添加ppt</el-button>
+        <el-button v-permission="permissionBtn.enPPTPermission.pptEn_merge"
+            type="primary" plain @click="handleOpenMergeDialog">合并ppt</el-button>
       </div>
       <div class="select-wrap">
         <el-select
@@ -58,6 +60,7 @@
                   style="display: flex; align-items: center"
                 >
                   <i class="el-icon-document-copy"
+                    v-permission="permissionBtn.enPPTPermission.pptEn_copy"
                     style="display:inline-block;width: 14px; height: 14px; margin-right: 8px;color:#409eff;"
                     v-show="(data.copyIconShow&&data.PptId)||checkNode(data)"
                     @click.stop="handleCopy(data)"
@@ -117,14 +120,17 @@
                     </el-dropdown-item>
                   </el-dropdown-menu>
                 </el-dropdown>
-                <el-dropdown @command="handleOperateCommand" trigger="click">
+                <el-dropdown @command="handleOperateCommand" trigger="click" v-if="checkDropDownShow(data.PptId?'ppt':'catalog')">
                   <span class="el-dropdown-link"> 
                     <i class="el-icon-more" style="font-size: 16px;transform: rotate(90deg);cursor: pointer"/>
                   </span>
                   <el-dropdown-menu slot="dropdown">
-                    <el-dropdown-item :command="{key:'copy',item:data}" v-if="data.GroupId||data.PptId">复制</el-dropdown-item>
-                    <el-dropdown-item :command="{key:'edit',item:data}" v-if="data.GroupId">重命名</el-dropdown-item>
-                    <el-dropdown-item :command="{key:'del',item:data}">删除</el-dropdown-item>
+                    <el-dropdown-item v-permission="permissionBtn.enPPTPermission.pptEn_copy"
+                        :command="{key:'copy',item:data}" v-if="data.GroupId||data.PptId">复制</el-dropdown-item>
+                    <el-dropdown-item v-permission="permissionBtn.enPPTPermission.pptEn_save"
+                        :command="{key:'edit',item:data}" v-if="data.GroupId">重命名</el-dropdown-item>
+                    <el-dropdown-item v-permission="permissionBtn.enPPTPermission.pptEn_del"
+                        :command="{key:'del',item:data}">删除</el-dropdown-item>
                     <el-dropdown-item :command="{key:'openShare',item:data}" v-if="data.PptId && !data.IsGrant">设置共享</el-dropdown-item>
                     <el-dropdown-item :command="{key:'cancelShare',item:data}" v-if="data.PptId && data.IsGrant">取消共享</el-dropdown-item>
                   </el-dropdown-menu>
@@ -509,6 +515,28 @@ export default {
           i.label = labelName
         }
       })
+
+      //crm14.1 根据权限按钮对pptToolList做进一步的filter
+      const {checkPermissionBtn,enPPTPermission} = this.permissionBtn
+      const authMap = {
+          'publish':checkPermissionBtn(enPPTPermission.pptEn_publish),
+          'present':checkPermissionBtn(enPPTPermission.pptEn_show),
+          'download':checkPermissionBtn(enPPTPermission.pptEn_download),
+          'transform':checkPermissionBtn(enPPTPermission.pptEn_toReport),
+          'edit':checkPermissionBtn(enPPTPermission.pptEn_save),
+          'copy':checkPermissionBtn(enPPTPermission.pptEn_copy),
+          'delete':checkPermissionBtn(enPPTPermission.pptEn_del),
+      }
+      let authArr = []
+      for(let k in authMap){
+          if(authMap[k]){
+            authArr.push(k)
+          }
+      }
+      this.pptToolList = toolList.filter((i)=>{
+          return authArr.includes(i.key)
+        })
+
     },
     //判断公共目录按钮是否显示
     checkNode(data){
@@ -1100,6 +1128,16 @@ export default {
         }
       })
 
+    },
+    checkDropDownShow(type){
+        const {enPPTPermission,checkPermissionBtn} = this.permissionBtn
+        if(type==='catalog'){
+            return checkPermissionBtn(enPPTPermission.pptEn_copy)||
+                   checkPermissionBtn(enPPTPermission.pptEn_save)||
+                   checkPermissionBtn(enPPTPermission.pptEn_del)
+        }
+        //如果是PPT,会有设置共享按钮,下拉框至少会有一个选项
+        return true
     }
   },
   mounted(){

+ 2 - 1
src/views/ppt_manage/newVersion/pptEnEditor.vue

@@ -105,7 +105,8 @@
         </div>
         <div class="ppt-tool flex-column">
             <div class="tool-btn">
-                <el-button type="primary" @click="handlePublish">去发布</el-button>
+                <el-button v-permission="permissionBtn.enPPTPermission.pptEn_publish"
+                 type="primary" @click="handlePublish">去发布</el-button>
                 <el-button @click="handleSave('save')">保存</el-button>
                 <el-button type="text" @click="handleChangeEditModal"><i class="el-icon-sort" style="transform: rotate(90deg);margin-right:5px;"></i>{{isEditLayer?'ppt编辑':'图层编辑'}}</el-button>
             </div>

+ 2 - 1
src/views/predictEdb_manage/components/chartInfo.vue

@@ -30,7 +30,8 @@
                     @change="seasonYearChange"
                 />
             </template>
-            <span class="change-chart-btn" @click="chartTypeChange">切换{{chartInfo.ChartType==1?'季节性图':'曲线图'}}</span>
+            <span v-permission="permissionBtn.predictEdbPermission.edbPreData_switchSeason"
+                class="change-chart-btn" @click="chartTypeChange">切换{{chartInfo.ChartType==1?'季节性图':'曲线图'}}</span>
         </div>
         <div class="chartWrapper">
             <Chart 

+ 35 - 21
src/views/predictEdb_manage/predictEdb.vue

@@ -10,9 +10,12 @@
 		<div class="predict-edb-main" id="box">
       <div class="main-left left" id="left" v-show="!isSlideLeft">
 				<div class="datasheet_top">
-						<el-button type="primary" @click="addEdbHandle">添加指标</el-button>
-						<el-button type="primary" @click="addComputedHandler" style="margin-right:10px;">计算指标</el-button>
-						<change-lang :lang="currentLang" style="height: 32px;" @changeLang="changeLangHandle"/>
+						<el-button v-permission="permissionBtn.predictEdbPermission.edbPreData_addEdb"
+							type="primary" @click="addEdbHandle">添加指标</el-button>
+						<el-button v-permission="permissionBtn.predictEdbPermission.edbPreData_calcuEdb"
+							type="primary" @click="addComputedHandler" style="margin-right:10px;">计算指标</el-button>
+						<change-lang v-permission="permissionBtn.predictEdbPermission.edbPreData_switchEn"
+							:lang="currentLang" style="height: 32px;" @changeLang="changeLangHandle"/>
 				</div>
 				<div class="search-cont" v-loading="searchLoading">
 					<el-select
@@ -167,17 +170,26 @@
 					<div class="detail-top">
 						<span class="title">{{ currentLang==='en'?(edb_nameEn||edbName):edbName }}</span>
 						<ul class="action-ul">
-							<li class="editsty" @click="clickEdbNameHandle" v-if="currentLang==='ch'||!edb_nameEn">
+							<li v-permission="permissionBtn.predictEdbPermission.edbPreData_enNameSetting"
+								class="editsty" @click="clickEdbNameHandle" v-if="currentLang==='ch'||!edb_nameEn">
 								设置英文名称
 							</li>
-							<li class="editsty" @click="isLookHistory=true;lookEdbId=select_id">指标溯源</li>
-							<li class="editsty" @click="updateEdbPartHandle">更新</li>
-							<li class="editsty" @click="editEdbHandle('')" v-if="edbButton.OpButton">编辑</li>
-							<li class="editsty" @click="saveEdbHandle" v-if="detail_show_chart">保存</li>
-							<li class="editsty" @click="updateEdbHandle">重新计算</li>
-							<li class="deletesty" @click="delEdbHandle" v-if="edbButton.DeleteButton">删除</li>
-							<li class="editsty" @click="copyData">复制数据</li>
-							<li class="editsty" @click="detail_show_chart=!detail_show_chart">{{detail_show_chart ? '查看数据' : '查看图表'}} </li>
+							<li v-permission="permissionBtn.predictEdbPermission.edbPreData_edbSource"
+								class="editsty" @click="isLookHistory=true;lookEdbId=select_id">指标溯源</li>
+							<li v-permission="permissionBtn.predictEdbPermission.edbPreData_update"
+								class="editsty" @click="updateEdbPartHandle">更新</li>
+							<li class="editsty" @click="editEdbHandle('')" 
+								v-if="edbButton.OpButton&&permissionBtn.checkPermissionBtn(permissionBtn.predictEdbPermission.edbPreData_edit)">编辑</li>
+							<li class="editsty" @click="saveEdbHandle" 
+								v-if="detail_show_chart&&permissionBtn.checkPermissionBtn(permissionBtn.predictEdbPermission.edbPreData_save)">保存</li>
+							<li v-permission="permissionBtn.predictEdbPermission.edbPreData_recalcu"
+								class="editsty" @click="updateEdbHandle">重新计算</li>
+							<li class="deletesty" @click="delEdbHandle" 
+								v-if="edbButton.DeleteButton&&permissionBtn.checkPermissionBtn(permissionBtn.predictEdbPermission.edbPreData_del)">删除</li>
+							<li v-permission="permissionBtn.predictEdbPermission.edbPreData_copyData"
+								class="editsty" @click="copyData">复制数据</li>
+							<li v-permission="permissionBtn.predictEdbPermission.edbPreData_viewData"
+								class="editsty" @click="detail_show_chart=!detail_show_chart">{{detail_show_chart ? '查看数据' : '查看图表'}} </li>
 						</ul>
 					</div>
 
@@ -545,7 +557,7 @@ export default {
 				{ name: '同比值',type: 32 },
 				{ name: '同差值',type: 33 },
 				{ name: 'N数值移动平均计算',type: 39 },
-				{ name: '累计值转月/季值',type: 'toMonthSeason' },
+				{ name: '累计值转月/季值',type: 'toMonthSeason' },
 				{ name: 'N数值环比值',type: 43 },
 				{ name: 'N数值环差值',type: 44 },
 				{ name: '升频',type: 45 },
@@ -565,7 +577,7 @@ export default {
 				{ name: 'N数值环比值',type: 43 },
 				{ name: 'N数值环差值',type: 44 },
 				{ name: '升频',type: 45 },
-				{ name: '累计值转月/季值',type: 'toMonthSeason' },
+				{ name: '累计值转月/季值',type: 'toMonthSeason' },
 				{ name: '累计值',type: 'accumulate' }
 			],
       isOnlyMe:false,//只看我的
@@ -1301,6 +1313,7 @@ export default {
 }
 </script>
 <style lang='scss' scoped>
+@import "~@/styles/theme-vars.scss";
 *{ box-sizing: border-box;}
 $mini-font: 12px; $normal-font: 14px;
 .predictEdb-container {
@@ -1372,7 +1385,7 @@ $mini-font: 12px; $normal-font: 14px;
 						margin-right: 2px;
 					}
 					.el-icon-view {
-						color: #409EFF;
+						color: #409eff;
 						font-size: 18px;
 						margin-left: 5px;
 					}
@@ -1383,7 +1396,7 @@ $mini-font: 12px; $normal-font: 14px;
 				display: flex;
 				align-items: center;
 				justify-content: center;
-				color: #409eff;
+				color: $theme-color;
 				font-size: 16px;
 				cursor: pointer;
 			}
@@ -1494,7 +1507,7 @@ $mini-font: 12px; $normal-font: 14px;
 								cursor: pointer;
 							}
 							.join_txt {
-								color: #409eff;
+								color: $theme-color;
 								cursor: pointer;
 							}
 						}
@@ -1517,7 +1530,7 @@ $mini-font: 12px; $normal-font: 14px;
 		.cpmputed-li {
 			width: 180px;
 			padding: 19px 0;
-			color: #409EFF;
+			color: $theme-color;
 			font-size: 16px;
 			background:#ECF5FF;
 			border-radius: 8px;
@@ -1530,11 +1543,11 @@ $mini-font: 12px; $normal-font: 14px;
 				margin-right:0;
 			}
 			&:hover {
-				background: #409EFF;
+				background: $theme-color;
 				color: #fff;
 			}
 			&.act {
-				background: #409EFF;
+				background: $theme-color;
 				color: #fff;
 			}
 		}
@@ -1543,6 +1556,7 @@ $mini-font: 12px; $normal-font: 14px;
 </style>
 
 <style lang="scss">
+@import "~@/styles/theme-vars.scss";
 .predictEdb-container {
 	.label-input .el-input__inner {
 		height: 25px;
@@ -1556,7 +1570,7 @@ $mini-font: 12px; $normal-font: 14px;
 
 	.el-tree__drop-indicator{
 		height:3px;
-		background-color:#409EFF;
+		background-color: $theme-color;
 	}
 	.el-tree-node__content {
 		margin-bottom: 14px !important;

+ 12 - 5
src/views/report_manage/addreportNew.vue

@@ -34,7 +34,7 @@
 				>
 					一键刷新
 				</el-button>
-				<el-button
+				<el-button v-permission="permissionBtn.reportManageBtn.reportManage_reportView"
 					type="primary"
 					size="medium"
 					plain
@@ -48,7 +48,7 @@
 					@click.native="clickreportadd('cg')"
 					>存草稿</el-button
 				>
-				<el-button
+				<el-button v-permission="permissionBtn.reportManageBtn.reportManage_publish"
 					type="primary"
 					size="medium"
 					@click.native="clickreportadd('dsfb')"
@@ -600,6 +600,7 @@ export default {
 			if (tp == 'fb') {
 				this.isPublishloading = true;
 			}
+			const isPost = this.permissionBtn.checkPermissionBtn(this.permissionBtn.reportManageBtn.reportManage_sendMsg)
 			// 如果已经添加过就修改 否则新增
 			if (this.isAddEnter) {
 				let params2 = {
@@ -632,7 +633,7 @@ export default {
 					if(hasTel==1){
 						this.isMessagePost = false; 
 						this.reporteditMsg(params2,tp)
-					}else{
+					}else if(isPost){
 						this.$confirm('发布后,是否推送模板消息?', '发布提示', {
 								confirmButtonText: '推送',
 								cancelButtonText: '不推送',
@@ -654,6 +655,9 @@ export default {
 									done()
 								}
 						})
+					}else{
+						this.isMessagePost = false;
+						this.reporteditMsg(params2,tp)
 					}
 					
 				}else {
@@ -666,7 +670,7 @@ export default {
 					if(hasTel==1){
 						this.isMessagePost = false; 
 						this.reportaddMsg(params,tp)
-					}else{
+					}else if(isPost){
 						this.$confirm('发布后,是否推送模板消息?', '发布提示', {
 								confirmButtonText: '推送',
 								cancelButtonText: '不推送',
@@ -689,6 +693,9 @@ export default {
 									done()
 								}
 						})
+					}else{
+						this.isMessagePost = false;
+						this.reportaddMsg(params,tp)
 					}
 						
 				}else {
@@ -770,7 +777,7 @@ export default {
 			}
 			//插入内容
 			let htmlStr=''
-			const LINK_CHART_URL = process.env.CHART_LINK;
+			const LINK_CHART_URL = this.$setting.dynamicOutLinks.ChartViewUrl+'/chartshow';
 			
 			data.forEach(item=>{
 				const t=new Date().getTime()

+ 28 - 8
src/views/report_manage/cloudDisk.vue

@@ -6,13 +6,17 @@
         style="width: 317px;" placeholder="请输入关键字" clearable @input="getFileList(null,0)" ></el-input>
       </div>
       <div class="button-zone" v-show="tableSelection && tableSelection.length!=0">
-        <el-button class="download-button" @click="downloadBatch">下载</el-button>
-        <el-button type="danger" style="min-width: 112px;" @click="removeBatch" v-if="buttonPermission.batchDelete">删除</el-button>
+        <el-button v-permission="permissionBtn.cloudDisk.cloudDisk_download"
+            class="download-button" @click="downloadBatch">下载</el-button>
+        <el-button v-permission="permissionBtn.cloudDisk.cloudDisk_del"
+            type="danger" style="min-width: 112px;" @click="removeBatch" v-if="buttonPermission.batchDelete">删除</el-button>
       </div>
       <div class="button-zone" v-show="(!tableSelection || tableSelection.length==0) && keyword==''">
-        <el-button type="primary" @click="newFloder" v-if="buttonPermission.createMenuAuth">新建文件夹</el-button>
+        <el-button type="primary" v-permission="permissionBtn.cloudDisk.cloudDisk_newDir"
+            @click="newFloder" v-if="buttonPermission.createMenuAuth">新建文件夹</el-button>
         <template v-if="buttonPermission.uploadResourceAuth">
-          <el-button type="primary" style="min-width: 112px;" 
+          <el-button v-permission="permissionBtn.cloudDisk.cloudDisk_uploadFile"
+          type="primary" style="min-width: 112px;" 
           @click="uploadFilePre" :loading="isUploading">上传文件</el-button>
           <el-upload
             action="#"
@@ -74,14 +78,18 @@
           </el-table-column>
           <el-table-column width="40">
             <template slot-scope="{row}" >
-              <el-dropdown @command="(type)=>handleCommand(type,row)" class="more-operation" >
+              <el-dropdown v-if="isDropDownShow"
+                @command="(type)=>handleCommand(type,row)" class="more-operation" >
                 <span class="el-dropdown-link" @click="(e)=> e.stopPropagation()">
                   <i class="el-icon-more el-icon--right" style="font-size: 24px;cursor: pointer;"></i>
                 </span>
                 <el-dropdown-menu slot="dropdown">
-                  <el-dropdown-item command="rename" v-if="row.ButtonAuth.RenameAuth">重命名</el-dropdown-item>
-                  <el-dropdown-item command="download">下载</el-dropdown-item>
-                  <el-dropdown-item command="remove"><span style="color:#D1433A ;" v-if="row.ButtonAuth.DelAuth" >删除</span></el-dropdown-item>
+                  <el-dropdown-item command="rename" v-permission="permissionBtn.cloudDisk.cloudDisk_rename"
+                    v-if="row.ButtonAuth.RenameAuth">重命名</el-dropdown-item>
+                  <el-dropdown-item command="download" v-permission="permissionBtn.cloudDisk.cloudDisk_download"
+                    >下载</el-dropdown-item>
+                  <el-dropdown-item command="remove" v-permission="permissionBtn.cloudDisk.cloudDisk_del"
+                    ><span style="color:#D1433A ;" v-if="row.ButtonAuth.DelAuth" >删除</span></el-dropdown-item>
                 </el-dropdown-menu>
               </el-dropdown>
             </template>
@@ -199,6 +207,18 @@ import 'streamsaver/examples/zip-stream'
         }
       }
     },
+    computed:{
+        //是否展示el-dropdown
+        isDropDownShow(){
+            return this.permissionBtn.checkPermissionBtn(
+                this.permissionBtn.cloudDisk.cloudDisk_rename
+            )||this.permissionBtn.checkPermissionBtn(
+                this.permissionBtn.cloudDisk.cloudDisk_download
+            )||this.permissionBtn.checkPermissionBtn(
+                this.permissionBtn.cloudDisk.cloudDisk_del
+            )
+        }
+    },
     methods:{
       // 获取文件夹dom树
       getMenuTree(){

+ 2 - 1
src/views/report_manage/dayOrWeek.vue

@@ -64,7 +64,8 @@
                 </div>
                 <div>
                     <el-button type="primary" style="width:120px" @click="handleEditDayWeekReport">保存</el-button>
-                    <el-button type="primary" style="width:120px" @click="handlePublishValid">发布</el-button>
+                    <el-button v-if="permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_publish)"
+                        type="primary" style="width:120px" @click="handlePublishValid">发布</el-button>
                 </div>
             </section>
         </el-form>

+ 1 - 1
src/views/report_manage/editChapterReport.vue

@@ -740,7 +740,7 @@ export default {
       }
       //插入内容
       let htmlStr = "";
-      const LINK_CHART_URL = process.env.CHART_LINK;
+      const LINK_CHART_URL = this.$setting.dynamicOutLinks.ChartViewUrl+'/chartshow';
 
       data.forEach((item) => {
         const t = new Date().getTime();

+ 8 - 4
src/views/report_manage/editreportNew.vue

@@ -34,7 +34,7 @@
 				>
 					一键刷新
 				</el-button>
-				<el-button
+				<el-button v-permission="permissionBtn.reportManageBtn.reportManage_reportView"
 					type="primary"
 					size="medium"
 					plain
@@ -48,7 +48,7 @@
 					@click.native="clickreportadd('cg')"
 					>存草稿</el-button
 				>
-				<el-button
+				<el-button v-permission="permissionBtn.reportManageBtn.reportManage_publish"
 					type="primary"
 					size="medium"
 					@click.native="clickreportadd('dsfb')"
@@ -620,6 +620,7 @@ export default {
 				window.open(href, '_blank');
 				return false;
 			}
+			const isPost = this.permissionBtn.checkPermissionBtn(this.permissionBtn.reportManageBtn.reportManage_sendMsg)
 			if (tp == 'fb') {
 				this.isPublishloading = true;
 				// 判断是否要推送客群
@@ -643,7 +644,7 @@ export default {
 				if(hasTel==1||this.ThsMsgIsSend==1){
 					this.isMessagePost = false; 
 					this.reporteditMsg(params,tp)
-				}else{
+				}else if(isPost){
 					this.$confirm('发布后,是否推送模板消息和客户群?', '发布提示', {
 						    confirmButtonText: '推送',
 						    cancelButtonText: '不推送',
@@ -666,6 +667,9 @@ export default {
 						        done()
 						    }
 					})
+				}else{
+					this.isMessagePost = false; 
+					this.reporteditMsg(params,tp)
 				}
 			}else {
 				this.reporteditMsg(params,tp)
@@ -776,7 +780,7 @@ export default {
 			}
 			//插入内容
 			let htmlStr=''
-			const LINK_CHART_URL = process.env.CHART_LINK;
+			const LINK_CHART_URL = this.$setting.dynamicOutLinks.ChartViewUrl+'/chartshow';
 			
 			data.forEach(item=>{
 				const t=new Date().getTime()

+ 1 - 1
src/views/report_manage/mixins/editor.js

@@ -117,7 +117,7 @@ export default {
         selection.addRange(this.lastEditRange);
       }
       //插入内容
-      const LINK_CHART_URL = process.env.CHART_LINK;
+      const LINK_CHART_URL = this.$setting.dynamicOutLinks.ChartViewUrl+'/chartshow';
       this.$nextTick(() => {
         this.editor.html.insert(
           `<p style='text-align:left; margin-top:10px;'>

+ 2 - 2
src/views/report_manage/mixins/reportMixin.js

@@ -230,7 +230,7 @@ export default {
       if (item.Disabled)
         return this.$message.warning("内部图表,不允许插入报告");
 
-      const LINK_CHART_URL = process.env.CHART_LINK;
+      const LINK_CHART_URL = this.$setting.dynamicOutLinks.ChartViewUrl+'/chartshow';
       let fromPage = this.$route.path === "/reportEnEditor" ? "en" : "";
       this.$nextTick(() => {
         this.editor.html.insert(
@@ -243,7 +243,7 @@ export default {
 
     /* 插入表格 */
     insertSheet(item) {
-      const LINK_URL = process.env.SHEET_LINK;
+      const LINK_URL = this.$setting.dynamicOutLinks.ChartViewUrl+'/sheetshow';
       this.$nextTick(() => {
         this.editor.html.insert(
           `<p style='text-align:left; margin-top:10px;'>

+ 84 - 10
src/views/report_manage/reportAuthor.vue

@@ -1,7 +1,8 @@
 <template>
   <div class="sandList-container">
-    <div class="main-top">
-      <el-button type="primary" @click="addAuthorHandle">添加作者</el-button>
+    <div class="main-top" v-if="authTabsOpt.length">
+      <el-button v-if="isAddBtnShow"
+        type="primary" @click="addAuthorHandle">添加作者</el-button>
       <div>
         <el-input
           v-model="search_txt"
@@ -12,9 +13,9 @@
         </el-input>
       </div>
     </div>
-    <div class="main-bottom">
+    <div class="main-bottom" v-if="authTabsOpt.length">
       <ul class="tab-ul">
-        <li :class="['tab-li',default_tab===tab.key && 'act']" v-for="tab in panelTabs" :key="tab.key" @click="default_tab=tab.key">{{tab.name}}</li>
+        <li :class="['tab-li',default_tab===tab.key && 'act']" v-for="tab in authTabsOpt" :key="tab.key" @click="default_tab=tab.key">{{tab.label}}研报</li>
       </ul>
       <el-table
         :data="tableData"
@@ -45,9 +46,12 @@
         </el-table-column>
         <el-table-column width="260" align="center" label="操作">
           <template slot-scope="{row}">
-            <span class="editsty" @click="itemHandle(row, 'edit')" style="margin-right: 10px">编辑</span>
-            <span class="deletesty" @click="itemHandle(row, 'del')" style="margin-right: 10px">删除</span>
-            <span class="editsty" @click="itemHandle(row, 'set')">{{row.Enable?'禁用':'启用'}}</span>
+            <span class="editsty" v-if="isEditBtnShow"
+                @click="itemHandle(row, 'edit')" style="margin-right: 10px">编辑</span>
+            <span class="deletesty" v-if="isDeleteBtnShow"
+                @click="itemHandle(row, 'del')" style="margin-right: 10px">删除</span>
+            <span class="editsty" v-if="isEnableBtnShow"
+                @click="itemHandle(row, 'set')">{{row.Enable?'禁用':'启用'}}</span>
           </template>
         </el-table-column>
 
@@ -93,7 +97,7 @@
               placeholder="请选择研报类型"
               style="width:400px;"
             >
-              <el-option v-for="item in reportTypes" :key="item.key" :label="item.label" :value="item.key"/>
+              <el-option v-for="item in authTabsOpt" :key="item.key" :label="item.label" :value="item.key"/>
             </el-select>
           </el-form-item>
         </el-form>
@@ -166,6 +170,71 @@ export default {
       this.getTableData();
     }
   },
+  computed:{
+    //过滤后的tab栏
+    authTabsOpt(){
+        const cnReport = this.permissionBtn.checkPermissionBtn(
+            this.permissionBtn.authorManage.authorManage_cnReport
+        )
+        const enReport = this.permissionBtn.checkPermissionBtn(
+            this.permissionBtn.authorManage.authorManage_enReport
+        )
+        //没时间写更好的写法了,有空再优化
+        let authTabs = []
+        if(cnReport){
+            authTabs.push(this.reportTypes[0])
+        }
+        if(enReport){
+            authTabs.push(this.reportTypes[1])
+        }
+        return authTabs
+    },
+    //是否显示添加作者按钮
+    isAddBtnShow(){
+        if(this.authTabsOpt.length){
+            return this.permissionBtn.checkPermissionBtn(
+                  this.permissionBtn.authorManage.authorManage_add
+                )
+        }
+        return false
+    },
+    //是否展示编辑按钮
+    isEditBtnShow(){
+        if(this.default_tab===1){
+            return this.permissionBtn.checkPermissionBtn(
+                  this.permissionBtn.authorManage.authorManage_cnReport_edit
+                )
+        }else{
+            return this.permissionBtn.checkPermissionBtn(
+                  this.permissionBtn.authorManage.authorManage_enReport_edit
+                )
+        }
+    },
+    //是否展示删除按钮
+    isDeleteBtnShow(){
+        if(this.default_tab===1){
+            return this.permissionBtn.checkPermissionBtn(
+                  this.permissionBtn.authorManage.authorManage_cnReport_del
+                )
+        }else{
+            return this.permissionBtn.checkPermissionBtn(
+                  this.permissionBtn.authorManage.authorManage_enReport_del
+                )
+        }
+    },
+    //是否展示禁用启用按钮
+    isEnableBtnShow(){
+        if(this.default_tab===1){
+            return this.permissionBtn.checkPermissionBtn(
+                  this.permissionBtn.authorManage.authorManage_cnReport_enable
+                )
+        }else{
+            return this.permissionBtn.checkPermissionBtn(
+                  this.permissionBtn.authorManage.authorManage_enReport_enable
+                )
+        }
+    }
+  },
   methods: {
     /* 获取表格数据 */
     getTableData() {
@@ -194,7 +263,7 @@ export default {
       this.authorForm = {
         title: '添加作者',
         name: '',
-        report_type: 1
+        report_type: this.authTabsOpt[0].key
       }
       this.authorDialog = true;
     }, 
@@ -272,7 +341,12 @@ export default {
     
   },
   mounted() {
-    this.getTableData();
+    if(this.authTabsOpt.length){
+        this.default_tab = this.authTabsOpt[0].key
+        this.authorForm.report_type = this.authTabsOpt[0].key
+        this.getTableData();
+    }
+    
   },
 };
 </script>

+ 4 - 3
src/views/report_manage/reportEn/reportEditor.vue

@@ -49,7 +49,7 @@
 				>
 					一键刷新
 				</el-button>
-				<el-button
+				<el-button v-permission="permissionBtn.enReportManageBtn.enReport_reportView"
 					type="primary"
 					size="medium"
 					plain
@@ -63,7 +63,7 @@
 					@click.native="clickreportadd('cg')"
 					>存草稿</el-button
 				>
-				<el-button
+				<el-button v-permission="permissionBtn.enReportManageBtn.enReport_publish"
 					type="primary"
 					size="medium"
 					@click.native="clickreportadd('dsfb')"
@@ -467,6 +467,7 @@ export default {
 					'undo',
 					'redo',
         ],
+        fontSize: ["12", "14", "16", "18", "20", "24", "28", "32", "36", "40"],
         height:300,
         fontSizeDefaultSelection: "16",
         quickInsertEnabled: false,
@@ -808,7 +809,7 @@ export default {
 			}
 			//插入内容
 			let htmlStr=''
-			const LINK_CHART_URL = process.env.CHART_LINK;
+			const LINK_CHART_URL = this.$setting.dynamicOutLinks.ChartViewUrl+'/chartshow';
 			let fromPage = this.$route.path === '/reportEnEditor' ? 'en' :'';
 			
 			data.forEach(item=>{

+ 22 - 11
src/views/report_manage/reportEn/reportlist.vue

@@ -5,6 +5,7 @@
         <el-form :inline="true" :model="searchform" @submit.native.prevent>
           <el-form-item label="">
             <el-button
+              v-permission="permissionBtn.enReportManageBtn.enReport_reportAdd"
               type="primary"
               size="medium"
               @click="$router.push({ path: '/reportEnEditor' })"
@@ -13,6 +14,7 @@
           </el-form-item>
           <el-form-item label="">
             <el-button 
+              v-permission="permissionBtn.enReportManageBtn.enReport_syncPolicy"
               type="primary" 
               :loading="isPull" 
               @click="handlePullReport"
@@ -76,6 +78,7 @@
           </el-form-item>
           <el-form-item label="">
             <el-select
+              v-permission="permissionBtn.enReportManageBtn.enReport_sendEmail"
               v-model.number="searchform.EmailState"
               placeholder="群发状态筛选"
               size="medium"
@@ -153,19 +156,25 @@
 
               <span v-else-if="item.key==='handle'">
                 <template v-if="row.State===1">
-									<span class="editsty" @click="reportHandle(row,'publish')" v-if="row.CanEdit">发布</span>
-									<span class="editsty" @click="reportHandle(row,'edit')" v-if="row.CanEdit">编辑</span>
+                    <span class="editsty" v-permission="permissionBtn.enReportManageBtn.enReport_publish"
+                        @click="reportHandle(row,'publish')" v-if="row.CanEdit">发布</span>
+                    <span v-permission="permissionBtn.enReportManageBtn.enReport_reportEdit"
+                        class="editsty" @click="reportHandle(row,'edit')" v-if="row.CanEdit">编辑</span>
                   <!-- <span class="editsty" @click="reportHandle(row,'editing')" v-else>{{row.Editor||''}}编辑中...</span> -->
-                  <span class="editsty" @click="reportHandle(row,'edit')" v-else>{{row.Editor||''}}编辑中...</span>
-									<span class="deletesty" @click="reportHandle(row,'del')" v-if="row.CanEdit">删除</span>
-								</template>
-								<template v-else>
-									<span @click="reportHandle(row,'cancelPublish')" class="deletesty">取消发布</span>
-                  <span class="editsty copylink" @click="reportHandle(row,'sendEmail')" v-if="row.EmailState===0&&row.EmailAuth">群发邮件</span>
-
-                  <span 
+                  <span v-permission="permissionBtn.enReportManageBtn.enReport_reportEdit"
+                    class="editsty" @click="reportHandle(row,'edit')" v-else>{{row.Editor||''}}编辑中...</span>
+                  <span v-permission="permissionBtn.enReportManageBtn.enReport_reportDel"
+                    class="deletesty" @click="reportHandle(row,'del')" v-if="row.CanEdit">删除</span>
+                </template>
+                <template v-else>
+                    <span v-if="permissionBtn.checkPermissionBtn(permissionBtn.enReportManageBtn.enReport_cancelPublish)"
+                        @click="reportHandle(row,'cancelPublish')" class="deletesty">取消发布</span>
+                    <span v-if="row.EmailState===0&&row.EmailAuth&&permissionBtn.checkPermissionBtn(permissionBtn.enReportManageBtn.enReport_sendEmail)"
+                        class="editsty copylink" @click="reportHandle(row,'sendEmail')">群发邮件</span>
+
+                  <span
                     class="editsty copylink" 
-                    v-if="row.EmailState===1&&row.EmailAuth" 
+                    v-if="row.EmailState===1&&row.EmailAuth&&permissionBtn.checkPermissionBtn(permissionBtn.enReportManageBtn.enReport_sendEmail)" 
                     @click="reportHandle(row,'view-log')"
                     style="position: relative;"
                   >
@@ -611,6 +620,8 @@ export default {
 
     /* 查看详情 */
     lookreportdtl({Id,ReportCode}) {
+        //如果没有预览权限,就不跳转
+      if(!this.permissionBtn.checkPermissionBtn(this.permissionBtn.enReportManageBtn.enReport_reportView)) return
       let {href} = this.$router.resolve({name:'预览报告',query:{id:Id,code:ReportCode,fromPage:'en'}});
 			window.open(href,'_blank');
     },

+ 6 - 3
src/views/report_manage/reportVariety.vue

@@ -1,7 +1,8 @@
 <template>
     <div class="report-variety-page">
         <div class="top-wrap">
-            <el-button type="primary" @click="showEditBreed=true;getParentVarietyList()">添加品种</el-button>
+            <el-button type="primary" v-permission="permissionBtn.enChartPermission.enChartPermission_save"
+                @click="showEditBreed=true;getParentVarietyList()">添加品种</el-button>
             <el-input placeholder="品种名称" v-model="searchVal" style="max-width: 520px; float: right" @change="handleSearch" clearable>
                 <i slot="prefix" class="el-input__icon el-icon-search"></i>
             </el-input>
@@ -27,8 +28,10 @@
                 </el-table-column>
                 <el-table-column label="操作" align="center">
                     <template slot-scope="scope">
-                        <span class="editsty" style="margin-right:20px;display:inline-block" @click="handleEditBreedItem(scope.row)">编辑</span>
-                        <span class="deletesty" @click="handleDelBreedItem(scope.row)">删除</span>
+                        <span class="editsty" v-permission="permissionBtn.enChartPermission.enChartPermission_save"
+                            style="margin-right:20px;display:inline-block" @click="handleEditBreedItem(scope.row)">编辑</span>
+                        <span v-permission="permissionBtn.enChartPermission.enChartPermission_del"
+                            class="deletesty" @click="handleDelBreedItem(scope.row)">删除</span>
                     </template>
                 </el-table-column>
             </el-table>

+ 9 - 3
src/views/report_manage/reportdtl.vue

@@ -48,10 +48,16 @@
 			</block>
 		</div>
 		<div v-if="linkUrl" style="width:100px;height30px;position:absolute;right:-100px;top:100px;cursor:pointer;">
-			<div style="display:flex;alignItems:center;color:#333;" :data-clipboard-text='linkUrl' @click="copyHandle" class="copy">
+			<div v-permission="$route.query.fromPage==='en'
+                ?permissionBtn.enReportManageBtn.enReport_reportView_copyWechat
+                :permissionBtn.reportManageBtn.reportManage_reportView_copyWechat"
+                style="display:flex;alignItems:center;color:#333;" :data-clipboard-text='linkUrl' @click="copyHandle" class="copy">
 				<img src="../../assets/img/icons/cop.png" alt="" style="width:30px;height:30px;marginRight:10px;">复制链接
 			</div>
-			<div style="display:flex;alignItems:center;color:#333;marginTop:20px;"  @mouseenter="isShowCode=true" @mouseleave="isShowCode=false">
+			<div v-permission="$route.query.fromPage==='en'
+                ?permissionBtn.enReportManageBtn.enReport_reportView_wechatShare
+                :permissionBtn.reportManageBtn.reportManage_reportView_wechartShare"
+                style="display:flex;alignItems:center;color:#333;marginTop:20px;"  @mouseenter="isShowCode=true" @mouseleave="isShowCode=false">
 				<img src="../../assets/img/icons/wechat.png" alt="" style="width:30px;height:30px;marginRight:10px;">微信分享
 			</div>
 			<vue-qr :text="linkUrl" :margin="0" colorDark="#333" colorLight="#fff" :dotScale="1" :size="100" style="position:absolute;right:0;top:100px;" v-if="isShowCode"></vue-qr>
@@ -69,7 +75,7 @@
 		computed: {
 			linkUrl(){
 				let str=''
-				const baseUrl=process.env.REPORT_SHARE_LINK;
+				const baseUrl= localStorage.getItem('dynamicOutLinks') ? JSON.parse(localStorage.getItem('dynamicOutLinks')).ReportViewUrl : '';
 				if(this.$route.query.code){
 					if(this.$route.query.fromPage == 'en'){
 						str=`${baseUrl}/reportshare_crm_report_en?code=${this.$route.query.code}`

+ 30 - 9
src/views/report_manage/reportlist.vue

@@ -5,6 +5,7 @@
         <el-form :inline="true" :model="searchform" @submit.native.prevent>
           <el-form-item label="">
             <el-button
+              v-permission="permissionBtn.reportManageBtn.reportManage_reportAdd"
               type="primary"
               size="medium"
               @click="$router.push({ path: '/addreportNew' })"
@@ -12,6 +13,7 @@
             >
             <!-- <el-button type="primary" plain size="medium" @click="$router.push({path:'/addreport'})">添加研报(旧版)</el-button> -->
             <el-button
+              v-permission="permissionBtn.reportManageBtn.reportManage_dayWeekReportAdd"
               type="primary"
               size="medium"
               @click="$router.push({ path: '/dayorweek' })"
@@ -101,6 +103,7 @@
           </el-form-item>
           <el-form-item label="">
             <el-select
+              v-permission="permissionBtn.reportManageBtn.reportManage_reportList_sendTime"
               @change="search"
               v-model.number="searchform.msgIsSend"
               placeholder="推送消息状态"
@@ -130,6 +133,7 @@
         <!-- <el-table :data="tableData" v-loading="listLoading" @sort-change='sortChange' @selection-change="selectchange" :default-sort="{prop:'publish_time',order:'descending'}" element-loading-text="数据加载中..." border style="width:100%;"> -->
         <el-table
           ref="table"
+          :key="tableKey"
           :data="tableData"
           v-loading="listLoading"
           @sort-change="sortChange"
@@ -213,7 +217,7 @@
               </svg>
             </template>
           </el-table-column>
-          <el-table-column
+          <el-table-column v-if="permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_reportList_sendTime)"
             prop="MsgSendTime"
             label="报告推送时间"
             min-width="124"
@@ -242,7 +246,7 @@
 							<a :href="hostapi+'?ReportId='+parseInt(scope.row.Id)" v-if="scope.row.VideoUrl" :download="scope.row.VideoName" style="cursor:pointer; color:#4099ef;">下载</a>
 						</template>
 					</el-table-column> -->
-          <el-table-column
+          <el-table-column v-if="permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_reportList_uv)"
             label="PV / UV"
             align="center"
             :render-header="renderHeader"
@@ -260,18 +264,21 @@
                 >
                   <!-- <i class="el-icon-edit-outline" @click="$router.push({name:'编辑研报',query:{id:scope.row.id}})"></i> -->
                   <span
+                    v-permission="permissionBtn.reportManageBtn.reportManage_publish"
                     class="editsty"
                     @click="publishreport(scope.row)"
                     v-if="scope.row.CanEdit"
                     >发布</span
                   >
                   <span
+                    v-permission="permissionBtn.reportManageBtn.reportManage_reportEdit"
                     class="editsty"
                     @click="editreport(scope.row, 'edit')"
                     v-if="scope.row.CanEdit"
                     >编辑</span
                   >
                   <span
+                    v-permission="permissionBtn.reportManageBtn.reportManage_reportEdit"
                     class="editsty"
                     @click="editreport(scope.row, 'editing')"
                     v-else
@@ -279,6 +286,7 @@
                   >
                   <!-- <i class="el-icon-delete" @click="deleteitem(scope.row)"></i> -->
                   <span
+                    v-permission="permissionBtn.reportManageBtn.reportManage_reportDel"
                     class="deletesty"
                     @click="deleteitem(scope.row)"
                     v-if="scope.row.CanEdit"
@@ -286,19 +294,20 @@
                   >
                 </template>
                 <template v-if="scope.row.State == 2">
-                  <span
+                  <span v-if="permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_cancelPublish)"
                     @click="canclepublish(scope.row)"
                     style="color: red; cursor: pointer"
                     >取消发布</span
                   >
                   <!-- <template v-if="scope.row.ClassifyNameFirst!='周报'"> -->
                   <span
-                    v-if="scope.row.MsgIsSend == 0"
+                    v-if="scope.row.MsgIsSend == 0 && permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_sendMsg)"
                     style="color: #4099ef; cursor: pointer"
                     @click="messageSend(scope.row)"
                     >推送消息</span
                   >
-                  <span v-else style="color: red">已推送消息</span>
+                  <span v-else-if="scope.row.MsgIsSend != 0&&permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_sendMsg)"
+                    style="color: red">已推送消息</span>
                   <!-- </template> -->
                   <!-- <template v-else>
 										<span v-if="scope.row.MsgIsSend=='0'" @click="gosendTemplateMsg(scope.row)" style="color:#4099ef; cursor:pointer;">推送模版消息</span>
@@ -314,11 +323,12 @@
                 </template>
                 <span
                   style="color: #46c371; cursor: pointer"
-                  v-if="!['晨报', '周报'].includes(scope.row.ClassifyNameFirst)"
+                  v-if="!['晨报', '周报'].includes(scope.row.ClassifyNameFirst)&&permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_audioUpload)"
                   @click="openupload(scope.row.Id)"
                   >音频上传</span
                 >
                 <a
+                  v-permission="permissionBtn.reportManageBtn.reportManage_audioDownload"
                   :href="hostapi + '?ReportId=' + parseInt(scope.row.Id)"
                   v-if="
                     scope.row.VideoUrl &&
@@ -329,6 +339,7 @@
                   >音频下载</a
                 >
                 <span
+                  v-permission="permissionBtn.reportManageBtn.reportManage_audioDownload"
                   style="cursor: pointer; color: #4099ef"
                   v-if="
                     ['晨报', '周报'].includes(scope.row.ClassifyNameFirst) &&
@@ -646,6 +657,7 @@ export default {
 
       showPublish: false,
       isDSFB:false,//是否为定时发布
+      tableKey:0,
     };
   },
   mounted() {
@@ -784,6 +796,8 @@ export default {
       });
     },
     lookreportdtl(item) {
+      //如果没有预览权限,就不跳转
+      if(!this.permissionBtn.checkPermissionBtn(this.permissionBtn.reportManageBtn.reportManage_reportView)) return
       sessionStorage.setItem("reportdtl", JSON.stringify(item));
       let { href } = this.$router.resolve({
         name: "预览报告",
@@ -930,8 +944,13 @@ export default {
         // this.handlePublic(1)
         return;
       }
-
-      this.showPublish = true;
+      const isPost = this.permissionBtn.checkPermissionBtn(this.permissionBtn.reportManageBtn.reportManage_sendMsg)
+      if(isPost){
+          this.showPublish = true;
+      }else{
+        this.handlePublic(1)
+      }
+      
     },
     // 点击确认发布&推送报告
     // 1 仅发布 2发布且推送
@@ -1035,9 +1054,11 @@ export default {
       reportlist(params).then((res) => {
         if (res.Ret === 200) {
           this.tableData = res.Data.List || [];
+          this.tableKey++
           this.total = parseInt(res.Data.Paging.Totals);
+          this.listLoading = false;
         }
-        this.listLoading = false;
+        
       });
     },
     search() {

+ 23 - 7
src/views/sandbox_manage/index.vue

@@ -1,7 +1,8 @@
 <template>
   <div class="sandList-container">
     <div class="main-top">
-      <el-button type="primary" @click="addSand">添加沙盘</el-button>
+      <el-button v-permission="permissionBtn.sandboxPermission.sandbox_saveView"
+        type="primary" @click="addSand">添加沙盘</el-button>
       <div>
         <el-input
           v-model="search_txt"
@@ -11,6 +12,7 @@
           <i slot="prefix" class="el-input__icon el-icon-search"></i>
         </el-input>
         <el-cascader
+          v-permission="permissionBtn.sandboxPermission.sandbox_variety"
           :options="classifyArr"
           :props="classifyProps"
           v-model="classify"
@@ -62,29 +64,34 @@
           <template slot-scope="scope">
             <template v-if="scope.row.key !== 'more'">
               <el-button
+                v-permission="permissionBtn.sandboxPermission.sandbox_saveView"
                 type="text"
                 @click="handleSand(scope.row, 'edit')"
                 v-if="scope.row.CanEdit"
                 >编辑</el-button
               >
               <el-button
+                v-permission="permissionBtn.sandboxPermission.sandbox_saveView"
                 type="text"
                 @click="handleSand(scope.row, 'edit')"
                 v-if="!scope.row.CanEdit"
                 >{{scope.row.Editor||''}}编辑中...</el-button
               >
               <el-button
+                v-permission="permissionBtn.sandboxPermission.sandbox_del"
                 type="text"
                 style="color: #f00"
                 @click="handleSand(scope.row, 'del')"
                 >删除</el-button
               >
               <el-button
+                v-permission="permissionBtn.sandboxPermission.sandbox_saveView"
                 type="text"
                 @click="handleSand(scope.row, 'view')"
                 >查看</el-button
               >
-              <el-button  type="text" @click="copyImg(scope.row)"
+              <el-button  v-permission="permissionBtn.sandboxPermission.sandbox_addMy"
+                type="text" @click="copyImg(scope.row)"
                 >复制图片</el-button
               >
             </template>
@@ -124,12 +131,17 @@
           </el-table-column>
           <el-table-column align="center" label="操作">
             <template slot-scope="scope">
-              <el-button type="text" @click="editChildSand(scope.row)" v-if="scope.row.CanEdit">编辑</el-button>
+              <el-button type="text" v-permission="permissionBtn.sandboxPermission.sandbox_saveView"
+                @click="editChildSand(scope.row)" v-if="scope.row.CanEdit">编辑</el-button>
               <!-- <el-button type="text" @click="handleSand(scope.row, 'editing')" v-else>{{scope.row.Editor||''}}编辑中...</el-button> -->
-              <el-button type="text" @click="editChildSand(scope.row)" v-else>{{scope.row.Editor||''}}编辑中...</el-button>
-              <el-button type="text" style="color: #f00" @click="removeChildSand(scope.row)">删除</el-button>
-              <el-button type="text" @click="handleSand(scope.row, 'view')">查看</el-button>
-              <el-button type="text" @click="copyImg(scope.row)">复制图片</el-button>
+              <el-button type="text" v-permission="permissionBtn.sandboxPermission.sandbox_saveView"
+                @click="editChildSand(scope.row)" v-else>{{scope.row.Editor||''}}编辑中...</el-button>
+              <el-button type="text" v-permission="permissionBtn.sandboxPermission.sandbox_del"
+                style="color: #f00" @click="removeChildSand(scope.row)">删除</el-button>
+              <el-button type="text" v-permission="permissionBtn.sandboxPermission.sandbox_saveView"
+                @click="handleSand(scope.row, 'view')">查看</el-button>
+              <el-button type="text" v-permission="permissionBtn.sandboxPermission.sandbox_addMy"
+                @click="copyImg(scope.row)">复制图片</el-button>
             </template>
           </el-table-column>
 
@@ -585,6 +597,10 @@ export default {
     },
   },
   mounted() {
+    //如果没有品种权限,表格就不展示这一列
+    if(!this.permissionBtn.checkPermissionBtn(this.permissionBtn.sandboxPermission.sandbox_variety)){
+        this.tableColums = this.tableColums.filter(i=>i.key!=='ChartPermissionName')
+    }
     this.getTableData();
     this.getClassify();
     this.tableBody = this.$refs.table.bodyWrapper

+ 22 - 7
src/views/sandbox_manage/sandFlow/index.vue

@@ -15,7 +15,7 @@
 							style="width:300px">
 						</el-input>
 					</li>
-					<li>
+					<li v-permission="permissionBtn.sandboxPermission.sandbox_variety">
 						品种:
 						<el-cascader 
 							:options="classifyArr"
@@ -29,8 +29,10 @@
 					</li>
 				</ul>
 				<div>
-					<el-button type="primary" size="medium" @click="saveChart(null)" v-if="!isView">保存</el-button>
-					<el-button type="primary" size="medium" @click="copySandHandle">复制图片</el-button>
+					<el-button v-permission="permissionBtn.sandboxPermission.sandbox_saveView"
+						type="primary" size="medium" @click="saveChart(null)" v-if="!isView">保存</el-button>
+					<el-button v-permission="permissionBtn.sandboxPermission.sandbox_addMy"
+						type="primary" size="medium" @click="copySandHandle">复制图片</el-button>
 				</div>
 			</header>
 			<div class="flow-wrapper">
@@ -161,7 +163,8 @@ export default {
 
 		/* 保存 */
 		saveChart: _.debounce( function(callback=null) {
-			if(!this.sandObj.name || !this.sandObj.classify) return this.$message.warning(`${this.sandObj.classify ? '请填写沙盘名称' : this.sandObj.name ? '请选择沙盘品种' : '请填写沙盘名称和品种'}`);
+			if(!this.sandObj.name) 
+				return this.$message.warning(`'请填写沙盘名称`);
 
 			if(!this.graph.toJSON().cells.length) return this.$message.warning('请绘制画布内容');
 
@@ -181,10 +184,10 @@ export default {
 				const { Data } = await dataBaseInterface.uploadImgSvg(params);
 				let SandboxVersionCode = (this.sand_id && classify === this.sandInfo.ChartPermissionId)  ? this.sand_id : '';
 				
-				const { Ret } =	await sandInterface.sandSave({
+				const { Ret , Data : sandData} =	await sandInterface.sandSave({
 					SandboxVersionCode,
 					Name: name,
-					ChartPermissionId: classify,
+					ChartPermissionId: Number(classify),
 					Content: JSON.stringify(this.graph.toJSON()),
 					PicUrl: Data.ResourceUrl,
 					SvgData: dataUri
@@ -193,7 +196,19 @@ export default {
 				if(Ret !== 200) return;
 				this.$message.success(`${SandboxVersionCode ? '编辑成功' : '保存成功'}`);
 				this.lockLoding.close();
-				!SandboxVersionCode && window.close();
+				//!SandboxVersionCode && window.close();
+				//如果是新增,直接跳转到编辑页面
+				if(!SandboxVersionCode&&sandData.VersionCode){
+					this.sand_id = sandData.VersionCode
+					this.$router.push({
+						path: '/sandflow',
+						query: {
+						id: sandData.VersionCode,
+						type:'edit',
+						},
+					});
+					this.getGraphData();
+				}
 				
 				callback && callback();
 			},{

+ 4 - 2
src/views/semantics_manage/documentPage.vue

@@ -4,7 +4,8 @@
     <!-- 目录栏 -->
     <div class="catalog-wrap page-block-wrap catalog-block" id="left">
       <div class="btn-box">
-        <el-button type="primary" @click="toPage('addFile')">添加文档</el-button>
+        <el-button v-permission="permissionBtn.semanticPermission.docPage_save"
+            type="primary" @click="toPage('addFile')">添加文档</el-button>
       </div>
       <div class="select-wrap">
         <el-select
@@ -133,7 +134,8 @@
             <!-- <li>文档主题:{{docInfo.Theme}}</li> -->
             <li>文档分类:{{docInfo.ClassifyName}}</li>
           </ul>
-          <el-button type="primary" @click="handleEdit('file',selectNode)">编辑</el-button>
+          <el-button v-permission="permissionBtn.semanticPermission.docPage_save"
+            type="primary" @click="handleEdit('file',selectNode)">编辑</el-button>
         </div>
         <div class="file-content overflow-hide-scrollbar">
           <p v-for="block in docInfo.SectionList" :key="block.SaDocSectionId">{{block.innerText}}</p>

+ 4 - 2
src/views/semantics_manage/semanticsPage.vue

@@ -4,7 +4,8 @@
     <!-- 目录栏 -->
     <div class="catalog-wrap page-block-wrap catalog-block" id="left">
       <div class="btn-box">
-        <el-button type="primary" @click="toPage('addFile')">添加文档对比</el-button>
+        <el-button v-permission="permissionBtn.semanticPermission.saPage_save"
+            type="primary" @click="toPage('addFile')">添加文档对比</el-button>
         <!-- <el-button type="primary" plain @click="toPage('tag')">标签管理</el-button> -->
       </div>
       <div class="select-wrap">
@@ -129,7 +130,8 @@
               <span @click="handleCopyImg" style="cursor: pointer;color:#409eff;margin-right:10px">复制到微信</span>
               <span @click="handleCopyImg" style="cursor: pointer;color:#409eff">复制到Office</span>
             </li>
-            <li style="min-width: auto;"><el-button type="primary" @click="handleEdit('file',selectNode)">编辑</el-button></li>
+            <li style="min-width: auto;"><el-button v-permission="permissionBtn.semanticPermission.saPage_save"
+                type="primary" @click="handleEdit('file',selectNode)">编辑</el-button></li>
           </ul>
           <div class="pic-wrap">
             <img class="pic" id="copy-img" :src="semanticInfo.ResultImg" v-if="semanticInfo.ResultImg">

+ 6 - 3
src/views/semantics_manage/tagPage.vue

@@ -2,7 +2,8 @@
   <!-- 标签管理 -->
   <div class="document-tag-page-wrap page-block-wrap">
     <div class="tool-box">
-      <el-button type="primary" @click="handleOperate('add',{})">添加标签</el-button>
+      <el-button v-permission="permissionBtn.semanticPermission.tagPage_save"
+        type="primary" @click="handleOperate('add',{})">添加标签</el-button>
       <el-input v-model="searchText" clearable prefix-icon="el-icon-search" placeholder="请输入标签名称" @input="searchHandle"></el-input>
     </div>
     <div class="table-box">
@@ -23,8 +24,10 @@
         </el-table-column>
         <el-table-column  label="操作" align="center">
           <template slot-scope="{row}">
-            <el-button type="text"  @click="handleOperate('edit',row)">编辑</el-button>
-            <el-button type="text"  style="color:red;" @click="handleOperate('delete',row)">删除</el-button>
+            <el-button v-permission="permissionBtn.semanticPermission.tagPage_save"
+                type="text"  @click="handleOperate('edit',row)">编辑</el-button>
+            <el-button v-permission="permissionBtn.semanticPermission.tagPage_del"
+                type="text"  style="color:red;" @click="handleOperate('delete',row)">删除</el-button>
           </template>
         </el-table-column>
       </el-table>

+ 12 - 4
src/views/supply_manage/stockPlant.vue

@@ -1,7 +1,8 @@
 <template>
   <div class="variety-list-page">
     <div class="top">
-      <el-button type="primary" @click="addVarietyHandle(null)" v-if="isCanAdd">添加品种</el-button>
+      <el-button v-permission="permissionBtn.stockPlantPermission.stockPlant_saveVariety"
+        type="primary" @click="addVarietyHandle(null)" v-if="isCanAdd">添加品种</el-button>
       <div class="top-right">
         <el-checkbox v-model="isCanAnalyse" @change="pageChangeHandle(1)" v-if="!isCanAdd">只看可分析</el-checkbox>
         <el-input
@@ -35,9 +36,12 @@
         </el-table-column>
         <el-table-column label="操作" align="center">
           <template slot-scope="{row}">
-            <el-button type="text" @click="analyseVarietyHandle(row)" v-if="row.Button.Analyse">分析</el-button>
-            <el-button type="text" @click="addVarietyHandle(row)" v-if="row.Button.Edit">编辑</el-button>
-            <span class="deletesty" @click="delHandle(row)" style="margin-left: 10px;" v-if="row.Button.Delete">删除</span>
+            <el-button v-permission="permissionBtn.stockPlantPermission.stockPlant_anlysisView"
+                type="text" @click="analyseVarietyHandle(row)" v-if="row.Button.Analyse">分析</el-button>
+            <el-button v-permission="permissionBtn.stockPlantPermission.stockPlant_saveVariety"
+                type="text" @click="addVarietyHandle(row)" v-if="row.Button.Edit">编辑</el-button>
+            <span v-permission="permissionBtn.stockPlantPermission.stockPlant_del"
+                class="deletesty" @click="delHandle(row)" style="margin-left: 10px;" v-if="row.Button.Delete">删除</span>
           </template>
         </el-table-column>
         <div slot="empty" style="padding: 20px 0">
@@ -119,6 +123,10 @@ export default {
     },
     
     analyseVarietyHandle(row,type='') {
+        //如果没有分析查看的权限,就不跳转
+        if(!this.permissionBtn.checkPermissionBtn(
+            this.permissionBtn.stockPlantPermission.stockPlant_anlysisView
+        )) return
       this.$router.push({
         path:'/analyseVariety',
         query:{id:row.VarietyId,type}

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

@@ -38,7 +38,7 @@
                     </el-option>
                 </el-select>
             </el-form-item>
-            <el-form-item label="研究方向" prop="direct">
+            <el-form-item label="研究方向" prop="direct" v-permission="permissionBtn.sysDepartPermission.sysDepart_saveUser_researchGroup">
                 <el-cascader collapse-tags :show-all-levels="false" :options="researchGroup" v-model="userForm.direct"
                     :props="form_directProp" placeholder="请选择研究方向" clearable></el-cascader>
             </el-form-item>

+ 16 - 8
src/views/system_manage/departManage.vue

@@ -49,7 +49,8 @@
 		<div class="right_cont">
 			<div class="right_cont_top">
 				<div>
-					<el-button type="primary" @click="addUser">添加用户</el-button>
+					<el-button v-permission="permissionBtn.sysDepartPermission.sysDepart_saveUser"
+						type="primary" @click="addUser">添加用户</el-button>
 					<!-- <el-button type="primary" @click="synchronizationMEIKE" style="margin-left: 26px;">同步每刻</el-button> -->
 				</div>
 				<el-input
@@ -75,7 +76,9 @@
 					label="姓名"
 					align="center">
 						<template slot-scope="scope">
-							<el-tag size="small" v-if="scope.row.LabelVal" :style="scope.row.LabelVal==1||scope.row.LabelVal==2?'color:#fff;background:#409EFF':'color:#409EFF;background:#ECF5FF'" style="position:absolute;left:10px">{{scope.row.LabelVal==1?'超管':scope.row.LabelVal==2?'管理员':scope.row.LabelVal==3?'部门经理':scope.row.LabelVal==4?'组长':'主管'}}</el-tag>
+							<el-tag size="small" 
+								v-if="scope.row.LabelVal&&permissionBtn.checkPermissionBtn(permissionBtn.sysDepartPermission.sysDepart_saveUser_LabelVal)" 
+								:style="scope.row.LabelVal==1||scope.row.LabelVal==2?'color:#fff;background:#409EFF':'color:#409EFF;background:#ECF5FF'" style="position:absolute;left:10px">{{scope.row.LabelVal==1?'超管':scope.row.LabelVal==2?'管理员':scope.row.LabelVal==3?'部门经理':scope.row.LabelVal==4?'组长':'主管'}}</el-tag>
 							<span style="position: relative;">{{scope.row.RealName}}</span>
 						</template>
 					</el-table-column>
@@ -110,14 +113,18 @@
 					<el-table-column label="操作" align="center" width="300">
 						<template slot-scope="scope">
 							<div style="color:#4099ef; font-size:24px;display: flex;gap:0 10px;">
-								<span class="editsty" @click.stop="editUser(scope.row)">编辑</span>
-								<span class="editsty" @click.stop="resetPassWord(scope.row)">重置密码</span>
-								<span class="editsty" @click.stop="moveDepart(scope.row)">移动分组</span>
-								<span 
+								<span v-permission="permissionBtn.sysDepartPermission.sysDepart_saveUser"
+									class="editsty" @click.stop="editUser(scope.row)">编辑</span>
+								<span v-permission="permissionBtn.sysDepartPermission.sysDepart_resetPass"
+									class="editsty" @click.stop="resetPassWord(scope.row)">重置密码</span>
+								<span v-permission="permissionBtn.sysDepartPermission.sysDepart_moveGroup"
+									class="editsty" @click.stop="moveDepart(scope.row)">移动分组</span>
+								<span v-permission="permissionBtn.sysDepartPermission.sysDepart_enable"
 									class="editsty" 
 									@click.stop="handleChangeStatus(scope.row)"
 								>{{scope.row.Enabled===0?'启用':'禁用'}}</span>
-								<span class="deletesty" @click.stop="delUser(scope.row)">删除</span>
+								<span v-permission="permissionBtn.sysDepartPermission.sysDepart_del"
+									class="deletesty" @click.stop="delUser(scope.row)">删除</span>
 							</div>
 						</template>
 					</el-table-column>
@@ -165,7 +172,8 @@
 								<h4 class="item_tit">角色:</h4>
 								<span>{{userObj.role}}</span>
 							</li>
-							<li class="info_item" v-if="userObj.depart.includes('FICC研究部')">
+							<li v-permission="permissionBtn.sysDepartPermission.sysDepart_saveUser_researchGroup"
+								class="info_item" v-if="userObj.depart.includes('FICC研究部')">
 								<h4 class="item_tit">研究方向:</h4>
 								<span>{{userObj.direct.map(i=>i.join('/')).join('、')||'暂无'}}</span>
 							</li>

+ 3 - 2
src/views/system_manage/enAuthManage.vue

@@ -83,10 +83,11 @@
             </el-tooltip>
           </template>
           <template slot-scope="{ row }">
-            <span @click="setAuth(row)"
+            <span v-permission="permissionBtn.sysDepartPermission.enAuthManage_settingAuth"
+              @click="setAuth(row)"
               style="cursor: pointer; color:#409eff;margin-right: 5px;"
             >设置权限</span>
-            <span
+            <span v-permission="permissionBtn.sysDepartPermission.enAuthManage_del"
               @click="handleDeleteAuth(row)"
               style="cursor: pointer; color: #d1433a"
               >删除</span

+ 36 - 6
src/views/system_manage/etaBaseConfig.vue

@@ -16,7 +16,8 @@
                             @remove="deleteFormImg('CompanyWatermark')"
                             />
                         <!-- 后面可能会有新的选项 -->
-                        <el-checkbox-group v-model="checkList" style="position: absolute;top: -40px;left: 100px;">
+                        <el-checkbox-group v-if="isShowYBChart"
+                            v-model="checkList" style="position: absolute;top: -40px;left: 100px;">
                             <el-checkbox label="研报图表"></el-checkbox>
                         </el-checkbox-group>
                         <ConfigAnnotation picName="CompanyWatermark" @showImage="previewImage"/>
@@ -35,12 +36,12 @@
                     </el-form-item>
                 </div>
             </div>
-            <div class="part-ppt part">
+            <div class="part-ppt part" v-if="isShowPPT||isShowEnPPT">
                 <el-radio-group v-model="pptLang" style="margin-bottom: 22px;">
                     <el-radio-button label="cn">中文PPT</el-radio-button>
                     <el-radio-button label="en">英文PPT</el-radio-button>
                 </el-radio-group>
-                <div v-show="pptLang === 'cn'" class="ppt-form-item-wrap">
+                <div v-if="isShowPPT" v-show="pptLang === 'cn'" class="ppt-form-item-wrap">
                     <el-form-item label="PPT封面图" prop="CnPptCoverImgs">
                         <div class="input-line" style="display:flex;">
                             <ImgUpload 
@@ -78,7 +79,7 @@
                             picHintText="上传格式:png、jpg,建议图片比例:10:7 16:9 4:3"/>
                     </el-form-item>
                 </div>
-                <div v-show="pptLang === 'en'" class="ppt-form-item-wrap">
+                <div v-if="isShowEnPPT" v-show="pptLang === 'en'" class="ppt-form-item-wrap">
                     <el-form-item label="PPT封面图" prop="EnPptCoverImgs">
                         <div class="input-line" style="display:flex;">
                             <ImgUpload 
@@ -117,7 +118,8 @@
                     </el-form-item>
                 </div>
             </div>
-            <div class="part-Iflytek part">
+            <div class="part-Iflytek part" 
+                v-if="isShowXunFei">
                 <!-- 科大讯飞 -->
                 <div style="width:100%;">
                     <span style="color:#606266;">科大讯飞服务</span> 
@@ -263,6 +265,32 @@ export default {
 
         };
     },
+    computed:{
+        //是否显示科大讯飞相关的表单项
+        isShowXunFei(){
+            return this.permissionBtn.checkPermissionBtn(
+                    this.permissionBtn.baseConfigPermission.etaBaseConfig_xunfei
+                )
+        },
+        //是否显示中文PPT相关的表单项
+        isShowPPT(){
+            return this.permissionBtn.checkPermissionBtn(
+                this.permissionBtn.baseConfigPermission.etaBaseConfig_ppt
+            )
+        },
+        //是否显示英文PPT相关的表单项
+        isShowEnPPT(){
+            return this.permissionBtn.checkPermissionBtn(
+                this.permissionBtn.baseConfigPermission.etaBaseConfig_pptEn
+            )
+        },
+        //是否显示公司水印旁的研报图表,目前只有一个选项,当选项多的时候,不要再单个单个判断
+        isShowYBChart(){
+            return this.permissionBtn.checkPermissionBtn(
+                this.permissionBtn.baseConfigPermission.etaBaseConfig_watermark_ybChart
+            )
+        }
+    },
     methods: {
         handleUploadImage(file,key){
             /* console.log('type',key)
@@ -328,7 +356,7 @@ export default {
             //获取UseXf的值,赋值Iflytek
             etaBaseConfigInterence.getBaseConfig().then(res=>{
                 if(res.Ret!==200) return 
-                const {WatermarkChart,UseXf,CnPptCoverImgs,EnPptCoverImgs} = res.Data
+                const {WatermarkChart='',UseXf='',CnPptCoverImgs='',EnPptCoverImgs=''} = res.Data
                 this.checkList = WatermarkChart==='true'?['研报图表']:[]
                 this.Iflytek = UseXf==='true'?true:false
                 if(res.Data){
@@ -365,6 +393,8 @@ export default {
                     this.formData.UseXf = ''+(this.Iflytek?true:false)
                     const CnPptCoverImgs = this.formData.CnPptCoverImgs.join(',')
                     const EnPptCoverImgs = this.formData.EnPptCoverImgs.join(',')
+                    //通过验证后,提交数据前
+                    //根据isShowXunFei,isShowPPTisShowEnPPT这三个计算属性将对应的表单项隐藏
                     etaBaseConfigInterence.saveBaseConfig({...this.formData,...{CnPptCoverImgs,EnPptCoverImgs}}).then(res=>{
                         if(res.Ret!==200) return 
                         this.$message.success('保存成功,请稍后到对应页面/项目查看')

+ 281 - 0
src/views/system_manage/newAuthManage.vue

@@ -0,0 +1,281 @@
+<template>
+    <div class="authManage_container">
+        <div class="auth_cont_top">
+            <div>
+                <span>角色</span>
+                <el-select v-model="role" placeholder="请选择角色" style="width:360px;marginLeft:30px;">
+                    <el-option v-for="item in roleList" :key="item.RoleId" :label="item.RoleName" :value="item.RoleId">
+                    </el-option>
+                </el-select>
+            </div>
+            <el-button type="primary" style="marginRight:50px;width:140px;" @click="saveAuth" v-if="!isLook">确定
+            </el-button>
+        </div>
+        <div class="auth_bot">
+            <div class="menu_auth_cont">
+                <h3 style="color:#333;fontSize:14px;">权限设置</h3>
+                <div class="auth-wrap">
+                    <el-tree ref="checkboxTree" :data="authList" :props="{label:'Name',children:'Children',disabled:'Disabled'}"
+                        :default-expand-all="false" show-checkbox node-key="MenuId"
+                        :default-checked-keys="defaultCheckedKeys">
+                    </el-tree>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+import {departInterence} from '@/api/api.js';
+export default {
+    name: '',
+    components: {},
+    data() {
+        return {
+            role: '', //角色
+            roleList: [], //角色列表
+            authList: [], //权限列表
+            defaultCheckedKeys: [],
+            loading: null, //loading
+            isLook: false, //是否仅查看
+        };
+    },
+    watch: {
+        // 监测角色改变对应的权限也改变
+        role() {
+            this.loading = this.$loading({
+                lock: true,
+                target: '.authManage_container',
+                text: '切换角色中...',
+                spinner: 'el-icon-loading',
+                background: 'rgba(255, 255, 255, 0.8)'
+            });
+            this.getAuthList();
+        }
+    },
+    methods: {
+        /* 获取已有角色列表 */
+        getRoles() {
+            departInterence.getRole().then(res => {
+                if (res.Ret === 200) {
+                    this.roleList = res.Data.List;
+                    if (res.Data.List.length && !this.role) {
+                        this.role = res.Data.List[0].RoleId
+                    }
+                }
+            })
+        },
+        /* 根据角色id获取已有权限 */
+        getAuthList() {
+            departInterence.getRoleAuth({
+                RoleId: Number(this.role)
+            }).then(res => {
+                if (res.Ret !== 200) return
+                this.loading && this.loading.close()
+                if (!res.Data) return
+                const {
+                    List,
+                    ChoiceList = [],
+                    HalfChoiceList = []
+                } = res.Data
+                this.authList = List || []
+                this.defaultCheckedKeys = ChoiceList.filter((item) => !HalfChoiceList.some((halfItem) =>
+                    item === halfItem))
+                const type = this.isLook?'all':''
+                this.authList.forEach(l=>{
+                    this.formatTree(l,type)
+                })
+            })
+        },
+        // 保存
+        saveAuth() {
+            const keys = this.$refs.checkboxTree.getCheckedKeys()
+            const halfKeys = this.$refs.checkboxTree.getHalfCheckedKeys()
+            if(!keys.length&&!halfKeys.length){
+                this.$message.warning('请至少选择一个权限')
+                return
+            }
+            const ChoiceList = Array.from(new Set([...keys,...halfKeys]))
+            departInterence.saveRoleAuth({
+                RoleId:Number(this.role),
+                MenuIds:ChoiceList,
+                HalfMenuIds:halfKeys
+            }).then(res=>{
+                if(res.Ret!==200) return 
+                this.$message.success('权限设置成功')
+            })
+        },
+        formatTree(data,type){
+            if(/* data.MenuType===2|| */type==='all'){
+                //同时存一下ParentId
+                //监听check事件,如果是ParentId的check,就把子项从defaultCheckedKeys中删除
+                data.Disabled = true
+            }
+            if(data.Children && data.Children.length){
+                data.Children = data.Children.map(i=>{
+                    return this.formatTree(i,type)
+                })
+            }
+            return data
+        },
+    },
+    created() {
+        //只查看权限 不可编辑
+        if (this.$route.query.id) {
+            this.role = Number(this.$route.query.id);
+            this.isLook = true;
+        }
+    },
+    mounted() {
+        this.getRoles();
+    },
+}
+</script>
+<style lang='scss'>
+.authManage_container {
+    * {
+        box-sizing: border-box;
+    }
+    .auth_cont_top {
+        font-size: 16px;
+        color: #333;
+        display: flex;
+        // justify-content: space-between;
+        align-items: center;
+        border: 1px solid #ECECEC;
+        padding: 20px 30px;
+        background: #fff;
+        border-radius: 4px;
+        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
+        justify-content: space-between;
+    }
+
+    .auth_bot {
+        min-height: calc(100vh - 224px);
+        padding: 30px;
+        background: #fff;
+        margin-top: 20px;
+        position: relative;
+        border: 1px solid #ECECEC;
+        border-radius: 4px;
+        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
+
+        .el-tree {
+            border-top: 1px solid #E5E7ED;
+            border-left: 1px solid #E5E7ED;
+            border-right: 1px solid #E5E7ED;
+            width: 98%;
+            margin-bottom: 40px;
+
+            .el-tree-node__label {
+                margin: 10px;
+            }
+
+            .el-tree-node__content {
+                min-width: 200px;
+                width: 200px;
+                white-space: normal;
+                box-sizing: border-box;
+            }
+
+            .el-tree-node {
+                .el-tree-node {
+                    .el-tree-node__children {
+                        width: 100%;
+                    }
+
+                    .el-tree-node {
+                        &:not(:first-child) {
+                            /* .el-tree-node__content{
+                        border-right: 1px solid #E5E7ED;
+                    } */
+                            border-top: 1px solid #E5E7ED;
+                        }
+
+                        .el-tree-node__content {
+                            border-right: 1px solid #E5E7ED;
+                        }
+                    }
+
+                }
+            }
+
+            .el-tree-node__content {
+                padding: 5px 10px !important;
+                height: auto;
+
+                .el-tree-node__expand-icon.el-icon-caret-right {
+                    //display: none;
+                }
+            }
+
+            >.el-tree-node {
+                padding: 0 !important;
+                display: flex;
+                border-bottom: 1px solid #E5E7ED;
+
+                >.el-tree-node__children {
+                    width: 100%;
+
+                    >.el-tree-node {
+                        &:not(:first-child) {
+                            border-top: 1px solid #E5E7ED;
+                        }
+
+                        >.el-tree-node__content {
+                            border-left: 1px solid #E5E7ED;
+                            border-right: 1px solid #E5E7ED;
+                        }
+                    }
+                }
+            }
+
+            .el-tree-node__children {
+                display: flex;
+                flex-direction: column;
+
+                .el-tree-node {
+                    display: flex;
+                    flex:1;
+                    padding: 0px !important;
+
+                    .el-tree-node__content {
+                        border-bottom: none;
+
+                        .custom-tree-node {
+                            height: 24px;
+                            display: flex;
+                            align-items: center;
+
+                            .tree-btn {
+                                margin-left: 10px;
+                                display: none;
+                            }
+
+                            .el-button {
+                                padding: 0px !important;
+                                border-radius: 4px;
+                                background: #363554;
+                                color: #ffffff;
+                            }
+                        }
+                    }
+
+                    .el-tree-node__children {
+                        .el-tree-node {
+                            &:not(:first-child) {
+                                .el-tree-node__content {
+                                    //border-left: none;
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        .auth-wrap{
+            margin-top: 20px;
+        }
+    }
+}
+</style>

+ 58 - 13
src/views/system_manage/operateAuthManage.vue

@@ -2,10 +2,10 @@
   <div class="container">
     <div class="top">
       <ul class="tab-ul">
-        <li :class="['tab-li',{act: default_tab===item.key}]" v-for="item in tabs" :key="item.key" @click="changeTab(item)">{{item.label}}</li>
+        <li :class="['tab-li',{act: default_tab===item.key}]" v-for="item in authTabs" :key="item.key" @click="changeTab(item)">{{item.label}}</li>
       </ul>
 
-      <div class="right-side">
+      <div class="right-side" v-if="authTabs.length">
         <el-input 
           v-model="searchForm.key_word" 
           :placeholder="default_tab === 5 ? '请输入图表名称' : '请输入指标Id/指标名称'" 
@@ -19,7 +19,7 @@
     </div>
 
     <div class="top">
-        <div>
+        <div v-if="authTabs.length">
           <el-cascader
             v-model="searchForm.classification"
             :options="classificationList"
@@ -58,9 +58,10 @@
           />
         </div>
         <div>
-          <el-button type="primary" @click="editAuthHandle({},'multiple')">批量编辑</el-button>
+          <el-button type="primary" @click="editAuthHandle({},'multiple')" 
+          v-if="[3,4].includes(default_tab)?authBtn('edit'):authTabs.length">批量编辑</el-button>
           <el-button type="primary" @click="edbAuthSetHandle({},'multiple')" v-if="[3,4].includes(default_tab
-        )">权限设置</el-button>
+        )&&authBtn('auth')">权限设置</el-button>
         </div>
     </div>
      <el-table
@@ -88,8 +89,8 @@
           <template slot-scope="{row}">
             <template v-if="item.key==='handle'">
               <span class="editsty" @click="edbAuthSetHandle(row)" v-if="[3,4].includes(default_tab
-        )">权限设置</span>
-              <span class="editsty" @click="editAuthHandle(row)">编辑</span>
+        )&&authBtn('auth')">权限设置</span>
+              <span class="editsty" @click="editAuthHandle(row)" v-if="[3,4].includes(default_tab)?authBtn('edit'):authTabs.length">编辑</span>
             </template>
 
             <span v-else>{{ row[item.key] }}</span>
@@ -174,7 +175,8 @@
 
 <script>
 import { operateAuthInterface } from '@/api/modules/setApi';
-import { customInterence } from '@/api/modules/crmApi';
+// import { customInterence } from '@/api/modules/crmApi';
+import {dataBaseInterface} from '@/api/modules/chartApi'
 import mPage from '@/components/mPage';
 import mDialog from '@/components/mDialog';
 import edbSetDialog from './components/authSetDialog.vue';
@@ -193,7 +195,26 @@ export default {
         { label: '创建人',key: 'CreateUserName' },
         { label: '操作',key: 'handle' },
       ]
-    }
+    },
+    //权限配置化后的tabs
+    authTabs(){
+        const {operateAuthPermission,checkPermissionBtn} = this.permissionBtn
+        const operaMap = {
+            1:checkPermissionBtn(operateAuthPermission.operateAuth_manual),
+            2:checkPermissionBtn(operateAuthPermission.operateAuth_mysteel),
+            3:checkPermissionBtn(operateAuthPermission.operateAuth_etaLib),
+            4:checkPermissionBtn(operateAuthPermission.operateAuth_etaPredictLib),
+            5:checkPermissionBtn(operateAuthPermission.operateAuth_chartLib),
+        }
+        let temp = []
+        for(const k in operaMap){
+            console.log('k',k,operaMap[k])
+            if(operaMap[k]){
+                temp.push(this.tabs[k-1])
+            }
+        }
+        return temp
+    },
   },
   data() {
     return {
@@ -265,10 +286,11 @@ export default {
     },
     /* 获取用户列表 */
     getUserList() {
-      customInterence.getSale({Status: 0,AllEnabled: true}).then(res => {
+      // customInterence.getSale({Status: 0,AllEnabled: true}).then(res => {
+      dataBaseInterface.getEdbChartAdminList({Source: this.default_tab}).then(res=>{
         if(res.Ret !== 200) return
 
-        this.userList = res.Data.List || [];
+        this.userList = res.Data || [];
       })
     },
     /* 获取分类列表 */
@@ -283,8 +305,10 @@ export default {
     changeTab({key}) {
       this.default_tab = key;
       this.searchForm.classification=[]
+      this.searchForm.user=''
       this.page_no = 1;
       this.getClassificationList()
+      this.getUserList()
       this.getTableData();
     },
 
@@ -349,13 +373,34 @@ export default {
     cancelDialogHandle() {
       this.$refs.formRef.resetFields();
       this.isOpenDialog = false
+    },
+    authBtn(type){
+        const {operateAuthPermission,checkPermissionBtn} = this.permissionBtn
+        const authMap = {
+            3:operateAuthPermission.operateAuth_etaLib_authSetting,
+            4:operateAuthPermission.operateAuth_etaPredictLib_authSetting,
+        }
+        const editMap = {
+            3:operateAuthPermission.operateAuth_etaLib_edit,
+            4:operateAuthPermission.operateAuth_etaPredictLib_edit,
+        }
+        if(type==='auth'){
+            return checkPermissionBtn(authMap[this.default_tab])
+        }else{
+            return checkPermissionBtn(editMap[this.default_tab])
+        }
     }
   },
   mounted() {
-    this.getUserList();
+    if(this.authTabs.length){
+        this.getUserList();
+    }
   },
   created(){
-    this.getClassificationList()
+    if(this.authTabs.length){
+        this.default_tab = this.authTabs[0].key
+        this.getClassificationList()
+    }
   }
 }
 </script>

+ 8 - 4
src/views/system_manage/roleManage.vue

@@ -2,8 +2,10 @@
 	<div class="roleManage_container">
 		<div class="role_cont_top">
 			<div>
-				<el-button type="primary" @click="addRole" style="marginRight:14px;">添加角色</el-button>
-				<el-button type="primary" @click="setAuth">设置权限</el-button>
+				<el-button v-permission="permissionBtn.sysDepartPermission.sysRole_addRole"
+					type="primary" @click="addRole" style="marginRight:14px;">添加角色</el-button>
+				<el-button v-permission="permissionBtn.sysDepartPermission.sysRole_settingAuth"
+					type="primary" @click="setAuth">设置权限</el-button>
 			</div>
 			<el-input
 				placeholder="角色搜索"
@@ -42,9 +44,11 @@
 				<el-table-column label="操作" align="center">
 					<template slot-scope="scope">
 						<div style="color:#4099ef; font-size:24px;">
-							<span class="editsty" @click.stop="getAuthDetail(scope.row)" style="marginRight:20px;">查看权限</span>
+							<span v-permission="permissionBtn.sysDepartPermission.sysRole_settingAuth"
+								class="editsty" @click.stop="getAuthDetail(scope.row)" style="marginRight:20px;">查看权限</span>
 							<!-- <span class="editsty" @click.stop="editRole(scope.row)" style="marginRight:20px;">编辑</span> -->
-							<span class="deletesty" @click.stop="delRole(scope.row)">删除</span>
+							<span v-permission="permissionBtn.sysDepartPermission.sysRole_del"
+								class="deletesty" @click.stop="delRole(scope.row)">删除</span>
 						</div>
 					</template>
 				</el-table-column>

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.