Selaa lähdekoodia

单因子图例,数据来源,标题

cxmo 10 kuukautta sitten
vanhempi
commit
9a92d9385c

+ 1 - 1
src/views/chartRelevance_manage/components/chartCard.vue

@@ -76,7 +76,7 @@ export default {
         title = [3,4].includes(this.entryType) ? `滚动相关性${this.entryType-2}` : this.entryType===1 ? this.chartInfo.ChartName : ''
       }else if(this.$route.path==='/relevancechartEditorV2'){
         if(this.settings.Model===1){
-            title = [3,4].includes(this.entryType) ? `滚动相关性${this.entryType-2}` : this.entryType===1 ? this.chartInfo.ChartName : ''
+            title = [3,4].includes(this.entryType) ? `滚动相关性${this.entryType-2}` : this.entryType===1 ? this.chartInfo.ChartName : this.relevanceChartData.ChartName
         }else{
             title = this.relevanceChartData.ChartName
         }

+ 20 - 2
src/views/chartRelevance_manage/components/saveChartTobaseDia.vue

@@ -34,7 +34,8 @@
                 label: 'ChartClassifyName',
                 value: 'ChartClassifyId',
                 children: 'Children',
-                emitPath: false
+                emitPath: false,
+                checkStrictly:isRelevanceChart
               }"
               style="width: 80%"
               :placeholder="$t('Edb.InputHolderAll.input_classify')"
@@ -92,6 +93,9 @@ export default {
 					{ required: true, message: /* '图表分类不能为空' */this.$t('Chart.Vailds.classify_msg'), trigger: 'blur' },
 				],
 			}
+		},
+		isRelevanceChart(){
+			return ['/relevancechartEditor','/relevancechartEditorV2'].includes(this.$route.path)&&this.chartData.Source!==1
 		}
 	},
 	data () {
@@ -181,7 +185,21 @@ export default {
 
       let res = null;
       if(['/relevancechartEditor','/relevancechartEditorV2'].includes(this.$route.path)) {
-        res = await chartRelevanceApi.saveChart(params)
+        //单因子-相关性额外参数
+        let otherParams = this.source===2?{
+            CorrelationExtraConfig:{
+                LegendConfig:this.$parent.chartBatchData.CorrelationData.YDataList.map(i=>{
+                    return {
+                        LegendName:i.Name,
+                        SeriesId:i.SeriesId,
+                        EdbInfoId:i.Id,
+                        Color:i.Color
+                    }
+                })
+            },
+            SourcesFrom:this.$parent.chartBatchData.SourcesFrom
+        }:{}
+        res = await chartRelevanceApi.saveChart({...params,...otherParams})
       }else if(this.$route.path==='/statisticFeatureChartEditor') {
         res = await statisticFeatureInterface.saveChart(params);
       } 

+ 4 - 1
src/views/chartRelevance_manage/css/index.scss

@@ -146,13 +146,16 @@ $normal-font: 14px;
               text-align: center;
               margin-bottom: 10px;
             }
-            .chart-author {
+            .chart-author,.chart-source {
               font-size: 14px;
               color: #333;
               position: absolute;
               bottom: 0;
               right: 50px;
             }
+            .chart-source{
+                left:50px;
+            }
             .chartWrapper {
               position: relative;
               .range-cont {

+ 12 - 1
src/views/chartRelevance_manage/relevance/list.vue

@@ -184,6 +184,9 @@
                     ref="chartRef"
                   />
                 </div>
+                <span class="chart-source" v-if="chartInfo.SourcesFrom.isShow&&chartInfo.SourcesFrom.text">
+                    数据来源:{{ chartInfo.SourcesFrom.text }}
+                </span>
                 <span class="chart-author"
                   >{{$t('MsgPrompt.author')}}:{{ chartInfo.SysUserRealName }}</span
                 >
@@ -298,6 +301,7 @@
       :type="classifyDiaType"
       :formData="classifyForm"
       @sucessCallback="sucessCallback"
+      @closeDia="classifyDia = false"
     />
 
     <!-- 加入我的图库弹窗 -->
@@ -349,6 +353,7 @@ import setEnNameDia from "@/views/dataEntry_manage/components/setEnNameDia.vue";
 import { chartSetMixin } from "@/views/dataEntry_manage/mixins/chartPublic";
 import { copyOtherOptions } from '@/utils/defaultOptions';
 import setLangInfoDia from '@/views/dataEntry_manage/components/setLangInfo.vue'
+import { baseSourcesFrom } from './utils/config'
 export default {
   components: {
     changeLang,
@@ -853,6 +858,12 @@ export default {
             }, 1200);
           })
           if(this.chartInfo.Source === 3) {
+            const SourcesFrom = this.chartInfo.SourcesFrom
+            try{
+                this.chartInfo.SourcesFrom = SourcesFrom?JSON.parse(SourcesFrom):baseSourcesFrom
+            }catch(e){
+                this.chartInfo.SourcesFrom = baseSourcesFrom
+            }
             this.relevanceChartData = {
               ChartInfo: res.Data.ChartInfo,
               EdbInfoList: res.Data.EdbInfoList,
@@ -861,7 +872,7 @@ export default {
               YDataList: [
                 {
                   Value: res.Data.YDataList[0].Value,
-                  Color: "#00f",
+                  Color: res.Data.YDataList[0].Color,
                   Name: res.Data.ChartInfo.ChartName,
                   NameEn: res.Data.ChartInfo.ChartNameEn
                 },

+ 0 - 1
src/views/chartRelevance_manage/relevance/relevanceChartEditorV2.vue

@@ -741,7 +741,6 @@ export default {
                 },
                 SourcesFrom,
             }
-            console.log('test',params)
             const {ChartInfoId} = this.multipleChartData.ChartInfo
             const isEdit = ChartInfoId&&type!=='saveOther'
             //另存为/新增->add 更新->edit