Эх сурвалжийг харах

工具箱-商品价格曲线

jwyu 1 жил өмнө
parent
commit
0a226ea8e5

+ 61 - 0
src/lang/modules/ToolBox/CommodityPriceChart.js

@@ -0,0 +1,61 @@
+/**
+ * 工具箱-商品价格曲线
+ */
+
+/* 英文 */
+export const CommodityPriceChartEn = {
+    add_price_line_btn:'Add a price curve',
+    add_price_profit_btn:'Adding Profit Curves',
+    select_spot_price:'Select spot price indicators',
+    plate_profit_set:'Plate Profit Settings',
+    select_future:'select futures',
+    please_select_future:'please select futures',
+    chart_name:'Chart Name',
+    chart_classify:'Categories of Charts',
+    please_select_classify:'Please Select Categories',
+    add_date:'Add Date',
+    add_method:'Adding Methods',
+    latest_date:'Latest Date',
+    n_day_before:'N Days Ago',
+    fix_date:'Fixed Date',
+    day_num:'Number of Days',
+    day_num_placeholder:'Please enter number',
+    select_date:'Select Date',
+    add_params_btn:'Add more parameters',
+    formula_label:'Formula',
+    formula_label_placeholder:'Please enter the formula',
+    formula_exp:'Formula Example',
+    fun_support:'Functions Support',
+    plate_profit_name:'Plate Profit'
+};
+  
+/* 中文 */
+export const CommodityPriceChartZh = {
+    add_price_line_btn:'添加价格曲线',
+    add_price_profit_btn:'添加利润曲线',
+    select_spot_price:'选择现货价格指标',
+    plate_profit_set:'盘面利润设置',
+    select_future:'选择期货',
+    please_select_future:'请选择期货',
+    chart_name:'图表名称',
+    chart_classify:'图表分类',
+    please_select_classify:'请选择所属分类',
+    add_date:'添加日期',
+    add_method:'添加方式',
+    latest_date:'最新日期',
+    n_day_before:'N天前',
+    fix_date:'固定日期',
+    day_num:'天数',
+    day_num_placeholder:'请输入数字',
+    select_date:'选择日期',
+    add_params_btn:'添加更多参数',
+    formula_label:'计算公式',
+    formula_label_placeholder:'请输入公式',
+    formula_exp:'公式示例',
+    fun_support:'函数支持',
+    plate_profit_name:'盘面利润'
+};
+  
+/**
+* $t('ToolBox.CommodityPriceChart.XXX')
+*/

+ 4 - 1
src/lang/modules/ToolBox/IndexEn.js

@@ -1,8 +1,11 @@
 import { AIQuestionEn } from "./AIQuestion";
+import { CommodityPriceChartEn } from "./CommodityPriceChart";
+
 
 export default {
     // 工具箱
     ToolBox: {
-        AIQuestion:AIQuestionEn
+        AIQuestion:AIQuestionEn,
+        CommodityPriceChart:CommodityPriceChartEn
     },
 };

+ 3 - 1
src/lang/modules/ToolBox/IndexZh.js

@@ -1,9 +1,11 @@
 import { AIQuestionZh } from "./AIQuestion";
+import { CommodityPriceChartZh } from "./CommodityPriceChart";
 
 
 export default {
     // 工具箱
     ToolBox: {
-        AIQuestion:AIQuestionZh
+        AIQuestion:AIQuestionZh,
+        CommodityPriceChart:CommodityPriceChartZh
     },
 };

+ 22 - 15
src/views/dataEntry_manage/components/barOptionSection.vue

@@ -72,11 +72,11 @@
         alt=""
         style="width: 16px; height: 16px; margin-right: 10px"
       />
-      <span>添加日期</span>
+      <span>{{$t('ToolBox.CommodityPriceChart.add_date')}}</span>
     </div>
 
     <m-dialog
-      title="添加日期" 
+      :title="$t('ToolBox.CommodityPriceChart.add_date')" 
       :show.sync="dialogForm.show" 
       width="650px"
     >
@@ -86,8 +86,8 @@
           ref="formRef" 
           label-position="left"
           hide-required-asterisk
-          label-width="80px">
-          <el-form-item prop="Type" label="添加方式">
+          label-width="120px">
+          <el-form-item prop="Type" :label="$t('ToolBox.CommodityPriceChart.add_method')">
             <el-select 
               v-model="dialogForm.Type"
               placeholder="请选择添加方式"
@@ -96,20 +96,20 @@
               <el-option v-for="item in dateOptions" :key="item.key" :label="item.label" :value="item.key"/>
             </el-select>
           </el-form-item>
