|
@@ -2,8 +2,8 @@
|
|
|
<div class="add-predicedb-page">
|
|
|
<div class="aside-warp" v-show="isAsideShow">
|
|
|
<div class="btn-box">
|
|
|
- <el-button type="primary" @click="saveHandle">保存</el-button>
|
|
|
- <el-button type="primary" plain @click="$router.back()">取消</el-button>
|
|
|
+ <el-button type="primary" @click="saveHandle"><!-- 保存 -->{{$t('Dialog.confirm_save_btn')}}</el-button>
|
|
|
+ <el-button type="primary" plain @click="$router.back()"><!-- 取消 -->{{$t('Dialog.cancel_btn')}}</el-button>
|
|
|
</div>
|
|
|
<div class="con">
|
|
|
<el-form
|
|
@@ -14,21 +14,7 @@
|
|
|
>
|
|
|
<el-form-item prop="classify">
|
|
|
<div class="item">
|
|
|
- <span class="label">添加到分类</span>
|
|
|
- <!-- <el-select
|
|
|
- v-model="formData.classify"
|
|
|
- placeholder="请选择分类"
|
|
|
- style="width: 100%"
|
|
|
- clearable
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in classifyArr"
|
|
|
- :key="item.ClassifyId"
|
|
|
- :label="item.ClassifyName"
|
|
|
- :value="item.ClassifyId"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select> -->
|
|
|
+ <span class="label">{{$t('PredictEditPage.add_to_classify')}}<!-- 添加到分类 --></span>
|
|
|
<el-cascader
|
|
|
v-model="formData.classify"
|
|
|
:options="classifyArr"
|
|
@@ -39,13 +25,13 @@
|
|
|
checkStrictly: true
|
|
|
}"
|
|
|
style="width: 90%"
|
|
|
- placeholder="请选择所属分类"
|
|
|
+ :placeholder="$t('Edb.InputHolderAll.input_classify')"
|
|
|
/>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="oldEdb" v-if="!formData.edb_id">
|
|
|
<div class="item">
|
|
|
- <span class="label">选择指标</span>
|
|
|
+ <span class="label">{{$t('Edb.choose_edb')}}<!-- 选择指标 --></span>
|
|
|
<el-select
|
|
|
v-model="formData.oldEdb"
|
|
|
v-loadMore="searchLoad"
|
|
@@ -53,7 +39,7 @@
|
|
|
:filterable="!formData.oldEdb"
|
|
|
remote
|
|
|
clearable
|
|
|
- placeholder="指标ID/指标名称"
|
|
|
+ :placeholder="$t('Edb.InputHolderAll.input_name_orid')"
|
|
|
:remote-method="searchHandle"
|
|
|
@click.native="inputFocusHandle"
|
|
|
@change="selectEdbHandle"
|
|
@@ -74,46 +60,46 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="edbName">
|
|
|
<div class="item">
|
|
|
- <span class="label">预测指标名称</span>
|
|
|
+ <span class="label">{{$t('PredictEditPage.predict_edb_name')}}<!-- 预测指标名称 --></span>
|
|
|
<el-input
|
|
|
v-model="formData.edbName"
|
|
|
style="width: 100%"
|
|
|
- placeholder="指标名称"
|
|
|
+ :placeholder="$t('Edb.InputHolderAll.input_name')"
|
|
|
/>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="dateType">
|
|
|
<div class="item">
|
|
|
- <span class="label">预测日期类型</span>
|
|
|
+ <span class="label">{{$t('PredictEditPage.predict_date_type')}}<!-- 预测日期类型 --></span>
|
|
|
<el-select
|
|
|
v-model="formData.dateType"
|
|
|
- placeholder="请选择日期类型"
|
|
|
+ :placeholder="$t('PredictEditPage.ph_date_type')"
|
|
|
style="width: 100%"
|
|
|
@change="getChartInfo"
|
|
|
>
|
|
|
- <el-option label="交易日" value="交易日"></el-option>
|
|
|
- <el-option label="自然日" value="自然日"></el-option>
|
|
|
+ <el-option :label="$t('PredictEditPage.date_type_trade')" value="交易日"></el-option>
|
|
|
+ <el-option :label="$t('PredictEditPage.date_type_normal')" value="自然日"></el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="formData.oldEdbName">
|
|
|
<div class="item" style="margin-top: 30px">
|
|
|
- <span class="label">原指标名称:{{ formData.oldEdbName }}</span>
|
|
|
+ <span class="label">{{$t('PredictEdbPage.old_edb_name')}}<!-- 原指标名称 -->:{{ formData.oldEdbName }}</span>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="frequency">
|
|
|
<div class="item">
|
|
|
- <span class="label">频度:{{ formData.frequency }}</span>
|
|
|
+ <span class="label">{{$t('Edb.Detail.e_fre')}}<!-- 频度 -->:{{ formData.frequency }}</span>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="newdata">
|
|
|
<div class="item">
|
|
|
- <span class="label">最新值:{{ formData.newdata }}</span>
|
|
|
+ <span class="label">{{$t('Edb.Detail.e_latest_value')}}<!-- 最新值 -->:{{ formData.newdata }}</span>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="lasetDate">
|
|
|
<div class="item" style="margin-bottom: 30px">
|
|
|
- <span class="label">最新日期:{{ formData.lasetDate }}</span>
|
|
|
+ <span class="label">{{$t('Edb.Detail.e_latest_date')}}<!-- 最新日期 -->:{{ formData.lasetDate }}</span>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -126,7 +112,7 @@
|
|
|
:name="index"
|
|
|
>
|
|
|
<template slot="title">
|
|
|
- <span class="text_oneLine">规则{{ index + 1 }}</span>
|
|
|
+ <span class="text_oneLine"><!-- 规则 -->{{$t('PredictEditPage.label_rule')}}{{ index + 1 }}</span>
|
|
|
<i
|
|
|
class="el-icon-delete del-icon"
|
|
|
@click.stop="removeRuleHandle(item, index)"
|
|
@@ -134,13 +120,13 @@
|
|
|
</template>
|
|
|
<div class="wrap">
|
|
|
<div class="item">
|
|
|
- <span class="label">预测截止日期</span>
|
|
|
+ <span class="label">{{$t('PredictEdbPage.predict_end_date')}}<!-- 预测截止日期 --></span>
|
|
|
<el-date-picker
|
|
|
v-model="item.endDate"
|
|
|
type="date"
|
|
|
style="width: 100%"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- placeholder="请选择日期"
|
|
|
+ :placeholder="$t('Edb.InputHolderAll.input_date')"
|
|
|
:picker-options="timePickerOptions"
|
|
|
@change="changeDateHandle($event,index)"
|
|
|
>
|
|
@@ -149,19 +135,18 @@
|
|
|
</div>
|
|
|
<div class="item">
|
|
|
<span class="label">
|
|
|
- 预测规则
|
|
|
+ <!-- 预测规则 -->{{$t('PredictEdbPage.predict_rule')}}
|
|
|
<el-tooltip effect="dark" placement="right">
|
|
|
<div
|
|
|
slot="content"
|
|
|
v-html="rulesTip"
|
|
|
- style="line-height: 20px;max-width:600px"
|
|
|
+ style="line-height: 20px;max-width:600px;max-height:550px;overflow-y:auto"
|
|
|
></div>
|
|
|
<i class="el-icon-question" style="color: #666" />
|
|
|
</el-tooltip>
|
|
|
</span>
|
|
|
<el-select
|
|
|
v-model="item.predict_type"
|
|
|
- placeholder="请选择分类"
|
|
|
style="width: 100%"
|
|
|
@change="changePredictType($event,item,index)"
|
|
|
>
|
|
@@ -180,7 +165,7 @@
|
|
|
<el-input
|
|
|
v-model="item.fixedValue"
|
|
|
style="width: 100%"
|
|
|
- placeholder="请输入值"
|
|
|
+ :placeholder="$t('Edb.InputHolderAll.input_number')"
|
|
|
type="number"
|
|
|
/>
|
|
|
</div>
|
|
@@ -188,23 +173,23 @@
|
|
|
<!-- 季节性规则 -->
|
|
|
<div v-if="[11,15].includes(item.predict_type)">
|
|
|
<div class="item">
|
|
|
- <span class="label">选择方式</span>
|
|
|
+ <span class="label"><!-- 选择方式 -->{{$t('PredictEditPage.season_select')}}</span>
|
|
|
<el-select
|
|
|
v-model="item.season_way"
|
|
|
placeholder="请选择方式"
|
|
|
style="width: 100%"
|
|
|
@change="item.n_value = '';item.season_years=[]"
|
|
|
>
|
|
|
- <el-option label="连续N年" :value="1"/>
|
|
|
- <el-option label="指定N年" :value="2"/>
|
|
|
+ <el-option :label="$t('PredictEditPage.season_select_cont')" :value="1"/>
|
|
|
+ <el-option :label="$t('PredictEditPage.season_select_formula')" :value="2"/>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div class="item" v-if="item.season_way===1">
|
|
|
- <span class="label">期数</span>
|
|
|
+ <span class="label"><!-- 期数 -->{{$t('PredictEditPage.label_periods')}}</span>
|
|
|
<el-input
|
|
|
v-model="item.n_value"
|
|
|
style="width: 100%"
|
|
|
- placeholder="请输入值"
|
|
|
+ :placeholder="$t('Edb.InputHolderAll.input_number')"
|
|
|
type="number"
|
|
|
/>
|
|
|
</div>
|
|
@@ -230,8 +215,8 @@
|
|
|
</div>
|
|
|
<div class="item" v-if="item.predict_type===11">
|
|
|
<el-radio-group v-model="item.season_type">
|
|
|
- <el-radio label="公历">公历</el-radio>
|
|
|
- <el-radio label="农历">农历</el-radio>
|
|
|
+ <el-radio label="公历"><!-- 公历 -->{{$t('PredictEditPage.option_season_calendar1')}}</el-radio>
|
|
|
+ <el-radio label="农历"><!-- 农历 -->{{$t('PredictEditPage.option_season_calendar2')}}</el-radio>
|
|
|
</el-radio-group>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -239,21 +224,21 @@
|
|
|
<!-- 移动平均同比 -->
|
|
|
<div v-else-if="item.predict_type===12">
|
|
|
<div class="item">
|
|
|
- <span class="label">期数</span>
|
|
|
+ <span class="label"><!-- 期数 -->{{$t('PredictEditPage.label_periods')}}</span>
|
|
|
<el-input
|
|
|
v-model="item.n_value"
|
|
|
style="width: 100%"
|
|
|
- placeholder="请输入值"
|
|
|
+ :placeholder="$t('Edb.InputHolderAll.input_number')"
|
|
|
type="number"
|
|
|
/>
|
|
|
</div>
|
|
|
<div class="item">
|
|
|
- <span class="label">同比年份</span>
|
|
|
+ <span class="label"><!-- 同比年份 -->{{$t('PredictEditPage.label_yoy_year')}}</span>
|
|
|
<el-date-picker
|
|
|
v-model="item.move_average_year"
|
|
|
type="year"
|
|
|
value-format="yyyy"
|
|
|
- placeholder="选择年份"
|
|
|
+ :placeholder="$t('PredictEditPage.ph_yoy_year')"
|
|
|
@change="pushYear($event,item)"
|
|
|
/>
|
|
|
</div>
|
|
@@ -264,10 +249,10 @@
|
|
|
<div v-else-if="item.predict_type===14">
|
|
|
<div class="item">
|
|
|
<span class="label">
|
|
|
- 自变量
|
|
|
+ <!-- 自变量 -->{{$t('PredictEditPage.label_slef_var')}}
|
|
|
<el-radio-group v-model="edbFromType">
|
|
|
- <el-radio :label="0" style="margin-right: 15px">ETA指标</el-radio>
|
|
|
- <el-radio :label="1">ETA预测指标</el-radio>
|
|
|
+ <el-radio :label="0" style="margin-right: 15px"><!-- ETA指标 -->{{$t('Edb.eta_name')}}</el-radio>
|
|
|
+ <el-radio :label="1"><!-- ETA预测指标 -->{{$t('Edb.eta_predictor_name')}}</el-radio>
|
|
|
</el-radio-group>
|
|
|
</span>
|
|
|
<el-select
|
|
@@ -277,7 +262,7 @@
|
|
|
:filterable="!item.self_target"
|
|
|
remote
|
|
|
clearable
|
|
|
- placeholder="指标ID/指标名称"
|
|
|
+ :placeholder="$t('Edb.InputHolderAll.input_name_orid')"
|
|
|
style="width:88%;margin-top: 10px;display:inline-block"
|
|
|
:remote-method="searchHandle"
|
|
|
@click.native="inputFocusHandle($event,'self_target')"
|
|
@@ -295,36 +280,36 @@
|
|
|
</div>
|
|
|
<div class="item">
|
|
|
<span class="label">
|
|
|
- 领先天数
|
|
|
+ <!-- 领先天数 -->{{$t('PredictEditPage.label_lead_day')}}
|
|
|
<el-input
|
|
|
v-model="item.fixedValue"
|
|
|
style="width: 80px;margin:0 5px;"
|
|
|
type="number"
|
|
|
:step="1"
|
|
|
@keyup.native="filterCode(item)"
|
|
|
- />天
|
|
|
+ />{{$t('PredictEditPage.lead_day_unit')}}
|
|
|
</span>
|
|
|
</div>
|
|
|
<div class="item">
|
|
|
- <span class="label">拟合时间段</span>
|
|
|
+ <span class="label"><!-- 拟合时间段 -->{{$t('PredictEditPage.lead_day_unit')}}</span>
|
|
|
<el-date-picker
|
|
|
v-model="item.fit_date[0]"
|
|
|
range-separator="至"
|
|
|
- placeholder="开始日期"
|
|
|
+ :placeholder="$t('PredictEditPage.ph_start_time')"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
style="width: 90%;margin-bottom: 10px;"
|
|
|
@change="changeFitDate(item)"
|
|
|
/>
|
|
|
- 至
|
|
|
+ <!-- 至 -->{{$t('Common.to')}}
|
|
|
<el-date-picker
|
|
|
v-model="item.fit_date[1]"
|
|
|
- placeholder="结束日期"
|
|
|
+ :placeholder="$t('PredictEditPage.ph_end_time')"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
style="width: 90%"
|
|
|
@change="changeFitDate(item)"
|
|
|
:picker-options="{
|
|
|
shortcuts: [{
|
|
|
- text: '至今',
|
|
|
+ text: $t('PredictEditPage.tonow'),
|
|
|
onClick(picker) {
|
|
|
const date = new Date();
|
|
|
picker.$et('pick',date);
|
|
@@ -338,30 +323,30 @@
|
|
|
<!-- 年度值倒退 -->
|
|
|
<div v-else-if="item.predict_type===16">
|
|
|
<div class="item">
|
|
|
- <span class="label">余额分配方式</span>
|
|
|
+ <span class="label"><!-- 余额分配方式 -->{{$t('PredictEditPage.label_distru_way')}}</span>
|
|
|
<el-select
|
|
|
v-model="item.distribute_type"
|
|
|
placeholder="请选择方式"
|
|
|
style="width: 100%"
|
|
|
@change="item.on_year=''"
|
|
|
>
|
|
|
- <el-option label="均值法" :value="1"/>
|
|
|
- <el-option label="同比法" :value="2"/>
|
|
|
+ <el-option :label="$t('PredictEditPage.option_distru_way1')" :value="1"/>
|
|
|
+ <el-option :label="$t('PredictEditPage.option_distru_way2')" :value="2"/>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div class="item" v-if="item.distribute_type===2">
|
|
|
- <span class="label">同比年份</span>
|
|
|
+ <span class="label"><!-- 同比年份 -->{{$t('PredictEditPage.label_yoy_year')}}</span>
|
|
|
<el-date-picker
|
|
|
v-model="item.on_year"
|
|
|
type="year"
|
|
|
value-format="yyyy"
|
|
|
- placeholder="选择年份"
|
|
|
+ :placeholder="$t('PredictEditPage.ph_yoy_year')"
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
- <el-button type="text" v-if="item.predict_type===9" @click="setRingAddHandle(item,index)">设置环比增加值</el-button>
|
|
|
+ <el-button type="text" v-if="item.predict_type===9" @click="setRingAddHandle(item,index)"><!-- 设置环比增加值 -->{{$t('PredictEditPage.set_mom_btn')}}</el-button>
|
|
|
</div>
|
|
|
</el-collapse-item>
|
|
|
</el-collapse>
|
|
@@ -371,7 +356,7 @@
|
|
|
alt=""
|
|
|
style="width: 16px; height: 16px; margin-right: 10px"
|
|
|
/>
|
|
|
- <span>添加更多</span>
|
|
|
+ <span><!-- 添加更多 -->{{$t('PredictEditPage.add_more_btn')}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -389,7 +374,7 @@
|
|
|
|
|
|
</div>
|
|
|
<div class="empty-box" v-show="!edbData.DataList">
|
|
|
- <tableNoData text="暂无信息"/>
|
|
|
+ <tableNoData :text="$t('Common.no_info_msg')"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<span
|
|
@@ -477,63 +462,47 @@ export default {
|
|
|
},
|
|
|
formRules: {
|
|
|
classify: [
|
|
|
- { required: true, message: "分类不能为空", trigger: "blur" },
|
|
|
+ { required: true, message: /* "分类不能为空" */this.$t('Edb.Valids.classify_msg'), trigger: "blur" },
|
|
|
],
|
|
|
- oldEdb: [{ required: true, message: "指标不能为空", trigger: "blur" }],
|
|
|
+ oldEdb: [{ required: true, message: /* "指标不能为空" */this.$t('Edb.Valids.no_edb'), trigger: "blur" }],
|
|
|
edbName: [
|
|
|
- { required: true, message: "指标名称不能为空", trigger: "blur" },
|
|
|
+ { required: true, message: /* "指标名称不能为空" */this.$t('Edb.Valids.name_msg'), trigger: "blur" },
|
|
|
],
|
|
|
},
|
|
|
classifyArr: [],
|
|
|
predictTypeSetting: [
|
|
|
- { key: 1, label: "最新" },
|
|
|
- { key: 2, label: "固定值" },
|
|
|
- { key: 3, label: "同比" },
|
|
|
- { key: 4, label: "同差" },
|
|
|
- { key: 5, label: "环比" },
|
|
|
- { key: 6, label: "环差" },
|
|
|
- { key: 7, label: "N期移动均值" },
|
|
|
- { key: 8, label: "N期段线性外推值" },
|
|
|
- { key: 9, label: '动态环差' },
|
|
|
- { key: 10, label: "给定终值后插值" },
|
|
|
- { key: 11, label: "季节性" },
|
|
|
- { key: 12, label: "移动平均同比" },
|
|
|
- { key: 13, label: "同比增速插值" },
|
|
|
- { key: 14, label: "一元线性拟合" },
|
|
|
- { key: 15, label: "N年均值" },
|
|
|
- { key: 16, label: "年度值倒推" },
|
|
|
+ { key: 1, label: /* "最新" */this.$t('PredictEditPage.rule_newset') },
|
|
|
+ { key: 2, label: /* "固定值" */this.$t('PredictEditPage.rule_fix') },
|
|
|
+ { key: 3, label: /* "同比" */this.$t('PredictEditPage.rule_onyear') },
|
|
|
+ { key: 4, label: /* "同差" */this.$t('PredictEditPage.rule_differ') },
|
|
|
+ { key: 5, label: /* "环比" */this.$t('PredictEditPage.rule_mom') },
|
|
|
+ { key: 6, label: /* "环差" */this.$t('PredictEditPage.rule_mom_differ') },
|
|
|
+ { key: 7, label: /* "N期移动均值" */this.$t('PredictEditPage.rule_move_average') },
|
|
|
+ { key: 8, label: /* "N期段线性外推值" */this.$t('PredictEditPage.rule_linear') },
|
|
|
+ { key: 9, label: /* '动态环差' */this.$t('PredictEditPage.rule_dynamic_differ') },
|
|
|
+ { key: 10, label: /* "给定终值后插值" */this.$t('PredictEditPage.rule_inter_end') },
|
|
|
+ { key: 11, label: /* "季节性" */this.$t('PredictEditPage.rule_season') },
|
|
|
+ { key: 12, label: /* "移动平均同比" */this.$t('PredictEditPage.rule_yoy_move') },
|
|
|
+ { key: 13, label: /* "同比增速插值" */this.$t('PredictEditPage.rule_yoy_growth') },
|
|
|
+ { key: 14, label: /* "一元线性拟合" */this.$t('PredictEditPage.rule_linear_reg') },
|
|
|
+ { key: 15, label: /* "N年均值" */this.$t('PredictEditPage.rule_n_year') },
|
|
|
+ { key: 16, label: /* "年度值倒推" */this.$t('PredictEditPage.rule_value_back') },
|
|
|
], //预测规则
|
|
|
predictTypeOptions:[],
|
|
|
- rulesTip: `预测规则说明:<br>
|
|
|
- 1、最新:预测值全部等于最新值;<br>
|
|
|
- 2、固定值:预测值默认全部等于常数值;<br>
|
|
|
- 3、同比:去年同期值乘同比增速得到预测值;<br>
|
|
|
- 4、同差:去年同期值加同比增加得到预测值;<br>
|
|
|
- 5、环比:上期值乘环比增速得到预测值;<br>
|
|
|
- 6、环差:上期值加同比增加得到预测值;<br>
|
|
|
- 7、N期移动均值:过去N期值的平均值;<br>
|
|
|
- 8、N期段线性外推值:过去N期值生成线性回归方程:Y=aX+b,将未来的期数代入得到预测值;<br>
|
|
|
- 9、动态环差:选择几个指标进行指标计算得到结果值作为动态环差值,预测值=上期值+动态环差值;<br>
|
|
|
- 10、给定终值后插值:计算最新数据和预测终值的期数差T和数据差S,环差值=S/T,预测数值=前一期数值+环差值(本期-上期);<br>
|
|
|
- 11、季节性:计算过去N年同期的环差(本期-上期)均值,预测值=上期值+环差均值;<br>
|
|
|
- 12、移动平均同比:计算过去N期平均值的同比值(本期/上期),选择同比年份,预测值=同比年份同期值*同比值;<br>
|
|
|
- 13、同比增速插值:计算最新数据的同比增速:(本期数值-去年同期数值)/去年同期数值*100%,输入同比增速终值,通过期数差值,计算每一期同比增速,预测值=去年同期值*(1+该期同比增速)。<br>
|
|
|
- 14、一元线性拟合:由指标A(自变量)和指标B(基础指标)在拟合时间段生成线性回归方程:Y=aX+b,将指标A代入该方程得到拟合指标B',拼接指标B的实际值和B'的预测值,生成预测指标;,<br>
|
|
|
- 15、N年均值:过去N年同期均值。过去N年可以连续或者不连续,指标数据均用线性插值补全为日度数据后计算;<br>
|
|
|
- 16、年度值倒推:设定年度值,余额=年度值-年初至今累计值(算法参考累计值),进行余额分配,均值法分配时保证每期数值相等(日度/周度:剩余期数=剩余自然日历天数/今年指标最新日期自然日历天数*今年至今指标数据期数;旬度/月度/季度/半年度:剩余期数=全年期数(36/12/4/2)-今年至今自然日历期数),同比法保证每期同比相等(同比增速=余额/同比年份相应日期的余额,预测值等于同比年份同期值*同比增速)`,
|
|
|
+ rulesTip: this.$t('PredictEditPage.rule_tip'),
|
|
|
labelMap: {
|
|
|
- 2: '固定值',
|
|
|
- 3: '同比增速',
|
|
|
- 4: '同比增加值',
|
|
|
- 5: '环比增速',
|
|
|
- 6: '环比增加值',
|
|
|
- 7: '期数',
|
|
|
- 8: '期数',
|
|
|
- 10: '预测终值',
|
|
|
- 11: '期数',
|
|
|
- 12: '期数',
|
|
|
- 13: '同比增速终值',
|
|
|
- 16: '年度值'
|
|
|
+ 2: /* '固定值' */this.$t('PredictEditPage.rule_fix'),
|
|
|
+ 3: /* '同比增速' */this.$t('PredictEditPage.label_value_yoy_growth'),
|
|
|
+ 4: /* '同比增加值' */this.$t('PredictEditPage.label_value_yoy_add'),
|
|
|
+ 5: /* '环比增速' */this.$t('PredictEditPage.label_value_mom_growth'),
|
|
|
+ 6: /* '环比增加值' */this.$t('PredictEditPage.label_value_mom_add'),
|
|
|
+ 7: /* '期数' */this.$t('PredictEditPage.label_periods'),
|
|
|
+ 8: /* '期数' */this.$t('PredictEditPage.label_periods'),
|
|
|
+ 10: /* '预测终值' */this.$t('PredictEditPage.label_periods'),
|
|
|
+ 11: /* '期数' */this.$t('PredictEditPage.label_periods'),
|
|
|
+ 12: /* '期数' */this.$t('PredictEditPage.label_periods'),
|
|
|
+ 13: /* '同比增速终值' */this.$t('PredictEditPage.label_value_yoy_end'),
|
|
|
+ 16: /* '年度值' */this.$t('PredictEditPage.label_value_year')
|
|
|
},
|
|
|
rulesArr: [{
|
|
|
endDate: "",
|
|
@@ -888,7 +857,7 @@ export default {
|
|
|
|| (item.predict_type===14 && item.endDate && item.fit_date[0] && item.fit_date[1] && item.self_target)
|
|
|
|| ![1,11,12,14,15].includes(item.predict_type) && item.endDate && item.fixedValue
|
|
|
})
|
|
|
- if(!isRulesComplete) return this.$message.warning('请填写完整的规则')
|
|
|
+ if(!isRulesComplete) return this.$message.warning(/* '请填写完整的规则' */this.$t('PredictEditPage.vaild_full_rule'))
|
|
|
|
|
|
const { edb_id,classify,oldEdb,edbName,dateType } = this.formData;
|
|
|
|
|
@@ -959,7 +928,8 @@ export default {
|
|
|
|
|
|
if (Ret !== 200) return;
|
|
|
|
|
|
- this.$message.success("保存成功");
|
|
|
+ // this.$message.success("保存成功");
|
|
|
+ this.$message.success(this.$t('MsgPrompt.saved_msg'));
|
|
|
//编辑的话更新图
|
|
|
edb_id && this.$nextTick(() => {
|
|
|
this.setChartImage();
|
|
@@ -1062,9 +1032,10 @@ export default {
|
|
|
|
|
|
/* 删除规则 */
|
|
|
removeRuleHandle(item, index) {
|
|
|
- if(this.rulesArr.length===1) return this.$message.warning('请至少保留一条预测规则');
|
|
|
+ if(this.rulesArr.length===1) return this.$message.warning(/* '请至少保留一条预测规则' */this.$t('PredictEditPage.vaild_last_rule'));
|
|
|
this.rulesArr.splice(index, 1);
|
|
|
- this.$message.success("删除成功");
|
|
|
+ // this.$message.success("删除成功");
|
|
|
+ this.$message.success(this.$t('MsgPrompt.delete_msg'));
|
|
|
},
|
|
|
|
|
|
/* 选择日期时提示不能小于上个日期 */
|