hbchen 4 mesiacov pred
rodič
commit
a7887c233f
25 zmenil súbory, kde vykonal 685 pridanie a 217 odobranie
  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)
 }
 
+/**
+ * 表格 获取原始指标来源
+ * @param {*} params  EdbInfoId
+ * @returns  
+ */
+export const getEdbBaseSource = params => {
+	return http.get('/datamanage/excel_info/get_edb_source',params)
+}
+
 /**
  * 下载excel
  * @param {*} params ExcelInfoId authorization

+ 4 - 0
src/lang/commonLang.js

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

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

@@ -240,6 +240,16 @@ export default {
       zh: "更新时间 ",
       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 = {
     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',
     label02:'Chart Library Default Theme',
     add_btn:'Add Custom Theme',
     edit_btn:'Edit Custom Theme',
+    rename:'Rename',
     theme_name:'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?',
@@ -35,23 +37,38 @@ export const ChartSetEn = {
     config_opt08:'Font Size',
     config_opt09:'Alignment Method',
     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',
     unit02:'st Bar',
     unit03:'st Series',
     config_opt05_yes:'Yes',
     config_opt05_no:'No',
+    config_opt11_none:'无',
+    config_opt11_inside:'内置',
     set_hint:'The default theme is set successfully',
 };
   
 /* 中文 */
 export const ChartSetZh = {
     label00:'图表的数据来源',
-    label00_hint:'开启状态表示新建图表时,数据来源展示开关默认开启,可手动切换,关闭状态同理,仅对新增图表生效,历史图表不处理',
+    label00_hint:`<p>开启状态表示新建图表或表格时,数据来源开关默认开启,可手动切换,关闭状态同理。</p>
+                <p style="margin-top:10px">注:仅对新增图表、表格生效,历史图表不处理。</p>`,
     label01:'图表类型',
     label02:'图库默认主题',
     add_btn:'添加自定义主题',
     edit_btn:'编辑自定义主题',
+    rename:'重命名',
     theme_name:'主题名称',
     theme_name_placeholder:'请输入主题名称',
     alert_msg:'删除后,所有采用该主题的图表,将采用ETA主题,是否确定删除?',
@@ -77,12 +94,25 @@ export const ChartSetZh = {
     config_opt08:'字号',
     config_opt09:'对齐方式',
     config_opt10:'背景色',
+    config_opt11:'数据标记',
+    config_opt12:'标记类型',
+    config_opt13:'标记大小',
+    config_opt14:'标记颜色',
+
+    square:'正方形',
+    circle:'圆形',
+    // diamond-砖石 highcharts里面菱形标记的值,所以这边用diamond
+    diamond:'菱形',
+    triangle:'三角形',
+    triangle_down:'倒三角形',
 
     unit01:'条',
     unit02:'根',
     unit03:'系列',
     config_opt05_yes:'是',
     config_opt05_no:'否',
+    config_opt11_none:'无',
+    config_opt11_inside:'内置',
     set_hint:'默认主题设置成功',
 };
   

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

@@ -259,8 +259,10 @@ export default {
         this.dateList.push(date_item)
         
         let themeOpt = this.chartInfo.ChartThemeStyle ? JSON.parse(this.chartInfo.ChartThemeStyle) : null;
+        // 看colorsOptions返不返回再说
+        console.log(themeOpt,'themeOpt');
         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()

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

@@ -20,7 +20,7 @@
         <el-form-item :label="$t('Edb.Detail.source')">
           <el-input
             v-model="chartSourceForm.text"
-            :placeholder="$t('Chart.Detail.input_content')"
+            :placeholder="$t('Chart.InputHolderAll.input_content')"
           />
         </el-form-item>
         <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() {
 
 			let themeOpt = this.chartInfo.ChartThemeStyle ? JSON.parse(this.chartInfo.ChartThemeStyle) : null;
-
+			console.log(themeOpt,'themeOpt');
 			this.tableData.forEach((item,index) => {
 				item.ChartColor = item.ChartColor || (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;//兼容预测指标绘图无主题配置
-				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) => {
 				item.ChartColor = 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;
 
-				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;
-
       //拼接标题 数据列
       let data = [];
       let ydata = [];
@@ -824,8 +823,8 @@ export const chartSetMixin = {
         //数据列
         let obj = {
           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,
           name:
             dynamic_arr.length > 1
@@ -836,7 +835,13 @@ export const chartSetMixin = {
           : `${item.EdbAliasName||item.EdbName}${dynamic_tag}`,
           nameEn:item.EdbNameEn?`${item.EdbNameEn}${dynamic_tag_en}`:`${item.EdbAliasName||item.EdbName}${dynamic_tag}`,
           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
         };
         item.DataList = item.DataList || [];
@@ -1034,7 +1039,7 @@ export const chartSetMixin = {
           : `${item.EdbAliasName||item.EdbName}${dynamic_tag}`,
           nameEn:item.EdbNameEn?`${item.EdbNameEn}${dynamic_tag_en}`:`${item.EdbAliasName||item.EdbName}${dynamic_tag}`,
           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,
           borderWidth: 1,
           borderColor: item.ChartColor,
@@ -1091,9 +1096,10 @@ export const chartSetMixin = {
                             this.isPredictorChart?chartData.DataList.List.filter((item, index) => index > 0):
                             chartData.DataList.filter((item, index) => index > 0):
                             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 = [],
         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 serie_item = {
           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,
           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
         };
         const data_array = this.calendar_type === '农历' && this.isPredictorChart?_.cloneDeep(j.Items):_.cloneDeep(j.DataList);
@@ -1415,7 +1429,7 @@ export const chartSetMixin = {
         color: ChartColor,
         chartType: 'linear',
         marker: {
-          radius: (chartTheme&&chartTheme.lineOptions.radius)||5,
+          radius: (chartTheme&&chartTheme.lineOptionList[0].radius)||5,
         },
       }
       real_data.forEach(_ => {
@@ -1586,22 +1600,22 @@ export const chartSetMixin = {
       }
 
       //数据列
-      data.forEach(item => {
+      data.forEach((item,index) => {
         //处理首或/尾全是无效数据的以null填充
         let filterData = this.filterInvalidData(item)
         // console.log(filterData)
       
         let serie_item = {
           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,
           name: item.Name,
           nameCh: item.Name,
           nameEn: item.NameEn,
           color: item.Color,
           chartType: 'linear',
-          lineWidth: (chartTheme&&chartTheme.lineOptions.lineWidth) || 3,
+          lineWidth: (chartTheme&&chartTheme.lineOptionList[index].lineWidth) || 3,
           marker: {
             enabled: false
           }
@@ -1826,18 +1840,18 @@ export const chartSetMixin = {
 
       //处理series
       let seriesData=[]
-      this.relevanceChartData.YDataList.forEach(item=>{
+      this.relevanceChartData.YDataList.forEach((item,index)=>{
         let serie_item = {
           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,
           name: item.Name,
           nameCh: item.Name,
           nameEn: item.NameEn,
           color: item.Color,
           chartType: 'linear',
-          lineWidth: (chartTheme&&chartTheme.lineOptions.lineWidth) || 3,
+          lineWidth: (chartTheme&&chartTheme.lineOptionList[index].lineWidth) || 3,
           marker: {
             enabled: false
           }
@@ -1951,7 +1965,7 @@ export const chartSetMixin = {
 
       //数据列
       let series = [];
-      DataList.forEach(item => {
+      DataList.forEach((item,index) => {
         //数据列
         let series_item = {
           data: [],
@@ -1963,7 +1977,7 @@ export const chartSetMixin = {
           chartType: 'linear',
           zIndex:1,
           marker: {
-            radius: (chartTheme&&chartTheme.lineOptions.radius)||5,
+            radius: (chartTheme&&chartTheme.lineOptionList[index].radius)||5,
           },
         }
         item.EdbInfoList.forEach(_ => {
@@ -2157,18 +2171,18 @@ export const chartSetMixin = {
 
       //系列
       let series = [];
-      YDataList.forEach(item => {
+      YDataList.forEach((item,index) => {
         let serie_item = {
           data: item.Value,
           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,
           name: item.Name || item.Date,
           nameCh: item.Name || item.Date,
           nameEn: item.Date,
           color: item.Color,
-          lineWidth: (chartTheme&&chartTheme.lineOptions.lineWidth) || 1,
+          lineWidth: (chartTheme&&chartTheme.lineOptionList[index].lineWidth) || 1,
           chartType: 'linear'
         };
         series.push(serie_item)
@@ -2246,14 +2260,14 @@ export const chartSetMixin = {
 
         let series_item = {
           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,
           name: item.Name,
           nameCh: item.Name,
           nameEn: item.NameEn||item.Name,
           color: item.Color,
-          lineWidth: (chartTheme&&chartTheme.lineOptions.lineWidth)||3,
+          lineWidth: (chartTheme&&chartTheme.lineOptionList[index].lineWidth)||3,
           chartType: 'linear',
           zIndex:1
         }

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

@@ -255,6 +255,12 @@ export default {
     disabled: { //是否只预览
       type: Boolean,
       default: false,
+    },
+    sourceFrom:{
+      type: Object,
+      default: ()=>{
+        return {}
+      },
     }
   },
   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.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'))
 
+      this.updateSourceFrom(sourceName)
       //如果有关联表格日期就建立新的关联关系
       if(relationDate&&relationUid) {
         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.DataTimeType = dataTimeType;
@@ -1115,7 +1124,7 @@ export default {
     /* 导入指标计算值 */
     insertCalculateData(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.ShowValue = InsertValue;
       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'))
 
+      this.updateSourceFrom(sourceName)
+
       //如果有关联表格日期就建立新的关联关系
       if(relationDate&&relationUid) {
         let relation = {
@@ -1175,14 +1186,12 @@ export default {
 
     /* 初始化8行5列 */
     initData(initData=null) {
-      console.log('initData');
       this.hasInit=false
       if(initData) {
         const { CellRelation,Data } = initData;
         this.config.data = Data;
         this.insertRelationArr = JSON.parse(CellRelation);
       }else {
-
         this.config.data = new Array(8).fill("").map((_,_rindex) => {
           return new Array(5).fill("").map((cell,_cindex) => ({
             ShowValue: "",
@@ -1294,6 +1303,14 @@ export default {
       
       this.$set(this.selectCell,'ShowStyle',ShowStyle)
       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,
         relationDate: '',//关联的表格日期
         relationUid: '',//关联格子的uid
-      }
+      },
     }
   },
   mounted(){
@@ -452,6 +452,13 @@ export default {
       const res = await sheetInterface.getMixedCalculateData(params)
       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.chooseItem = {
@@ -459,7 +466,8 @@ export default {
         relationUid: this.dateSelectForm.Type===2 ? this.dateSelectForm.relationUid : '',
         EdbInfoId: this.selectEdbInfo.EdbInfoId,
         InsertValue: res.Data.ShowValue||"",
-        Str: JSON.stringify(params)
+        Str: JSON.stringify(params),
+        sourceName:baseSourceName||''
       }
 
       // if(!this.calculateShowData.length) return this.$message.warning('该日期无数据')
@@ -482,8 +490,9 @@ export default {
         : await dataBaseInterface.targetList({EdbInfoId:e.EdbInfoId,CurrentIndex: 1})
 
       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 = {
         EdbCode,
         EdbName,
@@ -491,7 +500,6 @@ export default {
         Unit,
         StartDate,
         ModifyTime,
-        SourceName,
         EdbInfoId,
         HaveOperaAuth,
         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 = {}
       //插入系统日期
       // if(this.info.key==='insert-sys-date') {
-
+        // console.log(this.selectEdbInfo,'this.selectEdbInfo');
+        // return 
         let valueParam = {
           EdbInfoId: this.selectEdbInfo.EdbInfoId||0,
           MoveForward: this.formData.MoveForward,
           DateChange: this.$refs.dateMoveWayRef.dateChangeArr
         }
-
         let { Data } = await sheetInterface.getSystemDate({
           DataTimeType: this.dateChangeSelect,
           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 = {
           insertValue: Data.Date,
           dataTimeType: this.dateChangeSelect,
-          str: JSON.stringify(valueParam)
+          str: JSON.stringify(valueParam),
+          sourceName:baseSourceName||''
         }
       // }else { //指标日期
       //   backData = {

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

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

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

@@ -91,17 +91,45 @@
       ref="customTableRef"
       @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>
 </template>
 
 <script>
 import * as sheetInterface from '@/api/modules/sheetApi.js';
 import { dataBaseInterface } from 'api/api.js';
+import {etaBaseConfigInterence} from '@/api/modules/etaBaseConfigApi.js';
 import selectTarget from '@/views/chartRelevance_manage/components/selectTarget.vue';
 import CustomTable from './components/CustomTable.vue'
 import html2canvas from 'html2canvas';
+import chartSourceEditDia from '@/views/dataEntry_manage/components/chartSourceEditDialog.vue';
+
 export default {
-  components: { selectTarget,CustomTable },
+  components: { selectTarget,CustomTable,chartSourceEditDia},
   beforeRouteEnter(to, from, next) {
     if(to.query.id){
       to.matched[1].name=`编辑表格`
@@ -157,7 +185,10 @@ export default {
       isCanEdit:false,
       sheetButton:'',
       // 取消自动保存,比如返回的时候
-      cancelAutoSave:false
+      cancelAutoSave:false,
+      sheetSourceFrom:null,
+      isShowSourceDialog:false,
+      showSourceFrom:true
     }
   },
   methods: {
@@ -169,7 +200,16 @@ export default {
 
     /* 获取表格详情 */
     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({
 				ExcelInfoId: Number(this.sheetId)
@@ -184,13 +224,16 @@ export default {
         },1000)
         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.sheetForm = {
         name: ExcelName,
         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.$nextTick(()=>{
@@ -198,11 +241,17 @@ export default {
       })
       this.$refs.customTableRef.initSheetData(TableData);
     },
-
+    setDefaultSource(sourceText){
+      return JSON.stringify({
+        isShow: this.showSourceFrom,
+        text: sourceText,
+        color: "#606266",
+        fontSize: 9
+      })
+    },
     /* 选择指标push指标数组 */
     async handleSelectTarget(e) {
       if(!e) return
-
       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') )
       
@@ -217,7 +266,7 @@ export default {
         SortType: this.$refs.customTableRef.config.order===1 ? 'desc' : 'asc',
         Num: 12
       })
-      
+      this.updateSourceFrom(Data.ExcelSource)
       this.$refs.customTableRef.updateEdbData({
         Data: Data.Data.map(_ => ({..._,DataTimeType: 1,})),
         EdbAliasName: '',
@@ -253,7 +302,8 @@ export default {
         ExcelClassifyId: classify,
         ExcelImage:'',
         Source: 3,
-        TableData: this.$refs.customTableRef.getSaveParams()
+        TableData: this.$refs.customTableRef.getSaveParams(),
+        SourcesFrom:this.sheetForm.SourcesFrom
       };
       // console.log("自动保存");
       const res = await sheetInterface.sheetEdit({ ExcelInfoId: Number(this.sheetId),...params })
@@ -295,7 +345,8 @@ export default {
         ExcelClassifyId: classify,
         ExcelImage: Data.ResourceUrl,
         Source: 2,
-        TableData: this.$refs.customTableRef.getSaveParams()
+        TableData: this.$refs.customTableRef.getSaveParams(),
+        SourcesFrom:this.sheetForm.SourcesFrom
       };
 
       let isAdd = this.sheetId?false:true
@@ -331,7 +382,20 @@ export default {
     //   sheetInterface.markSheetEditStatus({ExcelInfoId: +this.sheetId,Status:2}).then(res=>{
     //     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() {
     this.getClassify();
@@ -350,6 +414,8 @@ export default {
 .customSheet-wrap {
   min-height: calc(100vh - 120px);
   min-width: 1020px;
+  position: relative;
+  padding-bottom: 30px;
   .wrap-top {
     // display: flex;
     // justify-content: space-between;
@@ -391,6 +457,10 @@ export default {
     }
 
   }
+  .chart-source{
+    position: absolute;
+    bottom: 0;
+  }
 }
 </style>
 <style lang="scss">

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

@@ -48,20 +48,49 @@
       </div>
     </div>
     
-    <MixedTable @autoSave="autoSaveFun"
+    <MixedTable @autoSave="autoSaveFun" @updateSourceName="updateSourceFromTable" :sourceFrom="sheetSourceFrom"
       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>
 </template>
 
 <script>
 import * as sheetInterface from '@/api/modules/sheetApi.js';
 import { dataBaseInterface } from 'api/api.js';
+import {etaBaseConfigInterence} from '@/api/modules/etaBaseConfigApi.js';
 import selectTarget from '@/views/chartRelevance_manage/components/selectTarget.vue';
 import MixedTable from './components/MixedTable.vue'
 import html2canvas from 'html2canvas';
+import chartSourceEditDia from '@/views/dataEntry_manage/components/chartSourceEditDialog.vue';
+
 export default {
-  components: { selectTarget,MixedTable },
+  components: { selectTarget,MixedTable,chartSourceEditDia },
   beforeRouteEnter(to, from, next) {
     if(to.query.id){
       to.matched[1].name=`编辑表格`
@@ -120,6 +149,9 @@ export default {
       cancelAutoSave:false,
 
       updating:false,//更新状态
+      sheetSourceFrom:null,
+      isShowSourceDialog:false,
+      showSourceFrom:true
     }
   },
   methods: {
@@ -131,7 +163,16 @@ export default {
 
     /* 获取表格详情 */
     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({
 				ExcelInfoId: Number(this.sheetId)
@@ -150,12 +191,14 @@ export default {
         return 
       }
 
-      const { ExcelName,ExcelClassifyId,TableData,ModifyTime,Button } = res.Data;
+      const { ExcelName,ExcelClassifyId,TableData,ModifyTime,Button,SourcesFrom,ExcelSource } = res.Data;
       this.sheetButton=Button
       this.sheetForm = {
         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.sheetInit=true
       })
@@ -165,7 +208,14 @@ export default {
       
       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() {
       sheetInterface.excelClassifyOne({Source: 3}).then(res => {
@@ -187,7 +237,8 @@ export default {
         ExcelClassifyId: classify,
         ExcelImage:'',
         Source: 3,
-        TableData: this.$refs.mixedTableRef.getSaveParams()
+        TableData: this.$refs.mixedTableRef.getSaveParams(),
+        SourcesFrom:this.sheetForm.SourcesFrom
       };
       console.log("自动保存");
       const res = await sheetInterface.sheetEdit({ ExcelInfoId: Number(this.sheetId),...params })
@@ -230,8 +281,10 @@ export default {
         ExcelClassifyId: classify,
         ExcelImage: Data.ResourceUrl,
         Source: 3,
-        TableData: this.$refs.mixedTableRef.getSaveParams()
+        TableData: this.$refs.mixedTableRef.getSaveParams(),
+        SourcesFrom:this.sheetForm.SourcesFrom
       };
+
       let isAdd = this.sheetId?false:true
       const res = this.sheetId
       ? await sheetInterface.sheetEdit({ ExcelInfoId: Number(this.sheetId),...params })
@@ -267,6 +320,15 @@ export default {
     //     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() {
     this.getClassify();
@@ -285,6 +347,8 @@ export default {
 .customSheet-wrap {
   min-width: 1070px;
   min-height: calc(100vh - 120px);
+  position: relative;
+  padding-bottom: 30px;
   .wrap-top {
     display: flex;
     justify-content: space-between;
@@ -309,5 +373,9 @@ export default {
       }
     }
   }
+  .chart-source{
+    position: absolute;
+    bottom: 0;
+  }
 }
 </style>

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

@@ -306,6 +306,15 @@
                 :disabled="true"
                 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>
           </template>
 
@@ -1062,7 +1071,10 @@ export default {
           this.sheetDetailInfo = res.Data;
           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')}`
-
+          if(!this.sheetDetailInfo.SourcesFrom){
+            this.sheetDetailInfo.SourcesFrom = this.setDefaultSource(this.sheetDetailInfo.ExcelSource)
+          }
+          
           this.$nextTick(() => {
             //sheet组件Mounted已经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 = ""}) {
       const { ExcelClassifyId, ExcelInfoId  } = cell;
@@ -1419,6 +1438,9 @@ $normal-font: 14px;
           box-sizing: border-box;
           padding: 15px;
           overflow-y: auto;
+          display: flex;
+          flex-direction: column;
+          justify-content: space-between;
           /* min-height: 500px; */
         }
       }

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

@@ -204,14 +204,20 @@ export default {
         //数据列
         let obj = {
           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,
           name:nameCh,
           nameCh:nameCh,
           nameEn:nameEn,
           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
         };
         item.DataList = item.DataList || [];
@@ -437,12 +443,15 @@ export default {
        /* 主题样式*/
       const chartTheme =  this.chartInfo.ChartThemeStyle ? JSON.parse(this.chartInfo.ChartThemeStyle) : null;
 
-
       // 农历数据需要去除第一项 在ETA1.0.5之后,除了这里 农历和公历处理逻辑一样
       const temChartDataList=chartData.DataList||[]
       const chartDataHandle=this.calendar_type === '农历'?
       temChartDataList.filter((item, index) => index > 0):
       temChartDataList
+
+      // 跟颜色对应
+      chartTheme.lineOptionList=chartTheme.lineOptionList.reverse().slice(-chartDataHandle.length)
+
       let seasonYdata = [],
         seasonData = []
 
@@ -451,17 +460,24 @@ export default {
         minLimit = this.chartLimit.min||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 serie_item = {
           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,
           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
         };
         const data_array = _.cloneDeep(j.DataList);
@@ -673,7 +689,7 @@ export default {
         chartType: 'linear',
         color: ChartColor,
         marker: {
-          radius: (chartTheme&&chartTheme.lineOptions.radius)||5,
+          radius: (chartTheme&&chartTheme.lineOptionList[0].radius)||5,
         },
       }
       real_data.forEach(_ => {
@@ -882,21 +898,21 @@ export default {
       }
 
       //数据列
-      data.forEach(item => {
+      data.forEach((item,index) => {
         //处理首或/尾全是无效数据的以null填充
         let filterData = this.filterInvalidData(item)
 
         let serie_item = {
           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,
           name: item.Name,
           nameCh: item.Name,
           nameEn: item.NameEn,
           color: item.Color,
           chartType: 'linear',
-          lineWidth: (chartTheme&&chartTheme.lineOptions.lineWidth) || 3,
+          lineWidth: (chartTheme&&chartTheme.lineOptionList[index].lineWidth) || 3,
           marker: {
             enabled: false
           }
@@ -1100,18 +1116,18 @@ export default {
 
       //处理series
       let seriesData=[]
-      this.relevanceChartData.YDataList.forEach(item=>{
+      this.relevanceChartData.YDataList.forEach((item,index)=>{
         let serie_item = {
           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,
           name: item.Name,
           nameCh: item.Name,
           nameEn: item.NameEn,
           color: item.Color,
           chartType: 'linear',
-          lineWidth: (chartTheme&&chartTheme.lineOptions.lineWidth) || 3,
+          lineWidth: (chartTheme&&chartTheme.lineOptionList[index].lineWidth) || 3,
           marker: {
             enabled: false
           }
@@ -1237,7 +1253,7 @@ export default {
           chartType: 'linear',
           zIndex:1,
           marker: {
-            radius: (chartTheme&&chartTheme.lineOptions.radius)||5,
+            radius: (chartTheme&&chartTheme.lineOptionList.radius)||5,
           },
         }
         item.EdbInfoList.forEach(_ => {
@@ -1403,14 +1419,14 @@ export default {
 
         let series_item = {
           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,
           name: item.Name,
           nameCh: item.Name,
           nameEn: item.NameEn||item.Name,
           color: item.Color,
-          lineWidth: (chartTheme&&chartTheme.lineOptions.lineWidth)||3,
+          lineWidth: (chartTheme&&chartTheme.lineOptionList[index].lineWidth)||3,
           chartType: 'linear',
           zIndex:1
         }
@@ -1665,18 +1681,18 @@ export default {
 
       //系列
       let series = [];
-      YDataList.forEach(item => {
+      YDataList.forEach((item,index) => {
         let serie_item = {
           data: item.Value,
           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,
           name: item.Name || item.Date,
           nameCh: item.Name || item.Date,
           nameEn: item.Date,
           color: item.Color,
-          lineWidth: (chartTheme&&chartTheme.lineOptions.lineWidth) || 1,
+          lineWidth: (chartTheme&&chartTheme.lineOptionList[index].lineWidth) || 1,
           chartType: 'linear'
         };
         series.push(serie_item)

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

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

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

@@ -52,6 +52,15 @@
       @click.stop="delChart(position)"
       v-if="isBtnShow"
     ></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>
   
 </template>
@@ -69,13 +78,18 @@ export default {
     return {
       tableData:[],
       type:'sheet',
-      tableKey:0
+      tableKey:0,
+      sheetSourceFrom:{}
     };
   },
   methods:{
     getSheetData(id,value){
       this.tableKey++
-      this.tableData = value
+      if(value){
+        this.tableData = value.list
+        this.sheetSourceFrom=(value.otherParams && value.otherParams.SourcesFrom) ? JSON.parse(value.otherParams.SourcesFrom):''
+      }
+
     }
   },
   mounted(){
@@ -104,4 +118,9 @@ export default {
 			}
   }
 }
+.chart-source{
+  width: 95%;
+  position: absolute;
+  left: 2%;
+}
 </style>

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

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

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

@@ -314,7 +314,7 @@ export default {
         const elements = this.pageList[i].elements;
         const elLength = elements.length;
         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") {
             console.log("img/chart...");
             let svgData = this.optionMap[this.pageList[i].elements[j].chartId] instanceof Object
@@ -339,7 +339,8 @@ export default {
           }else if (elements[j].type==='sheet'){
             console.log('table...')
             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(
             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){
             slide.addText(textData,{
@@ -384,10 +385,12 @@ export default {
               h:offsetY===0?height:(realSize.height/imgData2Obj.imgHeight*percentHeight)+'%',
               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}
             })
+            //追加生成表格底部文字
+            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 elLength = elements.length;
         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") {
             console.log("img/chart...");
             let svgData = this.optionMap[this.pageList[i].elements[j].chartId] instanceof Object
@@ -364,7 +364,8 @@ export default {
           }else if (elements[j].type==='sheet'){
             console.log('table...')
             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(
             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){
             slide.addText(textData,{
               x:x,
@@ -410,9 +411,11 @@ export default {
               size:{type:"contain"}
             })
           }else if(sheetData){
-            slide.addTable(sheetData,{
+            slide.addTable(sheetData.list,{
               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>` },
 ]
 
+//可选数据标识样式
+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默认值 几种类型图样式还区分开...*/
 export const defaultETAOptions = {
   colorsOptions: defaultOpts.colors.slice(0,10),
+  // 需要将 lineOptions 里面的属性变成 10条线条的独立属性,即长度为10的数组传给后端
   lineOptions: { 
     dashStyle: 'Solid',
+    // color:'#ff0000', //线条颜色
     lineWidth: 1,
     lineType: 'spline',
     radius: 5,
+    dataMark:'none',// none:无 built-in:内置
+    markType:"square",
+    markSize:5,
+    // markColor:'#ff0000' //默认同 线条颜色一致
   },
+  // lineOptionList:[{}],
   legendOptions: {
     verticalAlign: 'top',
     itemStyle: {

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

@@ -2,29 +2,20 @@
   <div class="charTheme-setting-option">
     <ul class="options-wrapper">
       <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">
              <!-- 线条设置 -->
-            <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">
                   <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt02')}}</label>
                   <el-select 
-                    v-model="themeOptions[key].colorIndex"
+                    v-model="lineIndex"
                     style="width: 90px"
                   >
                     <el-option 
-                      v-for="(item,index) in themeOptions[key].colors" 
+                      v-for="(item,index) in themeOptions[key]" 
                       :key="index"
                       :label="`${$i18n.locale == 'zh'?'第':''}${index+1}${typeLabelMap[chartType].lineLabel}`"
                       :value="index"
@@ -32,12 +23,22 @@
                   </el-select>
                 </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)">
                   <li class="option-item">
                     <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt03')}}</label>
                     <el-select 
-                      v-model="themeOptions[key].dashStyle"
+                      v-model="themeOptions[key][lineIndex].dashStyle"
                       style="width: 90px"
                     >
                       <el-option 
@@ -54,17 +55,17 @@
                   <li class="option-item">
                     <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt04')}}</label>
                     <el-input
-                      v-model="themeOptions[key].lineWidth"
+                      v-model="themeOptions[key][lineIndex].lineWidth"
                       style="width: 90px"
                       type="number"
                       :min="1"
-                      @change="val => { themeOptions[key].lineWidth=Number(val)}"
+                      @change="val => { themeOptions[key][lineIndex].lineWidth=Number(val)}"
                     />
                   </li>
                   <li class="option-item">
                     <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt05')}}</label>
                     <el-select 
-                      v-model="themeOptions[key].lineType"
+                      v-model="themeOptions[key][lineIndex].lineType"
                       style="width: 90px"
                     >
                       <el-option :label="$t('SystemManage.ChartSet.config_opt05_yes')" value="spline"/>
@@ -72,17 +73,68 @@
                     </el-select>
                   </li>
                 </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)">
                   <li class="option-item">
                     <label class="el-form-item__label">{{$t('SystemManage.ChartSet.config_opt06')}}</label>
                     <el-input
-                      v-model="themeOptions[key].radius"
+                      v-model="themeOptions[key][lineIndex].radius"
                       style="width: 90px"
                       type="number"
                       :min="3"
-                      @change="val => { themeOptions[key].radius=Number(val)}"
+                      @change="val => { themeOptions[key][lineIndex].radius=Number(val)}"
                     />
                   </li>
                 </template>
@@ -202,7 +254,9 @@
   </div>
 </template>
 <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';
 export default {
   props: {
@@ -217,7 +271,7 @@ export default {
   computed:{
     labelMap(){
       return new Map([
-        ['lineOptions',this.$t('SystemManage.ChartSet.opt_label01')],
+        ['lineOptionList',this.$t('SystemManage.ChartSet.opt_label01')],
         ['scatterOptions',this.$t('SystemManage.ChartSet.opt_label02')],
         ['legendOptions',this.$t('SystemManage.ChartSet.opt_label03')],
         ['titleOptions',this.$t('SystemManage.ChartSet.opt_label04')],
@@ -245,17 +299,31 @@ export default {
       predefineColors,
       lineStylesOpts,
       alignPositions,
+      markTypesOpts,
      /* 可配置options*/
       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,
         titleOptions: defaultETAOptions.titleOptions,
         markerOptions: defaultETAOptions.markerOptions,
@@ -263,27 +331,9 @@ export default {
         yAxisOptions: defaultETAOptions.yAxisOptions,
         drawOption: defaultETAOptions.drawOption
       },
+      colorsOptions:this.chartType===2?seasonOptions.colors:defaultETAOptions.colorsOptions,
+      lineIndex:0,
       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: []
     }
   },
@@ -300,17 +350,17 @@ export default {
           spinner: 'el-icon-loading',
           background: 'rgba(255, 255, 255, 0.8)'
       });
-
       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,
         titleOptions: options.titleOptions,
         markerOptions: options.markerOptions,

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

@@ -5,7 +5,8 @@
         <div class="setting-item">
             <span>
                 {{$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>
                 </el-tooltip>
             </span>

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

@@ -1,7 +1,7 @@
 <template>
   <div class="themeSet-page">
     <div class="header">
-      <div>
+      <div class="header-option">
         <el-select v-model="formData.chartType" @change="getThemeList('init');">
             <el-option
               v-for="item in chartTypeOpts"
@@ -19,10 +19,14 @@
             :value="item.ChartThemeId"
           />
         </el-select>
+        <span class="rename-item" @click="renameThemeOpen">
+          <img src="~@/assets/img/icons/edit_blue_new.png"/>
+          <span>重命名</span>
+        </span>
       </div>
       <div>
         <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> 
 
@@ -48,7 +52,33 @@
         <Chart :options="options" :chartInfo="chartInfo" ref="chartRef" height="400px" minHeight="350px"/>
       </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>
 </template>
 <script>
@@ -56,19 +86,22 @@ import * as chartThemeInterface from '@/api/modules/chartThemeApi';
 import { dataBaseInterface } from '@/api/api.js';
 import { chartSetMixin } from '@/views/dataEntry_manage/mixins/chartPublic';
 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 {
-  components: { optionsSection,Chart },
+  components: { optionsSection,Chart,mDialog },
   mixins: [ chartSetMixin ],
   data() {
     return {
       formData: {
         chartType: Number(this.$route.query.type),
-        theme: Number(this.$route.query.themeId)
+        theme: Number(this.$route.query.themeId),
+        themeName:''
       },
       chartTypeOpts: [],
       themeOpts: [],
-      chartInfo: {}
+      chartInfo: {},
+      isOpenThemeDia:false
     }
   },
   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 = {
-        colorsOptions: lineOptions.colors,
-        lineOptions: { 
-          dashStyle: lineOptions.dashStyle,
-          lineWidth: lineOptions.lineWidth,
-          lineType: lineOptions.lineType,
-          radius: lineOptions.radius,
-        },
+        colorsOptions: lineOptionList.map(it => it.color),
+        lineOptionList,
         legendOptions,
         titleOptions,
         markerOptions,
@@ -146,20 +174,20 @@ export default {
         yAxisOptions,
         drawOption
       }
-
       const { theme } = this.formData;
-
       let ChartImage = await this.setChartImage();
-
       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,
         ChartImage,
         Config: JSON.stringify(options)
       })
 
       if(res.Ret !==200) return
+
       this.getThemeList()
+      // 重命名弹窗
+      this.isOpenThemeDia=false
       this.$message.success(this.$t('MsgPrompt.saved_msg'))
     },
 
@@ -177,6 +205,17 @@ export default {
       let { Data } = await dataBaseInterface.uploadImgSvg(form);
       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>
@@ -197,6 +236,24 @@ export default {
     display: flex;
     justify-content: space-between;
     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 {
     min-height: calc(100vh - 230px);
@@ -205,7 +262,7 @@ export default {
       padding: 10px;
       border: 1px solid #C8CDD9;
       border-radius: 6px;
-      margin-left: auto;
+      margin: 0 auto;
       .title {
         margin-bottom: 10px;
       }