hbchen 4 місяців тому
батько
коміт
c660979603

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

@@ -122,6 +122,7 @@
 <script>
 import * as sheetInterface from '@/api/modules/sheetApi.js';
 import { dataBaseInterface } from 'api/api.js';
+import {etaBaseConfigInterence} from '@/api/modules/etaBaseConfigApi.js';
 import selectTarget from '@/views/chartRelevance_manage/components/selectTarget.vue';
 import CustomTable from './components/CustomTable.vue'
 import html2canvas from 'html2canvas';
@@ -186,7 +187,8 @@ export default {
       // 取消自动保存,比如返回的时候
       cancelAutoSave:false,
       sheetSourceFrom:null,
-      isShowSourceDialog:false
+      isShowSourceDialog:false,
+      showSourceFrom:true
     }
   },
   methods: {
@@ -199,6 +201,11 @@ export default {
     /* 获取表格详情 */
     async getDetail() {
       if(!this.sheetId){
+        const res = await etaBaseConfigInterence.getBaseConfig()
+        if(res.Ret==200){
+          const Data = res.Data||{}
+          this.showSourceFrom = Data.ChartSourceDisplay==='true'?true:false
+        } 
         this.sheetForm.SourcesFrom = this.setDefaultSource()
         this.sheetSourceFrom = JSON.parse(this.sheetForm.SourcesFrom)
         return
@@ -236,7 +243,7 @@ export default {
     },
     setDefaultSource(sourceText){
       return JSON.stringify({
-        isShow: true,
+        isShow: this.showSourceFrom,
         text: sourceText,
         color: "#606266",
         fontSize: 9

+ 10 - 3
src/views/datasheet_manage/mixedSheetEdit.vue

@@ -83,6 +83,7 @@
 <script>
 import * as sheetInterface from '@/api/modules/sheetApi.js';
 import { dataBaseInterface } from 'api/api.js';
+import {etaBaseConfigInterence} from '@/api/modules/etaBaseConfigApi.js';
 import selectTarget from '@/views/chartRelevance_manage/components/selectTarget.vue';
 import MixedTable from './components/MixedTable.vue'
 import html2canvas from 'html2canvas';
@@ -149,7 +150,8 @@ export default {
 
       updating:false,//更新状态
       sheetSourceFrom:null,
-      isShowSourceDialog:false
+      isShowSourceDialog:false,
+      showSourceFrom:true
     }
   },
   methods: {
@@ -162,7 +164,12 @@ export default {
     /* 获取表格详情 */
     async getDetail(type='init') {
       if(!this.sheetId){
-        this.sheetForm.SourcesFrom = this.setDefaultSource('')
+        const res = await etaBaseConfigInterence.getBaseConfig()
+        if(res.Ret==200){
+          const Data = res.Data||{}
+          this.showSourceFrom = Data.ChartSourceDisplay==='true'?true:false
+        } 
+        this.sheetForm.SourcesFrom = this.setDefaultSource()
         this.sheetSourceFrom = JSON.parse(this.sheetForm.SourcesFrom)
         return
       } 
@@ -203,7 +210,7 @@ export default {
     },
     setDefaultSource(sourceText){
       return JSON.stringify({
-        isShow: true,
+        isShow: this.showSourceFrom,
         text: sourceText,
         color: "#606266",
         fontSize: 9

+ 10 - 2
src/views/ppt_manage/mixins/pptMixins.js

@@ -587,16 +587,24 @@ export default {
 				UniqueCode: id
 			})
       if(res.Ret !== 200) return 0
-      const {TableInfo,SourcesFrom} = res.Data
+      const {TableInfo,SourcesFrom,ExcelSource} = res.Data
       //console.log('get')
       this.sheetDataMap[id] ={
         list:_.cloneDeep(TableInfo.TableDataList),
         otherParams:{
-          SourcesFrom
+          SourcesFrom:SourcesFrom?SourcesFrom:this.setDefaultSource(ExcelSource)
         }
       }
       return 1
     },
+    setDefaultSource(sourceText){
+      return JSON.stringify({
+        isShow: true,
+        text: sourceText,
+        color: "#606266",
+        fontSize: 9
+      })
+    },
     initCharts(elements, page) {
         console.log('initCharts')
       const index = this.pageList.findIndex((i) => i.id === page.id)