Browse Source

Merge branch 'custom' of http://8.136.199.33:3000/eta_front/eta_front into custom

Karsa 2 months ago
parent
commit
9ec1f4cd4c

+ 8 - 0
src/lang/modules/EtaChart/commonLang.js

@@ -183,6 +183,10 @@ export default {
 
 
   //操作提示文案
   //操作提示文案
   OptMsg:{
   OptMsg:{
+    set_chart_alias: {
+      zh:'设置图表别名,默认PPT中插入该图表时显示,若无设置,则PPT中不显示该图表名称。',
+      en:'Set chart alias, by default, when inserting this chart into the PPT, it will be displayed. If not set, the chart name will not be displayed in the PPT.'
+    },
     refresh_ing_msg: {
     refresh_ing_msg: {
       zh:'刷新图表中...',
       zh:'刷新图表中...',
       en:'Refreshing chart...'
       en:'Refreshing chart...'
@@ -341,6 +345,10 @@ export default {
       zh:'图表单位',
       zh:'图表单位',
       en:'Chart Unit',
       en:'Chart Unit',
     },
     },
+    chart_alias: {
+      zh:'图表别名',
+      en:'Chart Alias',
+    },
     line_color: {
     line_color: {
       zh:'线条颜色',
       zh:'线条颜色',
       en:'Line Color',
       en:'Line Color',

+ 14 - 14
src/views/dataEntry_manage/addChart.vue

@@ -101,32 +101,32 @@
 							clearable
 							clearable
 						/>
 						/>
 					</el-form-item>
 					</el-form-item>
-					<el-form-item :label="$t('Chart.Detail.chart_classify')" prop="classify">
-						<cascader
-							v-model="chartInfo.classify"
-							:options="classifyOptions"
-							:props="levelProps"
-							cascaderWidth="width: 90%"
-							:placeholder="$t('Chart.InputHolderAll.input_classify')"
-							:config="{ label: currentLang === 'zh' ? 'ChartClassifyName' : 'ChartClassifyNameEn',value: 'ChartClassifyId'}"
-						/>
-					</el-form-item>
-					<!-- 图表别名 英文文案还没给-->
-					<el-form-item label="图表别名" prop="ChartAlias" v-if="[1,5,6].includes(chartInfo.ChartType)">
+					<!-- 图表别名 -->
+					<el-form-item :label="$t('Chart.Detail.chart_alias')" prop="ChartAlias" v-if="[1,4,5,6,11,14].includes(chartInfo.ChartType)">
 						<el-input
 						<el-input
 							v-model="chartInfo.ChartAlias"
 							v-model="chartInfo.ChartAlias"
 							style="width: 90%"
 							style="width: 90%"
-							placeholder="请输入图表别名"
+							:placeholder="$t('Chart.InputHolderAll.input_common',{label:$t('Chart.Detail.chart_alias')})"
 							clearable
 							clearable
 						/>
 						/>
 						<el-tooltip effect="dark" placement="right">
 						<el-tooltip effect="dark" placement="right">
 							<div
 							<div
 								slot="content"
 								slot="content"
 								style="line-height: 20px;width:300px"
 								style="line-height: 20px;width:300px"
-								>设置图表别名,默认PPT中插入该图表时显示,若无设置,则PPT中不显示该图表名称。</div>
+								>{{$t('Chart.OptMsg.set_chart_alias')}}</div>
 							<i class="el-icon-question" style="color: #666" />
 							<i class="el-icon-question" style="color: #666" />
 						</el-tooltip>
 						</el-tooltip>
 					</el-form-item>
 					</el-form-item>
+					<el-form-item :label="$t('Chart.Detail.chart_classify')" prop="classify">
+						<cascader
+							v-model="chartInfo.classify"
+							:options="classifyOptions"
+							:props="levelProps"
+							cascaderWidth="width: 90%"
+							:placeholder="$t('Chart.InputHolderAll.input_classify')"
+							:config="{ label: currentLang === 'zh' ? 'ChartClassifyName' : 'ChartClassifyNameEn',value: 'ChartClassifyId'}"
+						/>
+					</el-form-item>
 					<el-form-item :label="$t('Chart.Detail.chart_unit')" prop="Unit" v-if="[7,11].includes(chartInfo.ChartType)">
 					<el-form-item :label="$t('Chart.Detail.chart_unit')" prop="Unit" v-if="[7,11].includes(chartInfo.ChartType)">
 						<el-select
 						<el-select
 							v-model="chartInfo.Unit"
 							v-model="chartInfo.Unit"

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

@@ -150,7 +150,10 @@ export default {
   },
   },
   watch: {
   watch: {
     datedata(newval) {
     datedata(newval) {
-      this.dateList = newval.map((_,index) => ({
+      if(!newval){
+        newval=[]
+      }
+      this.dateList =newval.map((_,index) => ({
         ...this.dateList[index],
         ...this.dateList[index],
         Color: _.Color,
         Color: _.Color,
         RealDate: this.dateList[index].Type === 3 ? this.dateList[index].Date : _.Date,
         RealDate: this.dateList[index].Type === 3 ? this.dateList[index].Date : _.Date,

+ 13 - 13
src/views/dataEntry_manage/editChart.vue

@@ -122,31 +122,31 @@
 							clearable
 							clearable
 						/>
 						/>
 					</el-form-item>
 					</el-form-item>
-					<el-form-item :label="$t('Chart.Detail.chart_classify')" prop="classify">
-						<el-cascader
-							v-model="chartInfo.classify"
-							:options="classifyOptions"
-							:props="levelProps"
-							style="width: 90%"
-							:placeholder="$t('Chart.InputHolderAll.input_classify')"
-						/>
-					</el-form-item>
-					<!-- 图表别名 英文文案还没给-->
-					<el-form-item label="图表别名" prop="ChartAlias" v-if="[1,5,6].includes(chartInfo.ChartType)">
+					<!-- 图表别名-->
+					<el-form-item :label="$t('Chart.Detail.chart_alias')" prop="ChartAlias" v-if="[1,4,5,6,11,14].includes(chartInfo.ChartType)">
 						<el-input
 						<el-input
 							v-model="chartInfo.ChartAlias"
 							v-model="chartInfo.ChartAlias"
 							style="width: 90%"
 							style="width: 90%"
-							placeholder="请输入图表别名"
+							:placeholder="$t('Chart.InputHolderAll.input_common',{label:$t('Chart.Detail.chart_alias')})"
 							clearable
 							clearable
 						/>
 						/>
 						<el-tooltip effect="dark" placement="right">
 						<el-tooltip effect="dark" placement="right">
 							<div
 							<div
 								slot="content"
 								slot="content"
 								style="line-height: 20px;width:300px"
 								style="line-height: 20px;width:300px"
-								>设置图表别名,默认PPT中插入该图表时显示,若无设置,则PPT中不显示该图表名称。</div>
+								>{{$t('Chart.OptMsg.set_chart_alias')}}</div>
 							<i class="el-icon-question" style="color: #666" />
 							<i class="el-icon-question" style="color: #666" />
 						</el-tooltip>
 						</el-tooltip>
 					</el-form-item>
 					</el-form-item>
+					<el-form-item :label="$t('Chart.Detail.chart_classify')" prop="classify">
+						<el-cascader
+							v-model="chartInfo.classify"
+							:options="classifyOptions"
+							:props="levelProps"
+							style="width: 90%"
+							:placeholder="$t('Chart.InputHolderAll.input_classify')"
+						/>
+					</el-form-item>
 					<el-form-item :label="$t('Chart.Detail.chart_unit')" prop="Unit" v-if="[7,11].includes(chartInfo.ChartType)">
 					<el-form-item :label="$t('Chart.Detail.chart_unit')" prop="Unit" v-if="[7,11].includes(chartInfo.ChartType)">
 						<el-select
 						<el-select
 							v-model="chartInfo.Unit"
 							v-model="chartInfo.Unit"

+ 1 - 1
src/views/ppt_manage/mixins/pptMixins.js

@@ -737,7 +737,7 @@ export default {
       */
       */
      const {Source,MyChartType,ChartThemeStyle} = options
      const {Source,MyChartType,ChartThemeStyle} = options
      const isShowTitle = isShowPPTTitle(Source,MyChartType)
      const isShowTitle = isShowPPTTitle(Source,MyChartType)
-     const isShowOtherTitle = Source===1&&[1,5,6].includes(MyChartType)
+     const isShowOtherTitle = Source===1&&[1,4,5,6,11,14].includes(MyChartType)
      
      
     /* 主题样式*/
     /* 主题样式*/
     const chartTheme =  ChartThemeStyle ? JSON.parse(ChartThemeStyle) : null;
     const chartTheme =  ChartThemeStyle ? JSON.parse(ChartThemeStyle) : null;