-          <el-form-item label="天数" prop="Value" v-if="dialogForm.Type === 2">
+          <el-form-item :label="$t('ToolBox.CommodityPriceChart.day_num')" prop="Value" v-if="dialogForm.Type === 2">
             <el-input 
               type="number" 
               v-model="dialogForm.Value"
-              placeholder="请输入数字"
+              :placeholder="$t('ToolBox.CommodityPriceChart.day_num_placeholder')"
               style="width:350px;"
             />
           </el-form-item>
-          <el-form-item prop="Type" label="选择日期" v-if="dialogForm.Type === 3">
+          <el-form-item prop="Type" :label="$t('ToolBox.CommodityPriceChart.select_date')" v-if="dialogForm.Type === 3">
             <el-date-picker
               v-model="dialogForm.Date"
               value-format="yyyy-MM-dd"
               type="date"
-              placeholder="选择日期"
+              :placeholder="$t('ToolBox.CommodityPriceChart.select_date')"
               style="width: 350px"
             />
           </el-form-item>
@@ -119,12 +119,12 @@
         <el-button
         @click="cancelDialog"
         style="width: 132px; height: 40px"
-        >取消</el-button>
+        >{{$t('Dialog.cancel_btn')}}</el-button>
         <el-button
           @click="saveDate"
           type="primary"
           style="width: 132px; height: 40px"
-          >保存</el-button>
+          >{{$t('Dialog.confirm_save_btn')}}</el-button>
       </div>
     </m-dialog>
   </div>
@@ -164,6 +164,13 @@ export default {
     isBaseBarShow() {
       const show_path = ['/addchart','/editchart']
       return show_path.includes(this.$route.path)
+    },
+    dateOptions(){
+      return [
+        { key: 1,label:this.$t('ToolBox.CommodityPriceChart.latest_date')/* '最新日期' */ },
+        { key: 2,label:this.$t('ToolBox.CommodityPriceChart.n_day_before')/* 'N天前' */ },
+        { key: 3,label:this.$t('ToolBox.CommodityPriceChart.fix_date')/* '固定日期' */ },
+      ]
     }
   },
   data() {
@@ -186,11 +193,11 @@ export default {
         2: 'N天前',
         3: '固定日期'
       },
-      dateOptions: [
-        { key: 1,label:'最新日期' },
-        { key: 2,label:'N天前' },
-        { key: 3,label:'固定日期' },
-      ],
+      // dateOptions: [
+      //   { key: 1,label:'最新日期' },
+      //   { key: 2,label:'N天前' },
+      //   { key: 3,label:'固定日期' },
+      // ],
 
       dialogForm: {
         show: false,

+ 11 - 11
src/views/futures_manage/chartEditor.vue

@@ -13,12 +13,12 @@
 					type="primary" 
 					@click="saveHandle"
 					:disabled="chartInfo.ChartType === 5 && tableData.length !== 2"
-				>保存</el-button>
-        <el-button type="primary" plain @click="$router.back()">取消</el-button>
+				>{{$t('Dialog.confirm_save_btn')}}</el-button>
+        <el-button type="primary" plain @click="$router.back()">{{$t('Dialog.cancel_btn')}}</el-button>
       </div>
 			<div class="left-min">
 				<div class="search-cont">
-					<label>选择现货价格指标</label>
+					<label>{{$t('ToolBox.CommodityPriceChart.select_spot_price')}}</label>
 					<el-select
 						v-model="search_txt"
 						v-loadMore="searchLoad"
@@ -26,7 +26,7 @@
 						:filterable="!search_txt"
 						remote
 						clearable
-						placeholder="选择现货价格指标"
+						:placeholder="$t('ToolBox.CommodityPriceChart.select_spot_price')"
 						style="width:90%;margin-top: 10px;display: block;"
 						:remote-method="searchHandle"
 						@click.native="inputFocusHandle"
@@ -45,7 +45,7 @@
 				
 				<!-- 盘面利润 -->
 				<div class="profit-set" v-if="chartInfo.Source===5">
-					<el-button type="text" @click="openProfitOption">盘面利润设置</el-button>
+					<el-button type="text" @click="openProfitOption">{{$t('ToolBox.CommodityPriceChart.plate_profit_set')}}</el-button>
 				</div>
 
 				<el-form
@@ -55,7 +55,7 @@
 					:model="chartInfo"
 					:rules="chartRules"
 				>
-					<el-form-item label="选择期货" prop="futures_id" v-if="chartInfo.Source===2">
+					<el-form-item :label="$t('ToolBox.CommodityPriceChart.select_future')" prop="futures_id" v-if="chartInfo.Source===2">
 						<el-cascader
 							v-model="chartInfo.futures_id"
 							:options="futuresOptions"
@@ -66,11 +66,11 @@
 								emitPath: false
 							}"
 							style="width: 90%"
-							placeholder="请选择期货"
+							:placeholder="$t('ToolBox.CommodityPriceChart.please_select_future')"
 							@change="changeFuturesHandle"
 						/>
 					</el-form-item>
-					<el-form-item label="图表名称" prop="ChartName">
+					<el-form-item :label="$t('ToolBox.CommodityPriceChart.chart_name')" prop="ChartName">
 						<el-input
 							v-model="chartInfo.ChartName"
 							style="width: 90%"
@@ -78,7 +78,7 @@
 							clearable
 						/>
 					</el-form-item>
-					<el-form-item label="图表分类" prop="classify">
+					<el-form-item :label="$t('ToolBox.CommodityPriceChart.chart_classify')" prop="classify">
 						<el-cascader
 							v-model="chartInfo.classify"
 							:options="classifyOptions"
@@ -89,7 +89,7 @@
 								emitPath: false
 							}"
 							style="width: 90%"
