Explorar o código

商品价格曲线配置化

cxmo hai 1 ano
pai
achega
19e38a4d14

+ 32 - 2
src/components/chart/chartDetailHandlesWrap.vue

@@ -106,7 +106,7 @@ export default {
     //由于多个图表共用这个操作栏,通过路由判断
     isShowBtn(btn){
         const {path} = this.$route
-        const {statisticPermission,checkPermissionBtn} = this.permissionBtn
+        const {statisticPermission,productPricePermission,checkPermissionBtn} = this.permissionBtn
         const chartrelevanceMap = {
             share:checkPermissionBtn(statisticPermission.corrAnalysis_share),
             addMyChart:checkPermissionBtn(statisticPermission.corrAnalysis_addMyChart),
@@ -140,6 +140,28 @@ export default {
             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]
@@ -153,7 +175,15 @@ export default {
             return statisticFeatureMap[btn]
         }
         //商品价格曲线
-        if(path==='/commordityChartBase'){}
+        if(path==='/commordityChartBase'){
+            const {Source,ChartType} = this.chartInfo
+            if(Source===2&&ChartType===8){//是商品价格曲线
+                return priceLineMap[btn]
+            }else{//是利润曲线
+                return incomeLine[btn]
+            }
+            
+        }
 
         return false
     }

+ 25 - 0
src/utils/buttonConfig.js

@@ -373,6 +373,31 @@ export const stockPlantPermission = {
 /*
  * --------------------------------------------------------------------------商品价格曲线------------------------------------------------
 */
+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',
+}
 /*
  * --------------------------------------------------------------------------系统设置------------------------------------------------
 */

+ 4 - 2
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">

+ 2 - 0
src/vuex/modules/permissionButton.js

@@ -42,6 +42,8 @@ const permissionButtons = {
                     {button_code:'statisticFeature:share'},
                     //stockPlant:anlysisView
                     {button_code:'stockPlant:anlysisView'},
+                    //goodsPrice:incomeLine:refresh
+                    {button_code:'goodsPrice:incomeLine:refresh'},
                 ]
                 commit('SET_PERMISSION_BUTTONS',buttons)
                 resolve('获取权限按钮成功')