فهرست منبع

相关性图表点更新重新保存缩略图

Karsa 1 سال پیش
والد
کامیت
9ff1aaa703
1فایلهای تغییر یافته به همراه8 افزوده شده و 16 حذف شده
  1. 8 16
      src/views/chartRelevance_manage/components/chartCard.vue

+ 8 - 16
src/views/chartRelevance_manage/components/chartCard.vue

@@ -7,7 +7,7 @@
       <div style="flex-shrink: 0">
         <template v-if="isHaveEdbHandle">
           <el-dropdown 
-            v-if="isEdbAdd" 
+            v-show="isEdbAdd" 
             split-button 
             type="primary" 
             @click="updateEdbHandle(entryType)" 
@@ -18,22 +18,22 @@
               <el-dropdown-item :command="{entryType,scence:'saveOther'}">指标另存为</el-dropdown-item>
             </el-dropdown-menu>
           </el-dropdown>
-          <el-button type="primary" v-else @click="saveEdb(entryType)">保存指标</el-button>
+          <el-button type="primary" v-show="!isEdbAdd" @click="saveEdb(entryType)">保存指标</el-button>
         </template>
 
         <el-dropdown 
-          v-if="isChartAdd" 
+          v-show="isChartAdd" 
           split-button 
           type="primary" 
           @click="updateChartHandle(entryType)" 
           @command="chartCommandHandle"
         >
           更新
-          <el-dropdown-menu slot="dropdown" v-if="isHaveSaveOtherHandle">
+          <el-dropdown-menu slot="dropdown" v-show="isHaveSaveOtherHandle">
             <el-dropdown-item :command="{entryType,scence:'saveOther'}">另存为</el-dropdown-item>
           </el-dropdown-menu>
         </el-dropdown>
-        <el-button type="primary" @click="saveChart(entryType)" v-else>保存</el-button>
+        <el-button type="primary" @click="saveChart(entryType)" v-show="!isChartAdd">保存</el-button>
 
       </div>
     </div>
@@ -206,16 +206,7 @@ export default {
 
     /* 设置图表封面图片 */
     setChartImage(entryType,id) {
-      let otherOptions = this.chartInfo.Source===3 ? {
-        chart: {
-          width:340,
-          height:230,
-        },
-        xAxis:[{
-          ...this.options.xAxis,
-          offset: -65,
-        }]//这里记得要写成你渲染的图的配置项一样的 单独就配置一个offset无效
-      } : {
+      let otherOptions = {
         chart: {
           width:340,
           height:230,
@@ -265,7 +256,8 @@ export default {
       } 
 
       if(res.Ret !== 200) return
-
+      
+      this.setChartImage(entryType,res.Data.ChartInfoId)
       this.$message.success('更新成功');
     },