Browse Source

翻译冲突解决

hbchen 4 months ago
parent
commit
a7887c233f
25 changed files with 685 additions and 217 deletions
  1. 9 0
      src/api/modules/sheetApi.js
  2. 4 0
      src/lang/commonLang.js
  3. 10 0
      src/lang/modules/ETATables/commonLang.js
  4. 32 2
      src/lang/modules/systemManage/ChartSet.js
  5. 3 1
      src/views/dataEntry_manage/components/barOptionSection.vue
  6. 1 1
      src/views/dataEntry_manage/components/chartSourceEditDialog.vue
  7. 5 5
      src/views/dataEntry_manage/mixins/addOreditMixin.js
  8. 45 31
      src/views/dataEntry_manage/mixins/chartPublic.js
  9. 22 5
      src/views/datasheet_manage/components/MixedTable.vue
  10. 12 4
      src/views/datasheet_manage/components/calculateEdbDia.vue
  11. 18 3
      src/views/datasheet_manage/components/insertDateDia.vue
  12. 12 3
      src/views/datasheet_manage/components/selectTargetValueDia.vue
  13. 81 11
      src/views/datasheet_manage/customSheetEdit.vue
  14. 76 8
      src/views/datasheet_manage/mixedSheetEdit.vue
  15. 24 2
      src/views/datasheet_manage/sheetList.vue
  16. 41 25
      src/views/ppt_manage/mixins/mixins.js
  17. 21 6
      src/views/ppt_manage/mixins/pptMixins.js
  18. 21 2
      src/views/ppt_manage/newVersion/components/formatEl/SheetEl.vue
  19. 15 15
      src/views/ppt_manage/newVersion/css/format.scss
  20. 8 5
      src/views/ppt_manage/newVersion/pptEnPublish.vue
  21. 7 4
      src/views/ppt_manage/newVersion/pptPublish.vue
  22. 26 0
      src/views/system_manage/chartTheme/common/config.js
  23. 112 62
      src/views/system_manage/chartTheme/components/optionsSection.vue
  24. 2 1
      src/views/system_manage/chartTheme/index.vue
  25. 78 21
      src/views/system_manage/chartTheme/themeSetting.vue

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

@@ -280,6 +280,15 @@ export const refreshCustomSheet = params => {
 	return http.get('/datamanage/excel_info/table/refresh',params)
 	return http.get('/datamanage/excel_info/table/refresh',params)
 }
 }
 
 