-							placeholder="请选择所属分类"
+							:placeholder="$t('ToolBox.CommodityPriceChart.please_select_classify')"
 						/>
 					</el-form-item>
 				</el-form>
@@ -152,7 +152,7 @@
 							</div>
 						</div>
 						<span class="chart-author"
-							>作者:{{ chartInfo.SysUserRealName || roleName }}</span
+							>{{$t('MsgPrompt.author')}}:{{ chartInfo.SysUserRealName || roleName }}</span
 						>
 					</div>
 				</div>

+ 16 - 16
src/views/futures_manage/commodityChartBase.vue

@@ -12,23 +12,23 @@
       <div class="main-left left" id="left" v-show="!isSlideLeft">
 				<div class="datasheet_top">
 						<el-button v-permission="permissionBtn.productPricePermission.goodsPrice_priceLine"
-							type="primary" @click="goAddChart('price')">添加价格曲线</el-button>
+							type="primary" @click="goAddChart('price')">{{$t('ToolBox.CommodityPriceChart.add_price_line_btn')}}</el-button>
 						<el-button v-permission="permissionBtn.productPricePermission.goodsPrice_incomeLine"
 							style="margin-left:0;"
-							type="primary" @click="goAddChart('profit')">添加利润曲线</el-button>
+							type="primary" @click="goAddChart('profit')">{{$t('ToolBox.CommodityPriceChart.add_price_profit_btn')}}</el-button>
 				</div>
 
 				<div class="search-cont">
 					<el-checkbox v-model="isShowMe"  
 						v-if="permissionBtn.isShowBtn('productPricePermission','goodsPrice_onlyMine')"
-						@change="() => { getTreeData();getPublicList() }">只看我的</el-checkbox>
+						@change="() => { getTreeData();getPublicList() }">{{$t('Chart.only_see_mine')}}</el-checkbox>
 					<el-select
 						v-model="search_txt"
 						v-loadMore="searchLoad"
 						:filterable="!search_txt"
 						remote
 						clearable
-						placeholder="请输入图表名称"
+						:placeholder="$t('Chart.search_chart_placeholder')"
 						style="width: 100%; margin-top: 20px"
 						:remote-method="searchHandle"
 						@click.native="inputFocusHandle"
@@ -123,7 +123,7 @@
 							alt=""
 							style="width: 16px; height: 16px; margin-right: 10px"
 						/>
-						<span>添加图表分类</span>
+						<span>{{$t('StatisticAnalysis.ChartRelevance.add_chart_classify')}}</span>
 					</div>
 				</div>
 				<span
@@ -180,7 +180,7 @@
                       />
                     </div>
                   </div>
-                  <span class="chart-author">作者:{{ chartInfo.SysUserRealName}}</span>
+                  <span class="chart-author">{{$t('MsgPrompt.author')}}:{{ chartInfo.SysUserRealName}}</span>
                 </div>
 
                 <!-- 异常显示 -->