+/**
+ * 表格 获取原始指标来源
+ * @param {*} params  EdbInfoId
+ * @returns  
+ */
+export const getEdbBaseSource = params => {
+	return http.get('/datamanage/excel_info/get_edb_source',params)
+}
+
 /**
 /**
  * 下载excel
  * 下载excel
  * @param {*} params ExcelInfoId authorization
  * @param {*} params ExcelInfoId authorization

+ 4 - 0
src/lang/commonLang.js

@@ -338,6 +338,10 @@ export default {
       en:'Add',
       en:'Add',
       zh:'新增'
       zh:'新增'
     },
     },
+    edit_btn:{
+      en:'Edit',
+      zh:'编辑'
+    },
     to: {
     to: {
       en: ' To ',
       en: ' To ',
       zh:'至'
       zh:'至'

+ 10 - 0
src/lang/modules/ETATables/commonLang.js

@@ -240,6 +240,16 @@ export default {
       zh: "更新时间 ",
       zh: "更新时间 ",
       en: "Updating Time",
       en: "Updating Time",
     }
     }
+  },
+  Common:{
+    data_source:{
+      zh: "数据来源",
+      en: "Source",
+    },
+    source:{
+      zh: "来源",
+      en: "Source",
+    }
   }
   }
 };
 };
 
 

+ 32 - 2
src/lang/modules/systemManage/ChartSet.js

@@ -5,11 +5,13 @@
 /* 英文 */
 /* 英文 */
 export const ChartSetEn = {
 export const ChartSetEn = {
     label00:'Chart Data Source Setting',
     label00:'Chart Data Source Setting',
-    label00_hint:'Enabling the switch means data source visibility is on by default for new charts and can be toggled manually. Conversely, if disabled, it applies to new charts only, not historical ones.',
+    label00_hint:`<p>The state of "enabled" indicates that when creating a new chart or table, the data source switch is set to "on" by default, and can be manually switched on or off. The "disabled" state works in the same way. </p>
+                <p style="margin-top:10px">Note: This only applies to newly created charts and tables; it does not affect historical charts.</p>`,
     label01:'Chart Types',
     label01:'Chart Types',
     label02:'Chart Library Default Theme',
     label02:'Chart Library Default Theme',
     add_btn:'Add Custom Theme',
     add_btn:'Add Custom Theme',
     edit_btn:'Edit Custom Theme',
     edit_btn:'Edit Custom Theme',
+    rename:'Rename',
     theme_name:'Theme Name',
     theme_name:'Theme Name',
     theme_name_placeholder:'Please enter theme name',
     theme_name_placeholder:'Please enter theme name',
     alert_msg:'After deletion, all charts using this theme will adopt the ETA theme. Are you sure you want to proceed with the deletion?',
     alert_msg:'After deletion, all charts using this theme will adopt the ETA theme. Are you sure you want to proceed with the deletion?',
@@ -35,23 +37,38 @@ export const ChartSetEn = {
     config_opt08:'Font Size',
     config_opt08:'Font Size',
     config_opt09:'Alignment Method',
     config_opt09:'Alignment Method',
     config_opt10:'Background Color',
     config_opt10:'Background Color',
+    config_opt11:'数据标记',
+    config_opt12:'标记类型',
+    config_opt13:'标记大小',
+    config_opt14:'标记颜色',
+
+    square:'Square',
+    circle:'Circle',
+    // diamond-砖石 highcharts里面菱形标记的值,所以这边用diamond
+    diamond:'Rhomboid',
+    triangle:'Triangle',
+    triangle_down:'Inverted Triangle',
 
 
     unit01:'st Line',
     unit01:'st Line',
     unit02:'st Bar',
     unit02:'st Bar',
     unit03:'st Series',
     unit03:'st Series',
     config_opt05_yes:'Yes',
     config_opt05_yes:'Yes',
     config_opt05_no:'No',
     config_opt05_no:'No',
+    config_opt11_none:'无',
+    config_opt11_inside:'内置',
     set_hint:'The default theme is set successfully',
     set_hint:'The default theme is set successfully',
 };
 };
   
   
 /* 中文 */
 /* 中文 */
 export const ChartSetZh = {
 export const ChartSetZh = {
     label00:'图表的数据来源',
     label00:'图表的数据来源',
-    label00_hint:'开启状态表示新建图表时,数据来源展示开关默认开启,可手动切换,关闭状态同理,仅对新增图表生效,历史图表不处理',
+    label00_hint:`<p>开启状态表示新建图表或表格时,数据来源开关默认开启,可手动切换,关闭状态同理。</p>
+                <p style="margin-top:10px">注:仅对新增图表、表格生效,历史图表不处理。</p>`,
     label01:'图表类型',
     label01:'图表类型',
     label02:'图库默认主题',
     label02:'图库默认主题',
     add_btn:'添加自定义主题',
     add_btn:'添加自定义主题',
     edit_btn:'编辑自定义主题',
     edit_btn:'编辑自定义主题',
+    rename:'重命名',
     theme_name:'主题名称',
     theme_name:'主题名称',
     theme_name_placeholder:'请输入主题名称',
     theme_name_placeholder:'请输入主题名称',
     alert_msg:'删除后,所有采用该主题的图表,将采用ETA主题,是否确定删除?',
     alert_msg:'删除后,所有采用该主题的图表,将采用ETA主题,是否确定删除?',
@@ -77,12 +94,25 @@ export const ChartSetZh = {
     config_opt08:'字号',
     config_opt08:'字号',
     config_opt09:'对齐方式',
     config_opt09:'对齐方式',
     config_opt10:'背景色',
     config_opt10:'背景色',
+    config_opt11:'数据标记',
+    config_opt12:'标记类型',
+    config_opt13:'标记大小',
+    config_opt14:'标记颜色',
+
+    square:'正方形',
+    circle:'圆形',
+    // diamond-砖石 highcharts里面菱形标记的值,所以这边用diamond
+    diamond:'菱形',
+    triangle:'三角形',
+    triangle_down:'倒三角形',
 
 
     unit01:'条',
     unit01:'条',
     unit02:'根',
     unit02:'根',
     unit03:'系列',
     unit03:'系列',
     config_opt05_yes:'是',
     config_opt05_yes:'是',
     config_opt05_no:'否',
     config_opt05_no:'否',
+    config_opt11_none:'无',
+    config_opt11_inside:'内置',
     set_hint:'默认主题设置成功',
     set_hint:'默认主题设置成功',
 };
 };
   
   

+ 3 - 1
src/views/dataEntry_manage/components/barOptionSection.vue

@@ -259,8 +259,10 @@ export default {
         this.dateList.push(date_item)
         this.dateList.push(date_item)
         
         
         let themeOpt = this.chartInfo.ChartThemeStyle ? JSON.parse(this.chartInfo.ChartThemeStyle) : null;
         let themeOpt = this.chartInfo.ChartThemeStyle ? JSON.parse(this.chartInfo.ChartThemeStyle) : null;
+        // 看colorsOptions返不返回再说
+        console.log(themeOpt,'themeOpt');
         this.dateList.forEach((item,index) => {
         this.dateList.forEach((item,index) => {
-          item.Color = item.Color || (themeOpt&&themeOpt.colorsOptions[index]||defaultOpts.colors[index]);
+          item.Color = item.Color || (themeOpt &&themeOpt.lineOptionList[index].color || defaultOpts.colors[index]);
         })
         })
       }
       }
       this.cancelDialog()
       this.cancelDialog()

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

@@ -20,7 +20,7 @@
         <el-form-item :label="$t('Edb.Detail.source')">
         <el-form-item :label="$t('Edb.Detail.source')">
           <el-input
           <el-input
             v-model="chartSourceForm.text"
             v-model="chartSourceForm.text"
-            :placeholder="$t('Chart.Detail.input_content')"
+            :placeholder="$t('Chart.InputHolderAll.input_content')"
           />
           />
         </el-form-item>
         </el-form-item>
         <el-form-item :label="$t('Chart.Detail.color')" style="margin-bottom:8px;">
         <el-form-item :label="$t('Chart.Detail.color')" style="margin-bottom:8px;">

+ 5 - 5
src/views/dataEntry_manage/mixins/addOreditMixin.js

@@ -632,14 +632,14 @@ export default {
 		setAddChartDefault() {
 		setAddChartDefault() {
 
 
 			let themeOpt = this.chartInfo.ChartThemeStyle ? JSON.parse(this.chartInfo.ChartThemeStyle) : null;
 			let themeOpt = this.chartInfo.ChartThemeStyle ? JSON.parse(this.chartInfo.ChartThemeStyle) : null;
-
+			console.log(themeOpt,'themeOpt');
 			this.tableData.forEach((item,index) => {
 			this.tableData.forEach((item,index) => {
 				item.ChartColor = item.ChartColor || (themeOpt&&themeOpt.colorsOptions[index]||defaultOpts.colors[index]);
 				item.ChartColor = item.ChartColor || (themeOpt&&themeOpt.colorsOptions[index]||defaultOpts.colors[index]);
 				item.PredictChartColor = item.PredictChartColor || (themeOpt&&themeOpt.colorsOptions[index]||defaultOpts.colors[index]);
 				item.PredictChartColor = item.PredictChartColor || (themeOpt&&themeOpt.colorsOptions[index]||defaultOpts.colors[index]);
-				item.ChartStyle = item.ChartStyle || (themeOpt&&themeOpt.lineOptions.lineType||'spline');
+				item.ChartStyle = item.ChartStyle || (themeOpt&&themeOpt.lineOptionList[index].lineType||'spline');
 				
 				
 				let configLineWid = index===0?3:1;//兼容预测指标绘图无主题配置
 				let configLineWid = index===0?3:1;//兼容预测指标绘图无主题配置
-				this.tableData[index].ChartWidth = this.tableData[index].ChartWidth || (themeOpt&&themeOpt.lineOptions.lineWidth||configLineWid);
+				this.tableData[index].ChartWidth = this.tableData[index].ChartWidth || (themeOpt&&themeOpt.lineOptionList[index].lineWidth||configLineWid);
 			})
 			})
 		},
 		},
 
 
@@ -971,10 +971,10 @@ export default {
 			this.tableData.forEach((item,index) => {
 			this.tableData.forEach((item,index) => {
 				item.ChartColor = themeOpt.colorsOptions[index];
 				item.ChartColor = themeOpt.colorsOptions[index];
 				item.PredictChartColor = themeOpt.colorsOptions[index];
 				item.PredictChartColor = themeOpt.colorsOptions[index];
-				item.ChartStyle = themeOpt.lineOptions.lineType||'spline';
+				item.ChartStyle = themeOpt.lineOptionList[index].lineType||'spline';
 				item.isAxis = item.isAxis||1;
 				item.isAxis = item.isAxis||1;
 
 
-				this.tableData[index].ChartWidth = themeOpt.lineOptions.lineWidth;
+				this.tableData[index].ChartWidth = themeOpt.lineOptionList[index].lineWidth;
 			})
 			})
 
 
 		},
 		},

+ 45 - 31
src/views/dataEntry_manage/mixins/chartPublic.js

@@ -731,7 +731,6 @@ export const chartSetMixin = {
 
 
       /* 主题样式*/
       /* 主题样式*/
       const chartTheme =  this.chartInfo.ChartThemeStyle ? JSON.parse(this.chartInfo.ChartThemeStyle) : null;
       const chartTheme =  this.chartInfo.ChartThemeStyle ? JSON.parse(this.chartInfo.ChartThemeStyle) : null;
-
       //拼接标题 数据列
       //拼接标题 数据列
       let data = [];
       let data = [];
       let ydata = [];
       let ydata = [];
@@ -824,8 +823,8 @@ export const chartSetMixin = {
         //数据列
         //数据列
         let obj = {
         let obj = {
           data: [],
           data: [],
-          type: (chartTheme&&chartTheme.lineOptions.lineType) || 'spline',
-          dashStyle: (chartTheme&&chartTheme.lineOptions.dashStyle)||'Solid',
+          type: (chartTheme&&chartTheme.lineOptionList[index].lineType) || 'spline',
+          dashStyle: (chartTheme&&chartTheme.lineOptionList[index].dashStyle)||'Solid',
           yAxis: sameSideIndex,
           yAxis: sameSideIndex,
           name:
           name:
             dynamic_arr.length > 1
             dynamic_arr.length > 1
@@ -836,7 +835,13 @@ export const chartSetMixin = {
           : `${item.EdbAliasName||item.EdbName}${dynamic_tag}`,
           : `${item.EdbAliasName||item.EdbName}${dynamic_tag}`,
           nameEn:item.EdbNameEn?`${item.EdbNameEn}${dynamic_tag_en}`:`${item.EdbAliasName||item.EdbName}${dynamic_tag}`,
           nameEn:item.EdbNameEn?`${item.EdbNameEn}${dynamic_tag_en}`:`${item.EdbAliasName||item.EdbName}${dynamic_tag}`,
           color: item.ChartColor,
           color: item.ChartColor,
-          lineWidth: Number(item.ChartWidth)||(chartTheme&&chartTheme.lineOptions.lineWidth),
+          lineWidth: Number(item.ChartWidth)||(chartTheme&&chartTheme.lineOptionList[index].lineWidth),
+          marker: chartTheme && chartTheme.lineOptionList[index].dataMark && chartTheme.lineOptionList[index].dataMark!='none'?{
+            enabled:true,
+            symbol: chartTheme.lineOptionList[index].markType || 'circle',
+            fillColor:chartTheme.lineOptionList[index].markColor,
+            radius: chartTheme.lineOptionList[index].markSize
+          }:{},
           ...predict_params
           ...predict_params
         };
         };
         item.DataList = item.DataList || [];
         item.DataList = item.DataList || [];
@@ -1034,7 +1039,7 @@ export const chartSetMixin = {
           : `${item.EdbAliasName||item.EdbName}${dynamic_tag}`,
           : `${item.EdbAliasName||item.EdbName}${dynamic_tag}`,
           nameEn:item.EdbNameEn?`${item.EdbNameEn}${dynamic_tag_en}`:`${item.EdbAliasName||item.EdbName}${dynamic_tag}`,
           nameEn:item.EdbNameEn?`${item.EdbNameEn}${dynamic_tag_en}`:`${item.EdbAliasName||item.EdbName}${dynamic_tag}`,
           color: item.ChartColor,
           color: item.ChartColor,
-          lineWidth: Number(item.ChartWidth)||(chartTheme&&chartTheme.lineOptions.lineWidth),
+          lineWidth: Number(item.ChartWidth)||(chartTheme&&chartTheme.lineOptionList[index].lineWidth),
           fillColor: (this.chartInfo.ChartType === 3 || (this.chartInfo.ChartType === 6 && item.ChartStyle === 'areaspline')) ? item.ChartColor : undefined,
           fillColor: (this.chartInfo.ChartType === 3 || (this.chartInfo.ChartType === 6 && item.ChartStyle === 'areaspline')) ? item.ChartColor : undefined,
           borderWidth: 1,
           borderWidth: 1,
           borderColor: item.ChartColor,
           borderColor: item.ChartColor,
@@ -1091,9 +1096,10 @@ export const chartSetMixin = {
                             this.isPredictorChart?chartData.DataList.List.filter((item, index) => index > 0):
                             this.isPredictorChart?chartData.DataList.List.filter((item, index) => index > 0):
                             chartData.DataList.filter((item, index) => index > 0):
                             chartData.DataList.filter((item, index) => index > 0):
                             chartData.DataList||[]
                             chartData.DataList||[]
-       /* 主题样式*/
-       const chartTheme =  this.chartInfo.ChartThemeStyle ? JSON.parse(this.chartInfo.ChartThemeStyle) : null;
-
+      /* 主题样式*/
+      const chartTheme =  this.chartInfo.ChartThemeStyle ? JSON.parse(this.chartInfo.ChartThemeStyle) : null;
+      // 跟颜色对应
+      chartTheme.lineOptionList=chartTheme.lineOptionList.reverse().slice(-chartDataHandle.length)
       let seasonYdata = [],
       let seasonYdata = [],
         seasonData = [];
         seasonData = [];
 
 
@@ -1110,17 +1116,25 @@ export const chartSetMixin = {
         }
         }
 
 
       //数据列
       //数据列
-      for (let j of chartDataHandle) {
+      for (let index in chartDataHandle) {
+        let j = chartDataHandle[index]
+        // console.log(j,index);
         //预测指标配置
         //预测指标配置
         let predict_params =  chartData.EdbInfoCategoryType === 1 ? this.getSeasonPredictParams(j.CuttingDataTimestamp) : {};
         let predict_params =  chartData.EdbInfoCategoryType === 1 ? this.getSeasonPredictParams(j.CuttingDataTimestamp) : {};
-        
+
         let serie_item = {
         let serie_item = {
           data: [],
           data: [],
-          type: (chartTheme&&chartTheme.lineOptions.lineType) || chartData.ChartStyle,
-          dashStyle: (chartTheme&&chartTheme.lineOptions.dashStyle)||'Solid',
+          type: (chartTheme&&chartTheme.lineOptionList[index].lineType) || chartData.ChartStyle,
+          dashStyle: (chartTheme&&chartTheme.lineOptionList[index].dashStyle)||'Solid',
           yAxis: 0,
           yAxis: 0,
           name: this.isPredictorChart?j.Year:j.ChartLegend,
           name: this.isPredictorChart?j.Year:j.ChartLegend,
-          lineWidth: (chartTheme&&chartTheme.lineOptions.lineWidth) || 1,
+          lineWidth: (chartTheme&&chartTheme.lineOptionList[index].lineWidth) || 1,
+          marker: chartTheme && chartTheme.lineOptionList[index].dataMark && chartTheme.lineOptionList[index].dataMark!='none'?{
+            enabled:true,
+            symbol: chartTheme.lineOptionList[index].markType || 'circle',
+            fillColor:chartTheme.lineOptionList[index].markColor,
+            radius: chartTheme.lineOptionList[index].markSize
+          }:{},
           ...predict_params
           ...predict_params
         };
         };
         const data_array = this.calendar_type === '农历' && this.isPredictorChart?_.cloneDeep(j.Items):_.cloneDeep(j.DataList);
         const data_array = this.calendar_type === '农历' && this.isPredictorChart?_.cloneDeep(j.Items):_.cloneDeep(j.DataList);
@@ -1415,7 +1429,7 @@ export const chartSetMixin = {
         color: ChartColor,
         color: ChartColor,
         chartType: 'linear',
         chartType: 'linear',
         marker: {
         marker: {
-          radius: (chartTheme&&chartTheme.lineOptions.radius)||5,
+          radius: (chartTheme&&chartTheme.lineOptionList[0].radius)||5,
         },
         },
       }
       }
       real_data.forEach(_ => {
       real_data.forEach(_ => {
@@ -1586,22 +1600,22 @@ export const chartSetMixin = {
       }
       }
 
 
       //数据列
       //数据列
-      data.forEach(item => {
+      data.forEach((item,index) => {
         //处理首或/尾全是无效数据的以null填充
         //处理首或/尾全是无效数据的以null填充
         let filterData = this.filterInvalidData(item)
         let filterData = this.filterInvalidData(item)
         // console.log(filterData)
         // console.log(filterData)
       
       
         let serie_item = {
         let serie_item = {
           data: filterData,
           data: filterData,
-          type: (chartTheme&&chartTheme.lineOptions.lineType) || 'spline',
-          dashStyle: (chartTheme&&chartTheme.lineOptions.dashStyle)||'Solid',
+          type: (chartTheme&&chartTheme.lineOptionList[index].lineType) || 'spline',
+          dashStyle: (chartTheme&&chartTheme.lineOptionList[index].dashStyle)||'Solid',
           yAxis: 0,
           yAxis: 0,
           name: item.Name,
           name: item.Name,
           nameCh: item.Name,
           nameCh: item.Name,
           nameEn: item.NameEn,
           nameEn: item.NameEn,
           color: item.Color,
           color: item.Color,
           chartType: 'linear',
           chartType: 'linear',
-          lineWidth: (chartTheme&&chartTheme.lineOptions.lineWidth) || 3,
+          lineWidth: (chartTheme&&chartTheme.lineOptionList[index].lineWidth) || 3,
           marker: {
           marker: {
             enabled: false
             enabled: false
           }
           }
@@ -1826,18 +1840,18 @@ export const chartSetMixin = {
 
 
       //处理series
       //处理series
       let seriesData=[]
       let seriesData=[]
-      this.relevanceChartData.YDataList.forEach(item=>{
+      this.relevanceChartData.YDataList.forEach((item,index)=>{
         let serie_item = {
         let serie_item = {
           data: item.Value,
           data: item.Value,
-          type: (chartTheme&&chartTheme.lineOptions.lineType) || 'spline',
-          dashStyle: (chartTheme&&chartTheme.lineOptions.dashStyle)||'Solid',
+          type: (chartTheme&&chartTheme.lineOptionList[index].lineType) || 'spline',
+          dashStyle: (chartTheme&&chartTheme.lineOptionList[index].dashStyle)||'Solid',
           yAxis: 0,
           yAxis: 0,
           name: item.Name,
           name: item.Name,
           nameCh: item.Name,
           nameCh: item.Name,
           nameEn: item.NameEn,
           nameEn: item.NameEn,
           color: item.Color,
           color: item.Color,
           chartType: 'linear',
           chartType: 'linear',
-          lineWidth: (chartTheme&&chartTheme.lineOptions.lineWidth) || 3,
+          lineWidth: (chartTheme&&chartTheme.lineOptionList[index].lineWidth) || 3,
           marker: {
           marker: {
             enabled: false
             enabled: false
           }
           }
@@ -1951,7 +1965,7 @@ export const chartSetMixin = {
 
 
       //数据列
       //数据列
       let series = [];
       let series = [];
-      DataList.forEach(item => {
+      DataList.forEach((item,index) => {
         //数据列
         //数据列
         let series_item = {
         let series_item = {
           data: [],
           data: [],
@@ -1963,7 +1977,7 @@ export const chartSetMixin = {
           chartType: 'linear',
           chartType: 'linear',
           zIndex:1,
           zIndex:1,
           marker: {
           marker: {
-            radius: (chartTheme&&chartTheme.lineOptions.radius)||5,
+            radius: (chartTheme&&chartTheme.lineOptionList[index].radius)||5,
           },
           },
         }
         }
         item.EdbInfoList.forEach(_ => {
         item.EdbInfoList.forEach(_ => {
@@ -2157,18 +2171,18 @@ export const chartSetMixin = {
 
 
       //系列
       //系列
       let series = [];
       let series = [];
-      YDataList.forEach(item => {
+      YDataList.forEach((item,index) => {
         let serie_item = {
         let serie_item = {
           data: item.Value,
           data: item.Value,
           pointPlacement: 'on',
           pointPlacement: 'on',
-          type: (chartTheme&&chartTheme.lineOptions.lineType) || 'line',
-          dashStyle: (chartTheme&&chartTheme.lineOptions.dashStyle)||'Solid',
+          type: (chartTheme&&chartTheme.lineOptionList[index].lineType) || 'line',
+          dashStyle: (chartTheme&&chartTheme.lineOptionList[index].dashStyle)||'Solid',
           yAxis: 0,
           yAxis: 0,
           name: item.Name || item.Date,
           name: item.Name || item.Date,
           nameCh: item.Name || item.Date,
           nameCh: item.Name || item.Date,
           nameEn: item.Date,
           nameEn: item.Date,
           color: item.Color,
           color: item.Color,
-          lineWidth: (chartTheme&&chartTheme.lineOptions.lineWidth) || 1,
+          lineWidth: (chartTheme&&chartTheme.lineOptionList[index].lineWidth) || 1,
           chartType: 'linear'
           chartType: 'linear'
         };
         };
         series.push(serie_item)
         series.push(serie_item)
@@ -2246,14 +2260,14 @@ export const chartSetMixin = {
 
 
         let series_item = {
         let series_item = {
           data: item.Value.map(_ =>[_.X,_.Y]),
           data: item.Value.map(_ =>[_.X,_.Y]),
-          dashStyle: (chartTheme&&chartTheme.lineOptions.dashStyle)||'Solid',
-          type: (chartTheme&&chartTheme.lineOptions.lineType) || 'spline',
+          dashStyle: (chartTheme&&chartTheme.lineOptionList[index].dashStyle)||'Solid',
+          type: (chartTheme&&chartTheme.lineOptionList[index].lineType) || 'spline',
           yAxis: index,
           yAxis: index,
           name: item.Name,
           name: item.Name,
           nameCh: item.Name,
           nameCh: item.Name,
           nameEn: item.NameEn||item.Name,
           nameEn: item.NameEn||item.Name,
           color: item.Color,
           color: item.Color,
-          lineWidth: (chartTheme&&chartTheme.lineOptions.lineWidth)||3,
+          lineWidth: (chartTheme&&chartTheme.lineOptionList[index].lineWidth)||3,
           chartType: 'linear',
           chartType: 'linear',
           zIndex:1
           zIndex:1
         }
         }

+ 22 - 5
src/views/datasheet_manage/components/MixedTable.vue

@@ -255,6 +255,12 @@ export default {
     disabled: { //是否只预览
     disabled: { //是否只预览
       type: Boolean,
       type: Boolean,
       default: false,
       default: false,
+    },
+    sourceFrom:{
+      type: Object,
+      default: ()=>{
+        return {}
+      },
     }
     }
   },
   },
   components: { 
   components: { 
@@ -892,7 +898,7 @@ export default {
     },
     },
 
 
     /* 插入选择指标的值 */
     /* 插入选择指标的值 */
-    insertSelectData({ edbId,value,relationDate,relationUid,str }) {
+    insertSelectData({ edbId,value,relationDate,relationUid,str,sourceName }) {
 
 
       this.insertTargetCell.DataType = 5;
       this.insertTargetCell.DataType = 5;
       this.insertTargetCell.ShowValue = value;
       this.insertTargetCell.ShowValue = value;
@@ -903,6 +909,7 @@ export default {
 
 
       value ? this.$message.success(this.$t('ETable.Msg.insertion_success_msg')) : this.$message.warning(this.$t('ETable.Msg.date_no_data'))
       value ? this.$message.success(this.$t('ETable.Msg.insertion_success_msg')) : this.$message.warning(this.$t('ETable.Msg.date_no_data'))
 
 
+      this.updateSourceFrom(sourceName)
       //如果有关联表格日期就建立新的关联关系
       //如果有关联表格日期就建立新的关联关系
       if(relationDate&&relationUid) {
       if(relationDate&&relationUid) {
         let relation = {
         let relation = {
@@ -1075,7 +1082,9 @@ export default {
     },
     },
 
 
     /* 插入系统/指标日期 */
     /* 插入系统/指标日期 */
-    insertDatehandle({insertValue,dataTimeType,str}) {
+    insertDatehandle({insertValue,dataTimeType,str,sourceName}) {
+
+      this.updateSourceFrom(sourceName)
 
 
       this.insertTargetCell.DataType = 1;
       this.insertTargetCell.DataType = 1;
       this.insertTargetCell.DataTimeType = dataTimeType;
       this.insertTargetCell.DataTimeType = dataTimeType;
@@ -1115,7 +1124,7 @@ export default {
     /* 导入指标计算值 */
     /* 导入指标计算值 */
     insertCalculateData(item) {
     insertCalculateData(item) {
       // console.log(item)
       // console.log(item)
-      const { InsertValue,EdbInfoId,Str,relationDate,relationUid } = item;
+      const { InsertValue,EdbInfoId,Str,relationDate,relationUid,sourceName } = item;
       this.insertTargetCell.DataType = 7;
       this.insertTargetCell.DataType = 7;
       this.insertTargetCell.ShowValue = InsertValue;
       this.insertTargetCell.ShowValue = InsertValue;
       this.insertTargetCell.Value = Str;
       this.insertTargetCell.Value = Str;
@@ -1125,6 +1134,8 @@ export default {
 
 
       InsertValue ? this.$message.success(this.$t('ETable.Msg.insertion_success_msg')) : this.$message.warning(this.$t('ETable.Msg.date_no_data'))
       InsertValue ? this.$message.success(this.$t('ETable.Msg.insertion_success_msg')) : this.$message.warning(this.$t('ETable.Msg.date_no_data'))
 
 
+      this.updateSourceFrom(sourceName)
+
       //如果有关联表格日期就建立新的关联关系
       //如果有关联表格日期就建立新的关联关系
       if(relationDate&&relationUid) {
       if(relationDate&&relationUid) {
         let relation = {
         let relation = {
@@ -1175,14 +1186,12 @@ export default {
 
 
     /* 初始化8行5列 */
     /* 初始化8行5列 */
     initData(initData=null) {
     initData(initData=null) {
-      console.log('initData');
       this.hasInit=false
       this.hasInit=false
       if(initData) {
       if(initData) {
         const { CellRelation,Data } = initData;
         const { CellRelation,Data } = initData;
         this.config.data = Data;
         this.config.data = Data;
         this.insertRelationArr = JSON.parse(CellRelation);
         this.insertRelationArr = JSON.parse(CellRelation);
       }else {
       }else {
-
         this.config.data = new Array(8).fill("").map((_,_rindex) => {
         this.config.data = new Array(8).fill("").map((_,_rindex) => {
           return new Array(5).fill("").map((cell,_cindex) => ({
           return new Array(5).fill("").map((cell,_cindex) => ({
             ShowValue: "",
             ShowValue: "",
@@ -1294,6 +1303,14 @@ export default {
       
       
       this.$set(this.selectCell,'ShowStyle',ShowStyle)
       this.$set(this.selectCell,'ShowStyle',ShowStyle)
       this.$set(this.selectCell,'ShowFormatValue',ShowFormatValue)
       this.$set(this.selectCell,'ShowFormatValue',ShowFormatValue)
+    },
+    // 更新数据来源
+    updateSourceFrom(source){
+      if(!source) return
+      let concatSourceArr = this.sourceFrom.text?`${this.sourceFrom.text},${source}`.split(','):[source];
+      let sourceStr = Array.from(new Set(concatSourceArr)).join(',');
+      this.sourceFrom.text=sourceStr
+      this.$emit('updateSourceName')
     }
     }
   },
   },
 };
 };

+ 12 - 4
src/views/datasheet_manage/components/calculateEdbDia.vue

@@ -368,7 +368,7 @@ export default {
         MoveForward: 0,
         MoveForward: 0,
         relationDate: '',//关联的表格日期
         relationDate: '',//关联的表格日期
         relationUid: '',//关联格子的uid
         relationUid: '',//关联格子的uid
-      }
+      },
     }
     }
   },
   },
   mounted(){
   mounted(){
@@ -452,6 +452,13 @@ export default {
       const res = await sheetInterface.getMixedCalculateData(params)
       const res = await sheetInterface.getMixedCalculateData(params)
       if(res.Ret!==200) return 
       if(res.Ret!==200) return 
 
 
+      let baseSourceName=''
+      await sheetInterface.getEdbBaseSource({EdbInfoId:this.selectEdbInfo.EdbInfoId}).then(res=>{
+        if(res.Ret == 200){
+          // 获取原始指标的来源
+          baseSourceName = res.Data.ExcelSource || ''
+        }
+      })
       this.showResult = true;
       this.showResult = true;
       
       
       this.chooseItem = {
       this.chooseItem = {
@@ -459,7 +466,8 @@ export default {
         relationUid: this.dateSelectForm.Type===2 ? this.dateSelectForm.relationUid : '',
         relationUid: this.dateSelectForm.Type===2 ? this.dateSelectForm.relationUid : '',
         EdbInfoId: this.selectEdbInfo.EdbInfoId,
         EdbInfoId: this.selectEdbInfo.EdbInfoId,
         InsertValue: res.Data.ShowValue||"",
         InsertValue: res.Data.ShowValue||"",
-        Str: JSON.stringify(params)
+        Str: JSON.stringify(params),
+        sourceName:baseSourceName||''
       }
       }
 
 
       // if(!this.calculateShowData.length) return this.$message.warning('该日期无数据')
       // if(!this.calculateShowData.length) return this.$message.warning('该日期无数据')
@@ -482,8 +490,9 @@ export default {
         : await dataBaseInterface.targetList({EdbInfoId:e.EdbInfoId,CurrentIndex: 1})
         : await dataBaseInterface.targetList({EdbInfoId:e.EdbInfoId,CurrentIndex: 1})
 
 
       if(res.Ret !== 200) return
       if(res.Ret !== 200) return
+      
+      const { EdbInfoId,EdbCode,EdbName,Frequency,Unit,StartDate,ModifyTime,PredictDataList,DataList,HaveOperaAuth } = res.Data.Item;
 
 
-      const { EdbInfoId,EdbCode,EdbName,Frequency,Unit,StartDate,ModifyTime,SourceName,PredictDataList,DataList,HaveOperaAuth } = res.Data.Item;
       this.selectEdbInfo = {
       this.selectEdbInfo = {
         EdbCode,
         EdbCode,
         EdbName,
         EdbName,
@@ -491,7 +500,6 @@ export default {
         Unit,
         Unit,
         StartDate,
         StartDate,
         ModifyTime,
         ModifyTime,
-        SourceName,
         EdbInfoId,
         EdbInfoId,
         HaveOperaAuth,
         HaveOperaAuth,
         DataList: PredictDataList ? [...PredictDataList,...DataList].slice(0,5) : DataList.slice(0,5)
         DataList: PredictDataList ? [...PredictDataList,...DataList].slice(0,5) : DataList.slice(0,5)

+ 18 - 3
src/views/datasheet_manage/components/insertDateDia.vue

@@ -151,22 +151,37 @@ export default {
       let backData = {}
       let backData = {}
       //插入系统日期
       //插入系统日期
       // if(this.info.key==='insert-sys-date') {
       // if(this.info.key==='insert-sys-date') {
-
+        // console.log(this.selectEdbInfo,'this.selectEdbInfo');
+        // return 
         let valueParam = {
         let valueParam = {
           EdbInfoId: this.selectEdbInfo.EdbInfoId||0,
           EdbInfoId: this.selectEdbInfo.EdbInfoId||0,
           MoveForward: this.formData.MoveForward,
           MoveForward: this.formData.MoveForward,
           DateChange: this.$refs.dateMoveWayRef.dateChangeArr
           DateChange: this.$refs.dateMoveWayRef.dateChangeArr
         }
         }
-
         let { Data } = await sheetInterface.getSystemDate({
         let { Data } = await sheetInterface.getSystemDate({
           DataTimeType: this.dateChangeSelect,
           DataTimeType: this.dateChangeSelect,
           Value: JSON.stringify(valueParam)
           Value: JSON.stringify(valueParam)
         })
         })
         
         
+        // 获取原始指标来源
+        let baseSourceName=''
+        if(this.dateChangeSelect==2){
+          // 获取指标日期的指标的原始来源
+          await sheetInterface.getEdbBaseSource({
+            EdbInfoId:this.selectEdbInfo.EdbInfoId
+          }).then(res=>{
+            if(res.Ret == 200){
+              baseSourceName = res.Data.ExcelSource || ''
+            }
+          })
+        }
+
+
         backData = {
         backData = {
           insertValue: Data.Date,
           insertValue: Data.Date,
           dataTimeType: this.dateChangeSelect,
           dataTimeType: this.dateChangeSelect,
-          str: JSON.stringify(valueParam)
+          str: JSON.stringify(valueParam),
+          sourceName:baseSourceName||''
         }
         }
       // }else { //指标日期
       // }else { //指标日期
       //   backData = {
       //   backData = {

+ 12 - 3
src/views/datasheet_manage/components/selectTargetValueDia.vue

@@ -166,7 +166,6 @@ export default {
     //插入值的时候再去计算结果
     //插入值的时候再去计算结果
     async insertData() {
     async insertData() {
       if(!this.edbInfo) return this.$message.warning(this.$t('ETableChildren.select_metric_first_msg') )
       if(!this.edbInfo) return this.$message.warning(this.$t('ETableChildren.select_metric_first_msg') )
-
       let Date='';
       let Date='';
       if(this.dateSelectForm.Type===2) { //选框为表格日期再去取Date
       if(this.dateSelectForm.Type===2) { //选框为表格日期再去取Date
         Date = this.dateSelectForm.relationDate;
         Date = this.dateSelectForm.relationDate;
@@ -181,11 +180,20 @@ export default {
       if(res.Ret !== 200) return
       if(res.Ret !== 200) return
 
 
       this.result = res.Data;
       this.result = res.Data;
-
       let value = (this.result.List&&this.result.List.length)
       let value = (this.result.List&&this.result.List.length)
         ? this.result.List.find(_ => _.DataTime===this.result.Date) ? this.result.List.find(_ => _.DataTime===this.result.Date).Value.toString() : ''
         ? this.result.List.find(_ => _.DataTime===this.result.Date) ? this.result.List.find(_ => _.DataTime===this.result.Date).Value.toString() : ''
         : ''
         : ''
 
 
+      let baseSourceName=''
+      // 获取指标日期的指标的原始来源
+      await sheetInterface.getEdbBaseSource({
+        EdbInfoId:this.edbInfo.EdbInfoId
+      }).then(res=>{
+        if(res.Ret == 200){
+          baseSourceName = res.Data.ExcelSource || ''
+        }
+      })
+
       this.chooseItem = {
       this.chooseItem = {
         relationDate: Date,
         relationDate: Date,
         relationUid: this.dateSelectForm.Type===2 ? this.dateSelectForm.relationUid : '',
         relationUid: this.dateSelectForm.Type===2 ? this.dateSelectForm.relationUid : '',
@@ -194,7 +202,8 @@ export default {
         str: JSON.stringify({
         str: JSON.stringify({
           MoveForward: this.dateSelectForm.MoveForward,
           MoveForward: this.dateSelectForm.MoveForward,
           DateChange: this.$refs.dateMoveWayRef.dateChangeArr
           DateChange: this.$refs.dateMoveWayRef.dateChangeArr
-        })
+        }),
+        sourceName:baseSourceName||''
       }
       }
 
 
       this.$emit('insert',this.chooseItem)
       this.$emit('insert',this.chooseItem)

+ 81 - 11
src/views/datasheet_manage/customSheetEdit.vue

@@ -91,17 +91,45 @@
       ref="customTableRef"
       ref="customTableRef"
       @autoSave="autoSaveFun"
       @autoSave="autoSaveFun"
     />
     />
+    <div class="chart-source">
+      <span
+        v-if="sheetSourceFrom"
+        :style="`
+        color: ${sheetSourceFrom.isShow ? sheetSourceFrom.color : '#999'};
+        font-size: ${ sheetSourceFrom.fontSize }px;
+      `"
+      ><!-- 数据来源 -->{{$t('ETable.Common.data_source')}}:{{ sheetSourceFrom.text}}</span>
+      <el-switch
+        v-if="sheetSourceFrom"
+        v-model="sheetSourceFrom.isShow"
+        :active-value="true"
+        :inactive-value="false"
+        style="margin:0 15px;"
+        @change="(e) => {sheetSourceFrom.isShow=e,sheetForm.SourcesFrom=JSON.stringify(sheetSourceFrom)}"
+      />
+      <span class="editsty" @click="isShowSourceDialog=true"><!-- 编辑 -->{{$t('Common.edit_btn')}}</span>
+    </div>
+
+    <!-- 数据来源编辑弹窗 -->
+		<chartSourceEditDia
+			:isShow.sync="isShowSourceDialog"
+			:chartInfo="sheetForm"
+			@update="updateSheetSource"
+		/>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
 import * as sheetInterface from '@/api/modules/sheetApi.js';
 import * as sheetInterface from '@/api/modules/sheetApi.js';
 import { dataBaseInterface } from 'api/api.js';
 import { dataBaseInterface } from 'api/api.js';
+import {etaBaseConfigInterence} from '@/api/modules/etaBaseConfigApi.js';
 import selectTarget from '@/views/chartRelevance_manage/components/selectTarget.vue';
 import selectTarget from '@/views/chartRelevance_manage/components/selectTarget.vue';
 import CustomTable from './components/CustomTable.vue'
 import CustomTable from './components/CustomTable.vue'
 import html2canvas from 'html2canvas';
 import html2canvas from 'html2canvas';
+import chartSourceEditDia from '@/views/dataEntry_manage/components/chartSourceEditDialog.vue';
+
 export default {
 export default {
-  components: { selectTarget,CustomTable },
+  components: { selectTarget,CustomTable,chartSourceEditDia},
   beforeRouteEnter(to, from, next) {
   beforeRouteEnter(to, from, next) {
     if(to.query.id){
     if(to.query.id){
       to.matched[1].name=`编辑表格`
       to.matched[1].name=`编辑表格`
@@ -157,7 +185,10 @@ export default {
       isCanEdit:false,
       isCanEdit:false,
       sheetButton:'',
       sheetButton:'',
       // 取消自动保存,比如返回的时候
       // 取消自动保存,比如返回的时候
-      cancelAutoSave:false
+      cancelAutoSave:false,
+      sheetSourceFrom:null,
+      isShowSourceDialog:false,
+      showSourceFrom:true
     }
     }
   },
   },
   methods: {
   methods: {
@@ -169,7 +200,16 @@ export default {
 
 
     /* 获取表格详情 */
     /* 获取表格详情 */
     async getDetail() {
     async getDetail() {
-      if(!this.sheetId) return
+      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
+      } 
 
 
       const res = await sheetInterface.sheetDetail({
       const res = await sheetInterface.sheetDetail({
 				ExcelInfoId: Number(this.sheetId)
 				ExcelInfoId: Number(this.sheetId)
@@ -184,13 +224,16 @@ export default {
         },1000)
         },1000)
         return 
         return 
       }
       }
-      const { ExcelName,ExcelClassifyId,ExcelType,TableData,ModifyTime,Button} = res.Data;
+      const { ExcelName,ExcelClassifyId,ExcelType,TableData,ModifyTime,Button,SourcesFrom,ExcelSource} = res.Data;
       this.sheetButton=Button
       this.sheetButton=Button
       this.sheetForm = {
       this.sheetForm = {
         name: ExcelName,
         name: ExcelName,
         classify: ExcelClassifyId,
         classify: ExcelClassifyId,
-        sheetType: ExcelType
+        sheetType: ExcelType,
+        SourcesFrom:SourcesFrom || this.setDefaultSource(ExcelSource)
       }
       }
+
+      this.sheetSourceFrom = JSON.parse(this.sheetForm.SourcesFrom)
       this.saveTime =  this.$moment(ModifyTime).format('YYYY-MM-DD HH:mm:ss')
       this.saveTime =  this.$moment(ModifyTime).format('YYYY-MM-DD HH:mm:ss')
 
 
       this.$nextTick(()=>{
       this.$nextTick(()=>{
@@ -198,11 +241,17 @@ export default {
       })
       })
       this.$refs.customTableRef.initSheetData(TableData);
       this.$refs.customTableRef.initSheetData(TableData);
     },
     },
-
+    setDefaultSource(sourceText){
+      return JSON.stringify({
+        isShow: this.showSourceFrom,
+        text: sourceText,
+        color: "#606266",
+        fontSize: 9
+      })
+    },
     /* 选择指标push指标数组 */
     /* 选择指标push指标数组 */
     async handleSelectTarget(e) {
     async handleSelectTarget(e) {
       if(!e) return
       if(!e) return
-
       const { EdbName,EdbNameEn,UnitEn,EdbInfoId,Unit,Frequency } = e;
       const { EdbName,EdbNameEn,UnitEn,EdbInfoId,Unit,Frequency } = e;
       if(this.$refs.customTableRef.config.data.find(_ => _.EdbInfoId===EdbInfoId)) return this.$message.warning(this.$t('OnlineExcelPage.already_exists_msg') )
       if(this.$refs.customTableRef.config.data.find(_ => _.EdbInfoId===EdbInfoId)) return this.$message.warning(this.$t('OnlineExcelPage.already_exists_msg') )
       
       
@@ -217,7 +266,7 @@ export default {
         SortType: this.$refs.customTableRef.config.order===1 ? 'desc' : 'asc',
         SortType: this.$refs.customTableRef.config.order===1 ? 'desc' : 'asc',
         Num: 12
         Num: 12
       })
       })
-      
+      this.updateSourceFrom(Data.ExcelSource)
       this.$refs.customTableRef.updateEdbData({
       this.$refs.customTableRef.updateEdbData({
         Data: Data.Data.map(_ => ({..._,DataTimeType: 1,})),
         Data: Data.Data.map(_ => ({..._,DataTimeType: 1,})),
         EdbAliasName: '',
         EdbAliasName: '',
@@ -253,7 +302,8 @@ export default {
         ExcelClassifyId: classify,
         ExcelClassifyId: classify,
         ExcelImage:'',
         ExcelImage:'',
         Source: 3,
         Source: 3,
-        TableData: this.$refs.customTableRef.getSaveParams()
+        TableData: this.$refs.customTableRef.getSaveParams(),
+        SourcesFrom:this.sheetForm.SourcesFrom
       };
       };
       // console.log("自动保存");
       // console.log("自动保存");
       const res = await sheetInterface.sheetEdit({ ExcelInfoId: Number(this.sheetId),...params })
       const res = await sheetInterface.sheetEdit({ ExcelInfoId: Number(this.sheetId),...params })
@@ -295,7 +345,8 @@ export default {
         ExcelClassifyId: classify,
         ExcelClassifyId: classify,
         ExcelImage: Data.ResourceUrl,
         ExcelImage: Data.ResourceUrl,
         Source: 2,
         Source: 2,
-        TableData: this.$refs.customTableRef.getSaveParams()
+        TableData: this.$refs.customTableRef.getSaveParams(),
+        SourcesFrom:this.sheetForm.SourcesFrom
       };
       };
 
 
       let isAdd = this.sheetId?false:true
       let isAdd = this.sheetId?false:true
@@ -331,7 +382,20 @@ export default {
     //   sheetInterface.markSheetEditStatus({ExcelInfoId: +this.sheetId,Status:2}).then(res=>{
     //   sheetInterface.markSheetEditStatus({ExcelInfoId: +this.sheetId,Status:2}).then(res=>{
     //     if(res.Ret != 200) return 
     //     if(res.Ret != 200) return 
     //   })
     //   })
-    // }
+    // },
+    updateSheetSource(value){
+      if(value){
+        this.sheetSourceFrom={...this.sheetSourceFrom,...value}
+        this.sheetForm.SourcesFrom=JSON.stringify(this.sheetSourceFrom)
+      }
+    },
+    updateSourceFrom(source){
+      if(!source) return
+      let concatSourceArr = this.sheetSourceFrom.text?`${this.sheetSourceFrom.text},${source}`.split(','):[source];
+      let sourceStr = Array.from(new Set(concatSourceArr)).join(',');
+      this.$set(this.sheetSourceFrom,'text',sourceStr)
+      this.sheetForm.SourcesFrom=JSON.stringify(this.sheetSourceFrom)
+    }
   },
   },
   created() {
   created() {
     this.getClassify();
     this.getClassify();
@@ -350,6 +414,8 @@ export default {
 .customSheet-wrap {
 .customSheet-wrap {
   min-height: calc(100vh - 120px);
   min-height: calc(100vh - 120px);
   min-width: 1020px;
   min-width: 1020px;
+  position: relative;
+  padding-bottom: 30px;
   .wrap-top {
   .wrap-top {
     // display: flex;
     // display: flex;
     // justify-content: space-between;
     // justify-content: space-between;
@@ -391,6 +457,10 @@ export default {
     }
     }
 
 
   }
   }
+  .chart-source{
+    position: absolute;
+    bottom: 0;
+  }
 }
 }
 </style>
 </style>
 <style lang="scss">
 <style lang="scss">

+ 76 - 8
src/views/datasheet_manage/mixedSheetEdit.vue

@@ -48,20 +48,49 @@
       </div>
       </div>
     </div>
     </div>
     
     
-    <MixedTable @autoSave="autoSaveFun"
+    <MixedTable @autoSave="autoSaveFun" @updateSourceName="updateSourceFromTable" :sourceFrom="sheetSourceFrom"
       ref="mixedTableRef"
       ref="mixedTableRef"
     />
     />
+    <div class="chart-source">
+      <span
+        v-if="sheetSourceFrom"
+        :style="`
+        color: ${sheetSourceFrom.isShow ? sheetSourceFrom.color : '#999'};
+        font-size: ${ sheetSourceFrom.fontSize }px;
+      `"
+      ><!-- 数据来源 -->{{$t('ETable.Common.data_source')}}:{{ sheetSourceFrom.text}}</span>
+      <el-switch
+        v-if="sheetSourceFrom"
+        v-model="sheetSourceFrom.isShow"
+        :active-value="true"
+        :inactive-value="false"
+        style="margin:0 15px;"
+        @change="(e) => {sheetSourceFrom.isShow=e,sheetForm.SourcesFrom=JSON.stringify(sheetSourceFrom)}"
+      />
+      <span class="editsty" @click="isShowSourceDialog=true"><!-- 编辑 -->{{$t('Common.edit_btn')}}</span>
+    </div>
+
+    <!-- 数据来源编辑弹窗 -->
+		<chartSourceEditDia
+			:isShow.sync="isShowSourceDialog"
+			:chartInfo="sheetForm"
+			@update="updateSheetSource"
+		/>
+
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
 import * as sheetInterface from '@/api/modules/sheetApi.js';
 import * as sheetInterface from '@/api/modules/sheetApi.js';
 import { dataBaseInterface } from 'api/api.js';
 import { dataBaseInterface } from 'api/api.js';
+import {etaBaseConfigInterence} from '@/api/modules/etaBaseConfigApi.js';
 import selectTarget from '@/views/chartRelevance_manage/components/selectTarget.vue';
 import selectTarget from '@/views/chartRelevance_manage/components/selectTarget.vue';
 import MixedTable from './components/MixedTable.vue'
 import MixedTable from './components/MixedTable.vue'
 import html2canvas from 'html2canvas';
 import html2canvas from 'html2canvas';
+import chartSourceEditDia from '@/views/dataEntry_manage/components/chartSourceEditDialog.vue';
+
 export default {
 export default {
-  components: { selectTarget,MixedTable },
+  components: { selectTarget,MixedTable,chartSourceEditDia },
   beforeRouteEnter(to, from, next) {
   beforeRouteEnter(to, from, next) {
     if(to.query.id){
     if(to.query.id){
       to.matched[1].name=`编辑表格`
       to.matched[1].name=`编辑表格`
@@ -120,6 +149,9 @@ export default {
       cancelAutoSave:false,
       cancelAutoSave:false,
 
 
       updating:false,//更新状态
       updating:false,//更新状态
+      sheetSourceFrom:null,
+      isShowSourceDialog:false,
+      showSourceFrom:true
     }
     }
   },
   },
   methods: {
   methods: {
@@ -131,7 +163,16 @@ export default {
 
 
     /* 获取表格详情 */
     /* 获取表格详情 */
     async getDetail(type='init') {
     async getDetail(type='init') {
-      if(!this.sheetId) return
+      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
+      } 
 
 
       const res = await sheetInterface.sheetDetail({
       const res = await sheetInterface.sheetDetail({
 				ExcelInfoId: Number(this.sheetId)
 				ExcelInfoId: Number(this.sheetId)
@@ -150,12 +191,14 @@ export default {
         return 
         return 
       }
       }
 
 
-      const { ExcelName,ExcelClassifyId,TableData,ModifyTime,Button } = res.Data;
+      const { ExcelName,ExcelClassifyId,TableData,ModifyTime,Button,SourcesFrom,ExcelSource } = res.Data;
       this.sheetButton=Button
       this.sheetButton=Button
       this.sheetForm = {
       this.sheetForm = {
         name: ExcelName,
         name: ExcelName,
-        classify: ExcelClassifyId
+        classify: ExcelClassifyId,
+        SourcesFrom:SourcesFrom || this.setDefaultSource(ExcelSource)
       }
       }
+      this.sheetSourceFrom = this.sheetForm.SourcesFrom?JSON.parse(this.sheetForm.SourcesFrom):null
       this.$nextTick(()=>{
       this.$nextTick(()=>{
         this.sheetInit=true
         this.sheetInit=true
       })
       })
@@ -165,7 +208,14 @@ export default {
       
       
       type==='refresh' && this.$message.success(this.$t('OnlineExcelPage.table_data_update_msg') )
       type==='refresh' && this.$message.success(this.$t('OnlineExcelPage.table_data_update_msg') )
     },
     },
-
+    setDefaultSource(sourceText){
+      return JSON.stringify({
+        isShow: this.showSourceFrom,
+        text: sourceText,
+        color: "#606266",
+        fontSize: 9
+      })
+    },
     /* 获取分类 */
     /* 获取分类 */
     getClassify() {
     getClassify() {
       sheetInterface.excelClassifyOne({Source: 3}).then(res => {
       sheetInterface.excelClassifyOne({Source: 3}).then(res => {
@@ -187,7 +237,8 @@ export default {
         ExcelClassifyId: classify,
         ExcelClassifyId: classify,
         ExcelImage:'',
         ExcelImage:'',
         Source: 3,
         Source: 3,
-        TableData: this.$refs.mixedTableRef.getSaveParams()
+        TableData: this.$refs.mixedTableRef.getSaveParams(),
+        SourcesFrom:this.sheetForm.SourcesFrom
       };
       };
       console.log("自动保存");
       console.log("自动保存");
       const res = await sheetInterface.sheetEdit({ ExcelInfoId: Number(this.sheetId),...params })
       const res = await sheetInterface.sheetEdit({ ExcelInfoId: Number(this.sheetId),...params })
@@ -230,8 +281,10 @@ export default {
         ExcelClassifyId: classify,
         ExcelClassifyId: classify,
         ExcelImage: Data.ResourceUrl,
         ExcelImage: Data.ResourceUrl,
         Source: 3,
         Source: 3,
-        TableData: this.$refs.mixedTableRef.getSaveParams()
+        TableData: this.$refs.mixedTableRef.getSaveParams(),
+        SourcesFrom:this.sheetForm.SourcesFrom
       };
       };
+
       let isAdd = this.sheetId?false:true
       let isAdd = this.sheetId?false:true
       const res = this.sheetId
       const res = this.sheetId
       ? await sheetInterface.sheetEdit({ ExcelInfoId: Number(this.sheetId),...params })
       ? await sheetInterface.sheetEdit({ ExcelInfoId: Number(this.sheetId),...params })
@@ -267,6 +320,15 @@ export default {
     //     if(res.Ret != 200) return 
     //     if(res.Ret != 200) return 
     //   })
     //   })
     // }
     // }
+    updateSheetSource(value){
+      if(value){
+        this.sheetSourceFrom={...this.sheetSourceFrom,...value}
+        this.sheetForm.SourcesFrom=JSON.stringify(this.sheetSourceFrom)
+      }
+    },
+    updateSourceFromTable(){
+      this.sheetForm.SourcesFrom=JSON.stringify(this.sheetSourceFrom)
+    }
   },
   },
   created() {
   created() {
     this.getClassify();
     this.getClassify();
@@ -285,6 +347,8 @@ export default {
 .customSheet-wrap {
 .customSheet-wrap {
   min-width: 1070px;
   min-width: 1070px;
   min-height: calc(100vh - 120px);
   min-height: calc(100vh - 120px);
+  position: relative;
+  padding-bottom: 30px;
   .wrap-top {
   .wrap-top {
     display: flex;
     display: flex;
     justify-content: space-between;
     justify-content: space-between;
@@ -309,5 +373,9 @@ export default {
       }
       }
     }
     }
   }
   }
+  .chart-source{
+    position: absolute;
+    bottom: 0;
+  }
 }
 }
 </style>
 </style>

+ 24 - 2
src/views/datasheet_manage/sheetList.vue

@@ -306,6 +306,15 @@
                 :disabled="true"
                 :disabled="true"
                 ref="mixedTableRef"
                 ref="mixedTableRef"
               />
               />
+              <div class="chart-source">
+                <span
+                  v-if="[2,3].includes(sheetDetailInfo.Source) && sheetDetailInfo.SourcesFrom && JSON.parse(sheetDetailInfo.SourcesFrom).isShow"
+                  :style="`
+                  color: ${JSON.parse(sheetDetailInfo.SourcesFrom).color};
+                  font-size: ${ JSON.parse(sheetDetailInfo.SourcesFrom).fontSize }px;
+                `"
+                ><!-- 数据来源 -->{{$t('ETable.Common.source')}}:{{ JSON.parse(sheetDetailInfo.SourcesFrom).text}}</span>
+              </div>
             </div>
             </div>
           </template>
           </template>
 
 
@@ -1062,7 +1071,10 @@ export default {
           this.sheetDetailInfo = res.Data;
           this.sheetDetailInfo = res.Data;
           this.saveTime = this.$moment(this.sheetDetailInfo.ModifyTime).format('YYYY-MM-DD HH:mm:ss')||''
           this.saveTime = this.$moment(this.sheetDetailInfo.ModifyTime).format('YYYY-MM-DD HH:mm:ss')||''
           this.editButtonText = this.sheetDetailInfo.CanEdit?'':`${this.sheetDetailInfo.Editor}${this.$t('OnlineExcelPage.editing_msg')}`
           this.editButtonText = this.sheetDetailInfo.CanEdit?'':`${this.sheetDetailInfo.Editor}${this.$t('OnlineExcelPage.editing_msg')}`
-
+          if(!this.sheetDetailInfo.SourcesFrom){
+            this.sheetDetailInfo.SourcesFrom = this.setDefaultSource(this.sheetDetailInfo.ExcelSource)
+          }
+          
           this.$nextTick(() => {
           this.$nextTick(() => {
             //sheet组件Mounted已经init一次,再次调用会导致工具栏样式错乱
             //sheet组件Mounted已经init一次,再次调用会导致工具栏样式错乱
             //this.sheetDetailInfo.Source === 1 && this.$refs.sheetRef.init();
             //this.sheetDetailInfo.Source === 1 && this.$refs.sheetRef.init();
@@ -1075,7 +1087,14 @@ export default {
           });
           });
         });
         });
     },
     },
-
+    setDefaultSource(sourceText){
+      return JSON.stringify({
+        isShow: true,
+        text: sourceText,
+        color: "#606266",
+        fontSize: 9
+      })
+    },
     /* 删除表格 */
     /* 删除表格 */
     delSheetHandle({cell, type = ""}) {
     delSheetHandle({cell, type = ""}) {
       const { ExcelClassifyId, ExcelInfoId  } = cell;
       const { ExcelClassifyId, ExcelInfoId  } = cell;
@@ -1419,6 +1438,9 @@ $normal-font: 14px;
           box-sizing: border-box;
           box-sizing: border-box;
           padding: 15px;
           padding: 15px;
           overflow-y: auto;
           overflow-y: auto;
+          display: flex;
+          flex-direction: column;
+          justify-content: space-between;
           /* min-height: 500px; */
           /* min-height: 500px; */
         }
         }
       }
       }

+ 41 - 25
src/views/ppt_manage/mixins/mixins.js

@@ -204,14 +204,20 @@ export default {
         //数据列
         //数据列
         let obj = {
         let obj = {
           data: [],
           data: [],
-          type: (chartTheme&&chartTheme.lineOptions.lineType) || 'spline',
-          dashStyle: (chartTheme&&chartTheme.lineOptions.dashStyle)||'Solid',
+          type: (chartTheme&&chartTheme.lineOptionList[index].lineType) || 'spline',
+          dashStyle: (chartTheme&&chartTheme.lineOptionList[index].dashStyle)||'Solid',
           yAxis: sameSideIndex,
           yAxis: sameSideIndex,
           name:nameCh,
           name:nameCh,
           nameCh:nameCh,
           nameCh:nameCh,
           nameEn:nameEn,
           nameEn:nameEn,
           color: item.ChartColor,
           color: item.ChartColor,
-          lineWidth: Number(item.ChartWidth)||(chartTheme&&chartTheme.lineOptions.lineWidth),
+          lineWidth: Number(item.ChartWidth)||(chartTheme&&chartTheme.lineOptionList[index].lineWidth),
+          marker: chartTheme && chartTheme.lineOptionList[index].dataMark && chartTheme.lineOptionList[index].dataMark!='none'?{
+            enabled:true,
+            symbol: chartTheme.lineOptionList[index].markType || 'circle',
+            fillColor:chartTheme.lineOptionList[index].markColor,
+            radius: chartTheme.lineOptionList[index].markSize
+          }:{},
           ...predict_params
           ...predict_params
         };
         };
         item.DataList = item.DataList || [];
         item.DataList = item.DataList || [];
@@ -437,12 +443,15 @@ export default {
        /* 主题样式*/
        /* 主题样式*/
       const chartTheme =  this.chartInfo.ChartThemeStyle ? JSON.parse(this.chartInfo.ChartThemeStyle) : null;
       const chartTheme =  this.chartInfo.ChartThemeStyle ? JSON.parse(this.chartInfo.ChartThemeStyle) : null;
 
 
-
       // 农历数据需要去除第一项 在ETA1.0.5之后,除了这里 农历和公历处理逻辑一样
       // 农历数据需要去除第一项 在ETA1.0.5之后,除了这里 农历和公历处理逻辑一样
       const temChartDataList=chartData.DataList||[]
       const temChartDataList=chartData.DataList||[]
       const chartDataHandle=this.calendar_type === '农历'?
       const chartDataHandle=this.calendar_type === '农历'?
       temChartDataList.filter((item, index) => index > 0):
       temChartDataList.filter((item, index) => index > 0):
       temChartDataList
       temChartDataList
+
+      // 跟颜色对应
+      chartTheme.lineOptionList=chartTheme.lineOptionList.reverse().slice(-chartDataHandle.length)
+
       let seasonYdata = [],
       let seasonYdata = [],
         seasonData = []
         seasonData = []
 
 
@@ -451,17 +460,24 @@ export default {
         minLimit = this.chartLimit.min||0
         minLimit = this.chartLimit.min||0
         maxLimit = this.chartLimit.max||0
         maxLimit = this.chartLimit.max||0
       //数据列
       //数据列
-      for (let j of chartDataHandle) {
+      for (let index in chartDataHandle) {
+        let j = chartDataHandle[index]
           //预测指标配置
           //预测指标配置
         let predict_params =  chartData.EdbInfoCategoryType === 1 ? this.getSeasonPredictParams(j.CuttingDataTimestamp) : {};
         let predict_params =  chartData.EdbInfoCategoryType === 1 ? this.getSeasonPredictParams(j.CuttingDataTimestamp) : {};
 
 
         let serie_item = {
         let serie_item = {
           data: [],
           data: [],
-          type: (chartTheme&&chartTheme.lineOptions.lineType) || chartData.ChartStyle,
-          dashStyle: (chartTheme&&chartTheme.lineOptions.dashStyle)||'Solid',
+          type: (chartTheme&&chartTheme.lineOptionList[index].lineType) || chartData.ChartStyle,
+          dashStyle: (chartTheme&&chartTheme.lineOptionList[index].dashStyle)||'Solid',
           yAxis: 0,
           yAxis: 0,
           name: j.ChartLegend,
           name: j.ChartLegend,
-          lineWidth: (chartTheme&&chartTheme.lineOptions.lineWidth) || 1,
+          lineWidth: (chartTheme&&chartTheme.lineOptionList[index].lineWidth) || 1,
+          marker: chartTheme && chartTheme.lineOptionList[index].dataMark && chartTheme.lineOptionList[index].dataMark!='none'?{
+            enabled:true,
+            symbol: chartTheme.lineOptionList[index].markType || 'circle',
+            fillColor:chartTheme.lineOptionList[index].markColor,
+            radius: chartTheme.lineOptionList[index].markSize
+          }:{},
           ...predict_params
           ...predict_params
         };
         };
         const data_array = _.cloneDeep(j.DataList);
         const data_array = _.cloneDeep(j.DataList);
@@ -673,7 +689,7 @@ export default {
         chartType: 'linear',
         chartType: 'linear',
         color: ChartColor,
         color: ChartColor,
         marker: {
         marker: {
-          radius: (chartTheme&&chartTheme.lineOptions.radius)||5,
+          radius: (chartTheme&&chartTheme.lineOptionList[0].radius)||5,
         },
         },
       }
       }
       real_data.forEach(_ => {
       real_data.forEach(_ => {
@@ -882,21 +898,21 @@ export default {
       }
       }
 
 
       //数据列
       //数据列
-      data.forEach(item => {
+      data.forEach((item,index) => {
         //处理首或/尾全是无效数据的以null填充
         //处理首或/尾全是无效数据的以null填充
         let filterData = this.filterInvalidData(item)
         let filterData = this.filterInvalidData(item)
 
 
         let serie_item = {
         let serie_item = {
           data: filterData,
           data: filterData,
-          type: (chartTheme&&chartTheme.lineOptions.lineType) || 'spline',
-          dashStyle: (chartTheme&&chartTheme.lineOptions.dashStyle)||'Solid',
+          type: (chartTheme&&chartTheme.lineOptionList[index].lineType) || 'spline',
+          dashStyle: (chartTheme&&chartTheme.lineOptionList[index].dashStyle)||'Solid',
           yAxis: 0,
           yAxis: 0,
           name: item.Name,
           name: item.Name,
           nameCh: item.Name,
           nameCh: item.Name,
           nameEn: item.NameEn,
           nameEn: item.NameEn,
           color: item.Color,
           color: item.Color,
           chartType: 'linear',
           chartType: 'linear',
-          lineWidth: (chartTheme&&chartTheme.lineOptions.lineWidth) || 3,
+          lineWidth: (chartTheme&&chartTheme.lineOptionList[index].lineWidth) || 3,
           marker: {
           marker: {
             enabled: false
             enabled: false
           }
           }
@@ -1100,18 +1116,18 @@ export default {
 
 
       //处理series
       //处理series
       let seriesData=[]
       let seriesData=[]
-      this.relevanceChartData.YDataList.forEach(item=>{
+      this.relevanceChartData.YDataList.forEach((item,index)=>{
         let serie_item = {
         let serie_item = {
           data: item.Value,
           data: item.Value,
-          type: (chartTheme&&chartTheme.lineOptions.lineType) || 'spline',
-          dashStyle: (chartTheme&&chartTheme.lineOptions.dashStyle)||'Solid',
+          type: (chartTheme&&chartTheme.lineOptionList[index].lineType) || 'spline',
+          dashStyle: (chartTheme&&chartTheme.lineOptionList[index].dashStyle)||'Solid',
           yAxis: 0,
           yAxis: 0,
           name: item.Name,
           name: item.Name,
           nameCh: item.Name,
           nameCh: item.Name,
           nameEn: item.NameEn,
           nameEn: item.NameEn,
           color: item.Color,
           color: item.Color,
           chartType: 'linear',
           chartType: 'linear',
-          lineWidth: (chartTheme&&chartTheme.lineOptions.lineWidth) || 3,
+          lineWidth: (chartTheme&&chartTheme.lineOptionList[index].lineWidth) || 3,
           marker: {
           marker: {
             enabled: false
             enabled: false
           }
           }
@@ -1237,7 +1253,7 @@ export default {
           chartType: 'linear',
           chartType: 'linear',
           zIndex:1,
           zIndex:1,
           marker: {
           marker: {
-            radius: (chartTheme&&chartTheme.lineOptions.radius)||5,
+            radius: (chartTheme&&chartTheme.lineOptionList.radius)||5,
           },
           },
         }
         }
         item.EdbInfoList.forEach(_ => {
         item.EdbInfoList.forEach(_ => {
@@ -1403,14 +1419,14 @@ export default {
 
 
         let series_item = {
         let series_item = {
           data: item.Value.map(_ =>[_.X,_.Y]),
           data: item.Value.map(_ =>[_.X,_.Y]),
-          dashStyle: (chartTheme&&chartTheme.lineOptions.dashStyle)||'Solid',
-          type: (chartTheme&&chartTheme.lineOptions.lineType) || 'spline',
+          dashStyle: (chartTheme&&chartTheme.lineOptionList[index].dashStyle)||'Solid',
+          type: (chartTheme&&chartTheme.lineOptionList[index].lineType) || 'spline',
           yAxis: index,
           yAxis: index,
           name: item.Name,
           name: item.Name,
           nameCh: item.Name,
           nameCh: item.Name,
           nameEn: item.NameEn||item.Name,
           nameEn: item.NameEn||item.Name,
           color: item.Color,
           color: item.Color,
-          lineWidth: (chartTheme&&chartTheme.lineOptions.lineWidth)||3,
+          lineWidth: (chartTheme&&chartTheme.lineOptionList[index].lineWidth)||3,
           chartType: 'linear',
           chartType: 'linear',
           zIndex:1
           zIndex:1
         }
         }
@@ -1665,18 +1681,18 @@ export default {
 
 
       //系列
       //系列
       let series = [];
       let series = [];
-      YDataList.forEach(item => {
+      YDataList.forEach((item,index) => {
         let serie_item = {
         let serie_item = {
           data: item.Value,
           data: item.Value,
           pointPlacement: 'on',
           pointPlacement: 'on',
-          type: (chartTheme&&chartTheme.lineOptions.lineType) || 'line',
-          dashStyle: (chartTheme&&chartTheme.lineOptions.dashStyle)||'Solid',
+          type: (chartTheme&&chartTheme.lineOptionList[index].lineType) || 'line',
+          dashStyle: (chartTheme&&chartTheme.lineOptionList[index].dashStyle)||'Solid',
           yAxis: 0,
           yAxis: 0,
           name: item.Name || item.Date,
           name: item.Name || item.Date,
           nameCh: item.Name || item.Date,
           nameCh: item.Name || item.Date,
           nameEn: item.Date,
           nameEn: item.Date,
           color: item.Color,
           color: item.Color,
-          lineWidth: (chartTheme&&chartTheme.lineOptions.lineWidth) || 1,
+          lineWidth: (chartTheme&&chartTheme.lineOptionList[index].lineWidth) || 1,
           chartType: 'linear'
           chartType: 'linear'
         };
         };
         series.push(serie_item)
         series.push(serie_item)

+ 21 - 6
src/views/ppt_manage/mixins/pptMixins.js

@@ -618,7 +618,8 @@ export default {
     async sheetListHandle(sheetElements){
     async sheetListHandle(sheetElements){
       let needGetDataArr = []
       let needGetDataArr = []
       for(let i=0;i<sheetElements.length;i++){
       for(let i=0;i<sheetElements.length;i++){
-        if(!this.sheetDataMap[sheetElements[i].sheetId]&&!needGetDataArr.includes(sheetElements[i].sheetId)){
+        if( (!this.sheetDataMap[sheetElements[i].sheetId] || !this.sheetDataMap[sheetElements[i].sheetId].list) 
+          && !needGetDataArr.includes(sheetElements[i].sheetId)){
             needGetDataArr.push(sheetElements[i].sheetId)
             needGetDataArr.push(sheetElements[i].sheetId)
         }
         }
       }
       }
@@ -650,11 +651,25 @@ export default {
 				UniqueCode: id
 				UniqueCode: id
 			})
 			})
       if(res.Ret !== 200) return 0
       if(res.Ret !== 200) return 0
-      const {TableInfo} = res.Data
+      const {TableInfo,SourcesFrom,ExcelSource} = res.Data
       //console.log('get')
       //console.log('get')
-      this.sheetDataMap[id] = _.cloneDeep(TableInfo.TableDataList)
+      this.sheetDataMap[id] ={
+        list:_.cloneDeep(TableInfo.TableDataList),
+        otherParams:{
+          SourcesFrom:SourcesFrom?SourcesFrom:
+                      ExcelSource?this.setDefaultSource(ExcelSource):''
+        }
+      }
       return 1
       return 1
     },
     },
+    setDefaultSource(sourceText){
+      return JSON.stringify({
+        isShow: true,
+        text: sourceText,
+        color: "#606266",
+        fontSize: 9
+      })
+    },
     initCharts(elements, page) {
     initCharts(elements, page) {
       const index = this.pageList.findIndex((i) => i.id === page.id)
       const index = this.pageList.findIndex((i) => i.id === page.id)
       if(index===-1) return
       if(index===-1) return
@@ -1169,8 +1184,8 @@ export default {
 			this.setEnName = false
 			this.setEnName = false
 		},
 		},
 
 
-    /* 生成ppt时图表追加底部文字 来源/说明 */
-    transChartBottomInfo(slide,{x,y,width,height},data) {
+    /* 生成ppt时 图表、表格 追加底部文字 来源/说明 */
+    transBottomInfo(slide,{x,y,width,height},data) {
       let chartData = data;
       let chartData = data;
       let yPercent = Number(Math.ceil(height.replace(/%/,''))+Math.ceil(y.replace(/%/,'')))+'%';
       let yPercent = Number(Math.ceil(height.replace(/%/,''))+Math.ceil(y.replace(/%/,'')))+'%';
       // console.log(yPercent)
       // console.log(yPercent)
@@ -1183,7 +1198,7 @@ export default {
                     ? sourceObj.color.substring(1).length<6 
                     ? sourceObj.color.substring(1).length<6 
                     ? '000000':sourceObj.color.substring(1)
                     ? '000000':sourceObj.color.substring(1)
                     : '666666'
                     : '666666'
-        slide.addText(`来源:${sourceObj.text}`,{
+        slide.addText(`${this.$t('ETable.Common.source')}:${sourceObj.text}`,{
           x:x,
           x:x,
           y: yPercent,
           y: yPercent,
           w: width,
           w: width,

+ 21 - 2
src/views/ppt_manage/newVersion/components/formatEl/SheetEl.vue

@@ -52,6 +52,15 @@
       @click.stop="delChart(position)"
       @click.stop="delChart(position)"
       v-if="isBtnShow"
       v-if="isBtnShow"
     ></div>
     ></div>
+  <div class="chart-source">
+    <span
+      v-if="sheetSourceFrom && sheetSourceFrom.isShow"
+      :style="`
+      color: ${sheetSourceFrom.isShow ? sheetSourceFrom.color : '#999'};
+      font-size: ${ sheetSourceFrom.fontSize }px;
+    `"
+    ><!-- 来源 -->{{$t('ETable.Common.source')}}:{{ sheetSourceFrom.text}}</span>
+  </div>
 </div>
 </div>
   
   
 </template>
 </template>
@@ -69,13 +78,18 @@ export default {
     return {
     return {
       tableData:[],
       tableData:[],
       type:'sheet',
       type:'sheet',
-      tableKey:0
+      tableKey:0,
+      sheetSourceFrom:{}
     };
     };
   },
   },
   methods:{
   methods:{
     getSheetData(id,value){
     getSheetData(id,value){
       this.tableKey++
       this.tableKey++
-      this.tableData = value
+      if(value){
+        this.tableData = value.list
+        this.sheetSourceFrom=(value.otherParams && value.otherParams.SourcesFrom) ? JSON.parse(value.otherParams.SourcesFrom):''
+      }
+
     }
     }
   },
   },
   mounted(){
   mounted(){
@@ -104,4 +118,9 @@ export default {
 			}
 			}
   }
   }
 }
 }
+.chart-source{
+  width: 95%;
+  position: absolute;
+  left: 2%;
+}
 </style>
 </style>

+ 15 - 15
src/views/ppt_manage/newVersion/css/format.scss

@@ -144,7 +144,7 @@ $marginTop:14%;
       width: 100%;
       width: 100%;
       height: calc(100% - #{$marginTop});
       height: calc(100% - #{$marginTop});
       display: flex;
       display: flex;
-      .chart-bottom-insruction-info{
+      .chart-bottom-insruction-info,.chart-source{
             margin-top: 0 !important;
             margin-top: 0 !important;
         }
         }
     }
     }
@@ -172,7 +172,7 @@ $marginTop:14%;
             top:0;
             top:0;
             right:calc(5% - 10px);
             right:calc(5% - 10px);
         }
         }
-        .chart-bottom-insruction-info{
+        .chart-bottom-insruction-info,.chart-source{
             bottom:4%;
             bottom:4%;
         }
         }
     }
     }
@@ -196,7 +196,7 @@ $marginTop:14%;
             top:calc(10% - 10px);
             top:calc(10% - 10px);
             right:calc(5% - 10px);
             right:calc(5% - 10px);
         }
         }
-        .chart-bottom-insruction-info{
+        .chart-bottom-insruction-info,.chart-source{
             top:89%;
             top:89%;
         }
         }
     }
     }
@@ -217,7 +217,7 @@ $marginTop:14%;
           width: 100%;
           width: 100%;
           height: 80%;
           height: 80%;
         }
         }
-        .chart-bottom-insruction-info{
+        .chart-bottom-insruction-info,.chart-source{
             top:89%;
             top:89%;
         }
         }
     }
     }
@@ -242,7 +242,7 @@ $marginTop:14%;
                     top:calc(4% - 10px);
                     top:calc(4% - 10px);
                     right:2.5%;
                     right:2.5%;
                 }
                 }
-                .chart-bottom-insruction-info{
+                .chart-bottom-insruction-info,.chart-source{
                     top:89%;
                     top:89%;
                 }
                 }
             }
             }
@@ -267,7 +267,7 @@ $marginTop:14%;
                     top:0;
                     top:0;
                     right:2.5%;
                     right:2.5%;
                 }
                 }
-                .chart-bottom-insruction-info{
+                .chart-bottom-insruction-info,.chart-source{
                     top:84%;
                     top:84%;
                 }
                 }
             }
             }
@@ -284,7 +284,7 @@ $marginTop:14%;
             top:calc(10% - 10px);
             top:calc(10% - 10px);
             right:calc(5% - 10px);
             right:calc(5% - 10px);
         }
         }
-        .chart-bottom-insruction-info{
+        .chart-bottom-insruction-info,.chart-source{
             top:90%;
             top:90%;
         }
         }
     }
     }
@@ -308,7 +308,7 @@ $marginTop:14%;
                   top:calc(4% - 10px);
                   top:calc(4% - 10px);
                   right:2.5%;
                   right:2.5%;
                 }
                 }
-                .chart-bottom-insruction-info{
+                .chart-bottom-insruction-info,.chart-source{
                     top:89%;
                     top:89%;
                 }
                 }
             }
             }
@@ -334,7 +334,7 @@ $marginTop:14%;
                     top:0;
                     top:0;
                     right:2.5%;
                     right:2.5%;
                 }
                 }
-                .chart-bottom-insruction-info{
+                .chart-bottom-insruction-info,.chart-source{
                     top:84%;
                     top:84%;
                 }
                 }
             }
             }
@@ -351,7 +351,7 @@ $marginTop:14%;
             top:calc(10% - 10px);
             top:calc(10% - 10px);
             right:calc(5% - 10px);
             right:calc(5% - 10px);
         }
         }
-        .chart-bottom-insruction-info{
+        .chart-bottom-insruction-info,.chart-source{
             top:90%;
             top:90%;
         }
         }
     }
     }
@@ -366,13 +366,13 @@ $marginTop:14%;
       }
       }
       &.top-70{
       &.top-70{
         height:70%;
         height:70%;
-        .chart-bottom-insruction-info{
+        .chart-bottom-insruction-info,.chart-source{
             top:93%;
             top:93%;
         }
         }
       }
       }
       &.bottom-30{
       &.bottom-30{
         height: 30%;
         height: 30%;
-        .chart-bottom-insruction-info{
+        .chart-bottom-insruction-info,.chart-source{
             top:85%;
             top:85%;
         }
         }
       }
       }
@@ -425,7 +425,7 @@ $marginTop:14%;
       }
       }
     }
     }
     .format-nine{
     .format-nine{
-        .chart-bottom-insruction-info{
+        .chart-bottom-insruction-info,.chart-source{
             top:93%;
             top:93%;
         }
         }
     }
     }
@@ -552,7 +552,7 @@ $marginTop:14%;
                     width:90%;
                     width:90%;
                     height:90%
                     height:90%
                 }
                 }
-                .chart-bottom-insruction-info{
+                .chart-bottom-insruction-info,.chart-source{
                     top:92%;
                     top:92%;
                 }
                 }
             }
             }
@@ -564,7 +564,7 @@ $marginTop:14%;
         }
         }
         .bottom-15{
         .bottom-15{
             height: 18%;
             height: 18%;
-            .chart-bottom-insruction-info{
+            .chart-bottom-insruction-info,.chart-source{
                 top:80%;
                 top:80%;
             }
             }
         }
         }

+ 8 - 5
src/views/ppt_manage/newVersion/pptEnPublish.vue

@@ -314,7 +314,7 @@ export default {
         const elements = this.pageList[i].elements;
         const elements = this.pageList[i].elements;
         const elLength = elements.length;
         const elLength = elements.length;
         for (let j = 0; j < elLength; j++) {
         for (let j = 0; j < elLength; j++) {
-          let imgData = null,textData = null,imgData2 = null,imgData2Obj=null,sheetData=null
+          let imgData = null,textData = null,imgData2 = null,imgData2Obj=null,sheetData={list:null,otherParams:null}
           if (elements[j].type === "chart") {
           if (elements[j].type === "chart") {
             console.log("img/chart...");
             console.log("img/chart...");
             let svgData = this.optionMap[this.pageList[i].elements[j].chartId] instanceof Object
             let svgData = this.optionMap[this.pageList[i].elements[j].chartId] instanceof Object
@@ -339,7 +339,8 @@ export default {
           }else if (elements[j].type==='sheet'){
           }else if (elements[j].type==='sheet'){
             console.log('table...')
             console.log('table...')
             const sheetId = elements[j].sheetId
             const sheetId = elements[j].sheetId
-            sheetData = getTableData(this.sheetDataMap[sheetId])
+            sheetData.list = getTableData(this.sheetDataMap[sheetId].list)
+            sheetData.otherParams = this.sheetDataMap[sheetId].otherParams
           }
           }
           const { x, y, width, height } = this.getPosition(
           const { x, y, width, height } = this.getPosition(
             this.pageList[i].modelId,
             this.pageList[i].modelId,
@@ -356,7 +357,7 @@ export default {
               });
               });
 
 
             //追加生成图表底部文字
             //追加生成图表底部文字
-            this.transChartBottomInfo(slide,{x,y,width,height},this.optionMap[this.pageList[i].elements[j].chartId])
+            this.transBottomInfo(slide,{x,y,width,height},this.optionMap[this.pageList[i].elements[j].chartId])
             
             
           }else if (textData){
           }else if (textData){
             slide.addText(textData,{
             slide.addText(textData,{
@@ -384,10 +385,12 @@ export default {
               h:offsetY===0?height:(realSize.height/imgData2Obj.imgHeight*percentHeight)+'%',
               h:offsetY===0?height:(realSize.height/imgData2Obj.imgHeight*percentHeight)+'%',
               size:{type:"contain"}
               size:{type:"contain"}
             })
             })
-          }else if(sheetData){
-            slide.addTable(sheetData,{
+          }else if(sheetData.list){
+            slide.addTable(sheetData.list,{
               x:x,y:y,w:width,h:height,border:{type:'solid',pt:1}
               x:x,y:y,w:width,h:height,border:{type:'solid',pt:1}
             })
             })
+            //追加生成表格底部文字
+            this.transBottomInfo(slide,{x,y,width,height},sheetData.otherParams)
           } 
           } 
         }
         }
         //在添加完版式后,添加图层元素
         //在添加完版式后,添加图层元素

+ 7 - 4
src/views/ppt_manage/newVersion/pptPublish.vue

@@ -334,7 +334,7 @@ export default {
         const elements = this.pageList[i].elements;
         const elements = this.pageList[i].elements;
         const elLength = elements.length;
         const elLength = elements.length;
         for (let j = 0; j < elLength; j++) {
         for (let j = 0; j < elLength; j++) {
-          let imgData = null,textData = null,imgData2 = null,imgData2Obj=null,sheetData=null
+          let imgData = null,textData = null,imgData2 = null,imgData2Obj=null,sheetData={list:null,otherParams:null}
           if (elements[j].type === "chart") {
           if (elements[j].type === "chart") {
             console.log("img/chart...");
             console.log("img/chart...");
             let svgData = this.optionMap[this.pageList[i].elements[j].chartId] instanceof Object
             let svgData = this.optionMap[this.pageList[i].elements[j].chartId] instanceof Object
@@ -364,7 +364,8 @@ export default {
           }else if (elements[j].type==='sheet'){
           }else if (elements[j].type==='sheet'){
             console.log('table...')
             console.log('table...')
             const sheetId = elements[j].sheetId
             const sheetId = elements[j].sheetId
-            sheetData = getTableData(this.sheetDataMap[sheetId])
+            sheetData.list = getTableData(this.sheetDataMap[sheetId].list)
+            sheetData.otherParams = this.sheetDataMap[sheetId].otherParams
           }
           }
           const { x, y, width, height } = this.getPosition(
           const { x, y, width, height } = this.getPosition(
             this.pageList[i].modelId,
             this.pageList[i].modelId,
@@ -381,7 +382,7 @@ export default {
               });
               });
 
 
             //追加生成图表底部文字
             //追加生成图表底部文字
-            this.transChartBottomInfo(slide,{x,y,width,height},this.optionMap[this.pageList[i].elements[j].chartId])
+            this.transBottomInfo(slide,{x,y,width,height},this.optionMap[this.pageList[i].elements[j].chartId])
           }else if (textData){
           }else if (textData){
             slide.addText(textData,{
             slide.addText(textData,{
               x:x,
               x:x,
@@ -410,9 +411,11 @@ export default {
               size:{type:"contain"}
               size:{type:"contain"}
             })
             })
           }else if(sheetData){
           }else if(sheetData){
-            slide.addTable(sheetData,{
+            slide.addTable(sheetData.list,{
               x:x,y:y,w:width,h:height,border:{type:'solid',pt:1}
               x:x,y:y,w:width,h:height,border:{type:'solid',pt:1}
             })
             })
+            //追加生成表格底部文字
+            this.transBottomInfo(slide,{x,y,width,height},sheetData.otherParams)
           } 
           } 
         }
         }
         //在添加完版式后,添加图层元素
         //在添加完版式后,添加图层元素

+ 26 - 0
src/views/system_manage/chartTheme/common/config.js

@@ -82,15 +82,41 @@ export const alignPositions = [
   { value: 'right',svg:`<path d="M96 128h832v96H96zM96 576h832v96H96zM352 352h576v96H352zM352 800h576v96H352z" p-id="5963"></path>` },
   { value: 'right',svg:`<path d="M96 128h832v96H96zM96 576h832v96H96zM352 352h576v96H352zM352 800h576v96H352z" p-id="5963"></path>` },
 ]
 ]
 
 
+//可选数据标识样式
+export const markTypesOpts = [
+  { value: 'square',svg:`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+    <rect width="20" height="20" fill="#D9D9D9"/>
+    </svg>` },
+  { value: 'circle',svg:`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+    <circle cx="10" cy="10" r="10" fill="#D9D9D9"/>
+    </svg>` },
+  { value: 'diamond',svg:`<svg width="20" height="21" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg">
+    <rect y="10.1421" width="14" height="14" transform="rotate(-45 0 10.1421)" fill="#D9D9D9"/>
+    </svg>` },
+  { value: 'triangle',svg:`<svg width="20" height="17" viewBox="0 0 20 17" fill="none" xmlns="http://www.w3.org/2000/svg">
+    <path d="M10 0L19.5263 16.5H0.473721L10 0Z" fill="#D9D9D9"/>
+    </svg>` },
+  { value: 'triangle-down',svg:`<svg width="20" height="17" viewBox="0 0 20 17" fill="none" xmlns="http://www.w3.org/2000/svg">
+    <path d="M10 17L0.473721 0.5L19.5263 0.5L10 17Z" fill="#D9D9D9"/>
+    </svg>` },
+]
+
 /* 当做标准化结构  eta默认值 几种类型图样式还区分开...*/
 /* 当做标准化结构  eta默认值 几种类型图样式还区分开...*/
 export const defaultETAOptions = {
 export const defaultETAOptions = {
   colorsOptions: defaultOpts.colors.slice(0,10),
   colorsOptions: defaultOpts.colors.slice(0,10),
+  // 需要将 lineOptions 里面的属性变成 10条线条的独立属性,即长度为10的数组传给后端
   lineOptions: { 
   lineOptions: { 
     dashStyle: 'Solid',
     dashStyle: 'Solid',
+    // color:'#ff0000', //线条颜色
     lineWidth: 1,
     lineWidth: 1,
     lineType: 'spline',
     lineType: 'spline',
     radius: 5,
     radius: 5,
+    dataMark:'none',// none:无 built-in:内置
+    markType:"square",
+    markSize:5,
+    // markColor:'#ff0000' //默认同 线条颜色一致
   },
   },
+  // lineOptionList:[{}],
   legendOptions: {
   legendOptions: {
     verticalAlign: 'top',
     verticalAlign: 'top',
     itemStyle: {
     itemStyle: {

+ 112 - 62
src/views/system_manage/chartTheme/components/optionsSection.vue

@@ -2,29 +2,20 @@
   <div class="charTheme-setting-option">
   <div class="charTheme-setting-option">
     <ul class="options-wrapper">
     <ul class="options-wrapper">
       <li v-for="key in Object.keys(themeOptions)" :key="key">
       <li v-for="key in Object.keys(themeOptions)" :key="key">
-        <label class="option-title">{{ key ==='lineOptions'?typeLabelMap[chartType].label:labelMap.get(key)}}</label>
+        <label class="option-title">{{ key ==='lineOptionList'?typeLabelMap[chartType].label:labelMap.get(key)}}</label>
         
         
           <ul class="option-list">
           <ul class="option-list">
              <!-- 线条设置 -->
              <!-- 线条设置 -->
-            <template v-if="key==='lineOptions'">
-                <li class="option-item">
-                  <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt01')}}</label>
-                  <el-color-picker
-                    v-model="themeOptions[key].colors[themeOptions[key].colorIndex]"
-                    show-alpha
-                    :predefine="predefineColors"
-                    style="width: 90px"
-                    @change="changeLineColor"
-                  />
-                </li>
+            <template v-if="key==='lineOptionList'">
+              <!-- 顺序 -->
                 <li class="option-item">
                 <li class="option-item">
                   <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt02')}}</label>
                   <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt02')}}</label>
                   <el-select 
                   <el-select 
-                    v-model="themeOptions[key].colorIndex"
+                    v-model="lineIndex"
                     style="width: 90px"
                     style="width: 90px"
                   >
                   >
                     <el-option 
                     <el-option 
-                      v-for="(item,index) in themeOptions[key].colors" 
+                      v-for="(item,index) in themeOptions[key]" 
                       :key="index"
                       :key="index"
                       :label="`${$i18n.locale == 'zh'?'第':''}${index+1}${typeLabelMap[chartType].lineLabel}`"
                       :label="`${$i18n.locale == 'zh'?'第':''}${index+1}${typeLabelMap[chartType].lineLabel}`"
                       :value="index"
                       :value="index"
@@ -32,12 +23,22 @@
                   </el-select>
                   </el-select>
                 </li>
                 </li>
 
 
+                <li class="option-item">
+                  <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt01')}}</label>
+                  <el-color-picker
+                    v-model="themeOptions[key][lineIndex].color"
+                    show-alpha
+                    :predefine="predefineColors"
+                    style="width: 90px"
+                  />
+                </li>
+
                 <!-- 曲线额外配置 雷达 -->
                 <!-- 曲线额外配置 雷达 -->
                 <template v-if="[1,2,11].includes(chartType)">
                 <template v-if="[1,2,11].includes(chartType)">
                   <li class="option-item">
                   <li class="option-item">
                     <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt03')}}</label>
                     <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt03')}}</label>
                     <el-select 
                     <el-select 
-                      v-model="themeOptions[key].dashStyle"
+                      v-model="themeOptions[key][lineIndex].dashStyle"
                       style="width: 90px"
                       style="width: 90px"
                     >
                     >
                       <el-option 
                       <el-option 
@@ -54,17 +55,17 @@
                   <li class="option-item">
                   <li class="option-item">
                     <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt04')}}</label>
                     <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt04')}}</label>
                     <el-input
                     <el-input
-                      v-model="themeOptions[key].lineWidth"
+                      v-model="themeOptions[key][lineIndex].lineWidth"
                       style="width: 90px"
                       style="width: 90px"
                       type="number"
                       type="number"
                       :min="1"
                       :min="1"
-                      @change="val => { themeOptions[key].lineWidth=Number(val)}"
+                      @change="val => { themeOptions[key][lineIndex].lineWidth=Number(val)}"
                     />
                     />
                   </li>
                   </li>
                   <li class="option-item">
                   <li class="option-item">
                     <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt05')}}</label>
                     <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt05')}}</label>
                     <el-select 
                     <el-select 
-                      v-model="themeOptions[key].lineType"
+                      v-model="themeOptions[key][lineIndex].lineType"
                       style="width: 90px"
                       style="width: 90px"
                     >
                     >
                       <el-option :label="$t('SystemManage.ChartSet.config_opt05_yes')" value="spline"/>
                       <el-option :label="$t('SystemManage.ChartSet.config_opt05_yes')" value="spline"/>
@@ -72,17 +73,68 @@
                     </el-select>
                     </el-select>
                   </li>
                   </li>
                 </template>
                 </template>
-                
+                <!-- 曲线、季节性图额外配置- 数据标志-->
+                <template v-if="[1,2].includes(chartType)">
+                  <li class="option-item">
+                    <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt11')}}</label>
+                    <el-select 
+                      v-model="themeOptions[key][lineIndex].dataMark"
+                      style="width: 90px"
+                    >
+                      <el-option :label="$t('SystemManage.ChartSet.config_opt11_none')" value="none"/>
+                      <el-option :label="$t('SystemManage.ChartSet.config_opt11_inside')" value="built-in"/>
+                    </el-select>
+                  </li>
+                  <template v-if="themeOptions[key][lineIndex].dataMark =='built-in'">
+                    <li class="option-item">
+                      <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt12')}}</label>
+                      <el-select 
+                        v-model="themeOptions[key][lineIndex].markType"
+                        style="width: 90px"
+                      >
+                        <el-option 
+                          v-for="item in markTypesOpts" 
+                          :key="item.value"
+                          :value="item.value"
+                          :label="$t('SystemManage.ChartSet.'+(item.value.replace('-','_')))" 
+                        >
+                          <div style="display: flex;align-items: center;justify-content: center;height: 100%;" v-html="item.svg">
+                          </div>
+
+                        </el-option>
+                      </el-select>
+                    </li>
+                    <li class="option-item">
+                      <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt13')}}</label>
+                      <el-input
+                        v-model="themeOptions[key][lineIndex].markSize"
+                        style="width: 90px"
+                        type="number"
+                        :min="1"
+                        @change="val => { themeOptions[key][lineIndex].markSize=Number(val)}"
+                      />
+                    </li>
+                    <li class="option-item">
+                      <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt14')}}</label>
+                      <el-color-picker
+                        v-model="themeOptions[key][lineIndex].markColor"
+                        show-alpha
+                        :predefine="predefineColors"
+                        style="width: 90px"
+                      />
+                    </li>
+                  </template>
+                </template>
                 <!-- 散点额外配置 -->
                 <!-- 散点额外配置 -->
                 <template v-else-if="[5,10].includes(chartType)">
                 <template v-else-if="[5,10].includes(chartType)">
                   <li class="option-item">
                   <li class="option-item">
                     <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt06')}}</label>
                     <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt06')}}</label>
                     <el-input
                     <el-input
-                      v-model="themeOptions[key].radius"
+                      v-model="themeOptions[key][lineIndex].radius"
                       style="width: 90px"
                       style="width: 90px"
                       type="number"
                       type="number"
                       :min="3"
                       :min="3"
-                      @change="val => { themeOptions[key].radius=Number(val)}"
+                      @change="val => { themeOptions[key][lineIndex].radius=Number(val)}"
                     />
                     />
                   </li>
                   </li>
                 </template>
                 </template>
@@ -202,7 +254,9 @@
   </div>
   </div>
 </template>
 </template>
 <script>
 <script>
-import { defaultETAOptions,verticalPositions,predefineColors,lineStylesOpts,alignPositions } from '../common/config'
+import { defaultETAOptions,verticalPositions,predefineColors,lineStylesOpts,alignPositions,
+  markTypesOpts
+ } from '../common/config'
 import { seasonOptions } from '@/utils/defaultOptions';
 import { seasonOptions } from '@/utils/defaultOptions';
 export default {
 export default {
   props: {
   props: {
@@ -217,7 +271,7 @@ export default {
   computed:{
   computed:{
     labelMap(){
     labelMap(){
       return new Map([
       return new Map([
-        ['lineOptions',this.$t('SystemManage.ChartSet.opt_label01')],
+        ['lineOptionList',this.$t('SystemManage.ChartSet.opt_label01')],
         ['scatterOptions',this.$t('SystemManage.ChartSet.opt_label02')],
         ['scatterOptions',this.$t('SystemManage.ChartSet.opt_label02')],
         ['legendOptions',this.$t('SystemManage.ChartSet.opt_label03')],
         ['legendOptions',this.$t('SystemManage.ChartSet.opt_label03')],
         ['titleOptions',this.$t('SystemManage.ChartSet.opt_label04')],
         ['titleOptions',this.$t('SystemManage.ChartSet.opt_label04')],
@@ -245,17 +299,31 @@ export default {
       predefineColors,
       predefineColors,
       lineStylesOpts,
       lineStylesOpts,
       alignPositions,
       alignPositions,
+      markTypesOpts,
      /* 可配置options*/
      /* 可配置options*/
       themeOptions: {
       themeOptions: {
-        lineOptions: {
-          dashStyle: defaultETAOptions.lineOptions.dashStyle,
-          colors: this.chartType===2?seasonOptions.colors:defaultETAOptions.colorsOptions,
-          color: defaultETAOptions.colorsOptions[0],
-          colorIndex:0,
-          lineWidth: defaultETAOptions.lineOptions.lineWidth,
-          lineType: defaultETAOptions.lineOptions.lineType,
-          radius: defaultETAOptions.lineOptions.radius,
-        },
+        // lineOptions: {
+        //   dashStyle: defaultETAOptions.lineOptions.dashStyle,
+        //   colors: this.chartType===2?seasonOptions.colors:defaultETAOptions.colorsOptions,
+        //   color: defaultETAOptions.colorsOptions[0],
+        //   colorIndex:0,
+        //   lineWidth: defaultETAOptions.lineOptions.lineWidth,
+        //   lineType: defaultETAOptions.lineOptions.lineType,
+        //   radius: defaultETAOptions.lineOptions.radius,
+        // },
+        lineOptionList: new Array(10).fill(1).map((item,index)=>{
+          return {
+            dashStyle: defaultETAOptions.lineOptions.dashStyle,
+            color: this.chartType===2?seasonOptions.colors[index]:defaultETAOptions.colorsOptions[index],
+            lineWidth: defaultETAOptions.lineOptions.lineWidth,
+            lineType: defaultETAOptions.lineOptions.lineType,
+            radius: defaultETAOptions.lineOptions.radius,
+            dataMark: defaultETAOptions.lineOptions.dataMark,
+            markType: defaultETAOptions.lineOptions.markType,
+            markSize: defaultETAOptions.lineOptions.markSize,
+            markColor: this.chartType===2?seasonOptions.colors[index]:defaultETAOptions.colorsOptions[index],
+          }
+        }),
         legendOptions: defaultETAOptions.legendOptions,
         legendOptions: defaultETAOptions.legendOptions,
         titleOptions: defaultETAOptions.titleOptions,
         titleOptions: defaultETAOptions.titleOptions,
         markerOptions: defaultETAOptions.markerOptions,
         markerOptions: defaultETAOptions.markerOptions,
@@ -263,27 +331,9 @@ export default {
         yAxisOptions: defaultETAOptions.yAxisOptions,
         yAxisOptions: defaultETAOptions.yAxisOptions,
         drawOption: defaultETAOptions.drawOption
         drawOption: defaultETAOptions.drawOption
       },
       },
+      colorsOptions:this.chartType===2?seasonOptions.colors:defaultETAOptions.colorsOptions,
+      lineIndex:0,
       lengendPositions: verticalPositions.filter(_ => _.value!=='middle'),
       lengendPositions: verticalPositions.filter(_ => _.value!=='middle'),
-      // typeLabelMap: {
-      //   1: {label:'线条设置',lineLabel: '条'},
-      //   2: {label:'线条设置',lineLabel: '条'},
-      //   4: {label:'柱形设置',lineLabel: '根'},
-      //   5: {label:'散点设置',lineLabel: '系列'},
-      //   6: {label:'线条、柱形设置',lineLabel: '系列'},
-      //   7: {label:'柱形设置',lineLabel: '根'},
-      //   10: {label:'散点设置',lineLabel: '系列'},
-      //   11: {label:'线条设置',lineLabel: '条'},
-      // },
-      // labelMap: new Map([
-      //   ['lineOptions','线条设置'],
-      //   ['scatterOptions','散点设置'],
-      //   ['legendOptions','图例设置'],
-      //   ['titleOptions','标题设置'],
-      //   ['markerOptions','标记文字设置(来源,标识)'],
-      //   ['xAxisOptions','横轴设置'],
-      //   ['yAxisOptions','纵轴设置'],
-      //   ['drawOption','绘图区设置'],
-      // ]),
       configOptions: []
       configOptions: []
     }
     }
   },
   },
@@ -300,17 +350,17 @@ export default {
           spinner: 'el-icon-loading',
           spinner: 'el-icon-loading',
           background: 'rgba(255, 255, 255, 0.8)'
           background: 'rgba(255, 255, 255, 0.8)'
       });
       });
-
       this.themeOptions = {
       this.themeOptions = {
-        lineOptions: {
-          dashStyle: options.lineOptions.dashStyle,
-          colors: options.colorsOptions,
-          color: options.colorsOptions[0],
-          colorIndex:0,
-          lineWidth: options.lineOptions.lineWidth,
-          lineType: options.lineOptions.lineType,
-          radius: options.lineOptions.radius,
-        },
+        // lineOptions: {
+        //   dashStyle: options.lineOptions.dashStyle,
+        //   colors: options.colorsOptions,
+        //   color: options.colorsOptions[0],
+        //   colorIndex:0,
+        //   lineWidth: options.lineOptions.lineWidth,
+        //   lineType: options.lineOptions.lineType,
+        //   radius: options.lineOptions.radius,
+        // },
+        lineOptionList: options.lineOptionList,
         legendOptions: options.legendOptions,
         legendOptions: options.legendOptions,
         titleOptions: options.titleOptions,
         titleOptions: options.titleOptions,
         markerOptions: options.markerOptions,
         markerOptions: options.markerOptions,

+ 2 - 1
src/views/system_manage/chartTheme/index.vue

@@ -5,7 +5,8 @@
         <div class="setting-item">
         <div class="setting-item">
             <span>
             <span>
                 {{$t('SystemManage.ChartSet.label00')}}
                 {{$t('SystemManage.ChartSet.label00')}}
-                <el-tooltip class="item" effect="dark" :content="$t('SystemManage.ChartSet.label00_hint')" placement="top">
+                <el-tooltip class="item" effect="dark" placement="top">
+                  <div slot="content" v-html="$t('SystemManage.ChartSet.label00_hint')"></div>
                     <i class="el-icon-warning"></i>
                     <i class="el-icon-warning"></i>
                 </el-tooltip>
                 </el-tooltip>
             </span>
             </span>

+ 78 - 21
src/views/system_manage/chartTheme/themeSetting.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <div class="themeSet-page">
   <div class="themeSet-page">
     <div class="header">
     <div class="header">
-      <div>
+      <div class="header-option">
         <el-select v-model="formData.chartType" @change="getThemeList('init');">
         <el-select v-model="formData.chartType" @change="getThemeList('init');">
             <el-option
             <el-option
               v-for="item in chartTypeOpts"
               v-for="item in chartTypeOpts"
@@ -19,10 +19,14 @@
             :value="item.ChartThemeId"
             :value="item.ChartThemeId"
           />
           />
         </el-select>
         </el-select>
+        <span class="rename-item" @click="renameThemeOpen">
+          <img src="~@/assets/img/icons/edit_blue_new.png"/>
+          <span>重命名</span>
+        </span>
       </div>
       </div>
       <div>
       <div>
         <el-button type="primary" plain @click="$router.go(-1)">{{$t('Dialog.cancel_btn')}}</el-button>
         <el-button type="primary" plain @click="$router.go(-1)">{{$t('Dialog.cancel_btn')}}</el-button>
-        <el-button type="primary" @click="setThemeOptions">{{$t('Dialog.confirm_save_btn')}}</el-button>
+        <el-button type="primary" @click="setThemeOptions(null)">{{$t('Dialog.confirm_save_btn')}}</el-button>
       </div>
       </div>
     </div> 
     </div> 
 
 
@@ -48,7 +52,33 @@
         <Chart :options="options" :chartInfo="chartInfo" ref="chartRef" height="400px" minHeight="350px"/>
         <Chart :options="options" :chartInfo="chartInfo" ref="chartRef" height="400px" minHeight="350px"/>
       </div>
       </div>
     </div>
     </div>
-    
+    <!-- 重命名弹窗 -->
+    <m-dialog 
+      :title="$t('SystemManage.ChartSet.rename')" 
+      :show.sync="isOpenThemeDia" 
+      width="650px"
+    >
+      <div style="padding:30px 60px">
+        <div>
+          <label class="el-form-item__label">{{$t('SystemManage.ChartSet.theme_name')}}</label>
+          <el-input 
+            v-model="formData.themeName" 
+            :placeholder="$t('SystemManage.ChartSet.theme_name_placeholder')"
+          />
+        </div>
+      </div>
+      <div slot="footer" style="margin: 20px 0;">
+        <el-button
+          @click="saveThemeName"
+          type="primary"
+          style="width: 132px; height: 40px"
+          >{{$t('Dialog.confirm_save_btn')}}</el-button>
+        <el-button
+        @click="isOpenThemeDia=false"
+        style="width: 132px; height: 40px"
+        >{{$t('Dialog.cancel_btn')}}</el-button>
+      </div>
+    </m-dialog>
   </div>
   </div>
 </template>
 </template>
 <script>
 <script>
@@ -56,19 +86,22 @@ import * as chartThemeInterface from '@/api/modules/chartThemeApi';
 import { dataBaseInterface } from '@/api/api.js';
 import { dataBaseInterface } from '@/api/api.js';
 import { chartSetMixin } from '@/views/dataEntry_manage/mixins/chartPublic';
 import { chartSetMixin } from '@/views/dataEntry_manage/mixins/chartPublic';
 import Chart from '@/views/dataEntry_manage/components/chart.vue';
 import Chart from '@/views/dataEntry_manage/components/chart.vue';
-import optionsSection from './components/optionsSection.vue'
+import optionsSection from './components/optionsSection.vue';
+import mDialog from '@/components/mDialog.vue';
 export default {
 export default {
-  components: { optionsSection,Chart },
+  components: { optionsSection,Chart,mDialog },
   mixins: [ chartSetMixin ],
   mixins: [ chartSetMixin ],
   data() {
   data() {
     return {
     return {
       formData: {
       formData: {
         chartType: Number(this.$route.query.type),
         chartType: Number(this.$route.query.type),
-        theme: Number(this.$route.query.themeId)
+        theme: Number(this.$route.query.themeId),
+        themeName:''
       },
       },
       chartTypeOpts: [],
       chartTypeOpts: [],
       themeOpts: [],
       themeOpts: [],
-      chartInfo: {}
+      chartInfo: {},
+      isOpenThemeDia:false
     }
     }
   },
   },
   mounted(){
   mounted(){
@@ -128,17 +161,12 @@ export default {
     },
     },
 
 
     /* 保存配置 处理成标准化结构 */
     /* 保存配置 处理成标准化结构 */
-    async setThemeOptions() {
-      const { lineOptions,legendOptions,titleOptions,markerOptions,xAxisOptions,yAxisOptions,drawOption } = this.$refs.optionsSectionRef.themeOptions;
+    async setThemeOptions(themeName) {
+      const { legendOptions,titleOptions,markerOptions,xAxisOptions,yAxisOptions,drawOption,lineOptionList } = this.$refs.optionsSectionRef.themeOptions;
       
       
       let options = {
       let options = {
-        colorsOptions: lineOptions.colors,
-        lineOptions: { 
-          dashStyle: lineOptions.dashStyle,
-          lineWidth: lineOptions.lineWidth,
-          lineType: lineOptions.lineType,
-          radius: lineOptions.radius,
-        },
+        colorsOptions: lineOptionList.map(it => it.color),
+        lineOptionList,
         legendOptions,
         legendOptions,
         titleOptions,
         titleOptions,
         markerOptions,
         markerOptions,
@@ -146,20 +174,20 @@ export default {
         yAxisOptions,
         yAxisOptions,
         drawOption
         drawOption
       }
       }
-
       const { theme } = this.formData;
       const { theme } = this.formData;
-
       let ChartImage = await this.setChartImage();
       let ChartImage = await this.setChartImage();
-
       let res= await chartThemeInterface.saveTheme({
       let res= await chartThemeInterface.saveTheme({
-        ChartThemeName: this.themeOpts.find(_ => _.ChartThemeId===this.formData.theme).ChartThemeName,
+        ChartThemeName: themeName || this.themeOpts.find(_ => _.ChartThemeId===this.formData.theme).ChartThemeName,
         ChartThemeId: theme,
         ChartThemeId: theme,
         ChartImage,
         ChartImage,
         Config: JSON.stringify(options)
         Config: JSON.stringify(options)
       })
       })
 
 
       if(res.Ret !==200) return
       if(res.Ret !==200) return
+
       this.getThemeList()
       this.getThemeList()
+      // 重命名弹窗
+      this.isOpenThemeDia=false
       this.$message.success(this.$t('MsgPrompt.saved_msg'))
       this.$message.success(this.$t('MsgPrompt.saved_msg'))
     },
     },
 
 
@@ -177,6 +205,17 @@ export default {
       let { Data } = await dataBaseInterface.uploadImgSvg(form);
       let { Data } = await dataBaseInterface.uploadImgSvg(form);
       return Data.ResourceUrl;
       return Data.ResourceUrl;
     },
     },
+    // 重命名
+    renameThemeOpen(){
+      let themeItem = this.themeOpts.find(_ => _.ChartThemeId===this.formData.theme)
+      this.formData.themeName = themeItem && themeItem.ChartThemeName;
+      this.isOpenThemeDia=true
+    },
+    async saveThemeName(){
+      if(!this.formData.themeName) return this.$message.warning(this.$t('SystemManage.ChartSet.theme_name_placeholder'))
+      // 重命名 用保存的接口,走一遍保存的逻辑
+      this.setThemeOptions(this.formData.themeName)
+    }
   },
   },
 }
 }
 </script>
 </script>
@@ -197,6 +236,24 @@ export default {
     display: flex;
     display: flex;
     justify-content: space-between;
     justify-content: space-between;
     margin-bottom: 30px;
     margin-bottom: 30px;
+    .header-option{
+      display: flex;
+      align-items: center;
+      .rename-item{
+        font-size: 14px;
+        color: #0052D9;
+        font-weight: 400;
+        cursor: pointer;
+        display: flex;
+        align-items: center;
+        margin-left: 10px;
+        img{
+          width: 16px;
+          height: 16px;
+          margin-right: 4px;
+        }
+      }
+    }
   }
   }
   .main {
   .main {
     min-height: calc(100vh - 230px);
     min-height: calc(100vh - 230px);
@@ -205,7 +262,7 @@ export default {
       padding: 10px;
       padding: 10px;
       border: 1px solid #C8CDD9;
       border: 1px solid #C8CDD9;
       border-radius: 6px;
       border-radius: 6px;
-      margin-left: auto;
+      margin: 0 auto;
       .title {
       .title {
         margin-bottom: 10px;
         margin-bottom: 10px;
       }
       }