@@ -447,7 +447,7 @@ export default {
 
 		/* 添加一级目录 */
 		addLevelOneHandle() {
-			this.dialog_title = '添加';
+			this.dialog_title = this.$t('Table.add_btn')||'添加';
 			this.classifyForm = {
 				classify_name: '',
 			}
@@ -457,7 +457,7 @@ export default {
     /* 编辑节点 */
     editNode(node, { ChartClassifyName,ChartClassifyId }) {
 
-      this.dialog_title = '编辑';
+      this.dialog_title = this.$t('Table.edit_btn')||'编辑';
       /* 编辑目录 */
       this.classifyForm = {
         classify_name: ChartClassifyName,
@@ -474,14 +474,14 @@ export default {
 			const { DeleteStatus } = Data;
 
 			DeleteStatus === 1 
-			? this.$confirm('该分类下关联表图表不可删除', '删除失败', {
-				confirmButtonText: '知道了',
+			? this.$confirm(this.$t('Chart.OptMsg.classify_del_fail'), this.$t('Chart.OptMsg.del_fail_tag'), {
+				confirmButtonText: this.$t('MsgPrompt.known'),
 				showCancelButton: false,
 				type: 'error',
 			}) : DeleteStatus === 0
-			?  this.$confirm('确定删除当前分类吗?', '提示', {
-				confirmButtonText: '确定',
-				cancelButtonText: '取消',
+			?  this.$confirm(this.$t('Chart.OptMsg.classify_del_confirm'), this.$t('Confirm.prompt'), {
+				// confirmButtonText: '确定',
+				// cancelButtonText: '取消',
 				type: 'warning',
 			}).then(() => {
 				this.delApi(ChartClassifyId,ChartInfoId)
@@ -716,9 +716,9 @@ export default {
 		/* 删除图表 */
 		delChartHandle() {
 			const { ChartClassifyId,ChartInfoId } = this.chartInfo;
-			this.$confirm('删除后该图表将不能再引用,确认删除吗?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
+			this.$confirm(this.$t('Chart.OptMsg.chart_del_confirm'), this.$t('Confirm.prompt'), {
+        // confirmButtonText: '确定',
+        // cancelButtonText: '取消',
         type: 'warning',
       })
         .then(() => {

+ 10 - 10
src/views/futures_manage/components/plateProfitDia.vue

@@ -3,7 +3,7 @@
 		:visible.sync="isShow"
 		:close-on-click-modal="false"
 		:modal-append-to-body="false"
-    title="盘面利润设置"
+    	:title="$t('ToolBox.CommodityPriceChart.plate_profit_set')"
 		@close="cancelHandle"
 		custom-class="profit-dialog"
 		center
@@ -27,7 +27,7 @@
             }"
             style="width: 90%"
             clearable
-            placeholder="请选择期货"
+            :placeholder="$t('ToolBox.CommodityPriceChart.select_future')"
           />
 					<i
 						class="el-icon-error del-tag"
@@ -41,18 +41,18 @@
 					class="el-icon-circle-plus-outline"
 					style="color: #5882ef; font-size: 16px"
 				/>
-				添加更多参数
+				{{$t('ToolBox.CommodityPriceChart.add_params_btn')}}
 			</span>
 			<div class="computed-min">
 				<div class="computed-top">
-					<span style="margin-right: 8px">计算公式</span>
-					<el-input placeholder="请输入公式" v-model="formula" clearable>
+					<span style="margin-right: 8px">{{$t('ToolBox.CommodityPriceChart.formula_label')}}</span>
+					<el-input :placeholder="$t('ToolBox.CommodityPriceChart.formula_label_placeholder')" v-model="formula" clearable>
 					</el-input>
 				</div>
-				<span class="example-txt">公式示例:A*0.5+B*C*1.2+120-MAX(A,B,C)</span>
-				<span class="example-txt">函数支持:MAX(),MIN(),ln(A),log(a,A)</span>
+				<span class="example-txt">{{$t('ToolBox.CommodityPriceChart.formula_exp')}}:A*0.5+B*C*1.2+120-MAX(A,B,C)</span>
+				<span class="example-txt">{{$t('ToolBox.CommodityPriceChart.fun_support')}}:MAX(),MIN(),ln(A),log(a,A)</span>
 				<div style="margin-top: 20px">
-					<span style="margin-right: 8px">盘面利润</span>
+					<span style="margin-right: 8px">{{$t('ToolBox.CommodityPriceChart.plate_profit_name')}}</span>
 					<span>{{profitName}}</span>
 				</div>
 			</div>
@@ -62,9 +62,9 @@
 				type="primary"
 				style="margin-right: 20px"
 				@click="saveHandle"
-				>保存</el-button
+				>{{$t('Dialog.confirm_save_btn')}}</el-button
 			>
-			<el-button type="primary" plain @click="cancelHandle">取消</el-button>
+			<el-button type="primary" plain @click="cancelHandle">{{$t('Dialog.cancel_btn')}}</el-button>
 		</div>
 	</el-dialog>
 </template>