|
@@ -3,7 +3,7 @@
|
|
|
:visible.sync="isShow"
|
|
|
:close-on-click-modal="false"
|
|
|
:modal-append-to-body="false"
|
|
|
- title="保存"
|
|
|
+ :title="$t('StatisticAnalysis.FittingEquationChart.detail_dialog_title')"
|
|
|
@close="cancelHandle"
|
|
|
custom-class="savechart-dialog"
|
|
|
center
|
|
@@ -26,7 +26,7 @@
|
|
|
emitPath: false
|
|
|
}"
|
|
|
style="width: 100%"
|
|
|
- placeholder="请选择所属分类"
|
|
|
+ :placeholder="$t('StatisticAnalysis.FittingEquationChart.detail_dialog_placeholder01')"
|
|
|
clearable
|
|
|
@change="setClassifyAll"
|
|
|
/>
|
|
@@ -38,11 +38,11 @@
|
|
|
:model="form"
|
|
|
:rules="formRules"
|
|
|
>
|
|
|
- <el-form-item label="弹性系数(a)" prop="aName" v-if="checkCharts.includes(5)">
|
|
|
+ <el-form-item :label="this.$t('StatisticAnalysis.FittingEquationChart.detail_dialog_chart_type01')" prop="aName" v-if="checkCharts.includes(5)">
|
|
|
<el-input
|
|
|
v-model="form.aName"
|
|
|
style="width: 40%"
|
|
|
- placeholder="请填写图表名称"
|
|
|
+ :placeholder="$t('StatisticAnalysis.FittingEquationChart.detail_dialog_placeholder02')"
|
|
|
clearable
|
|
|
/>
|
|
|
<el-cascader
|
|
@@ -55,15 +55,15 @@
|
|
|
emitPath: false
|
|
|
}"
|
|
|
style="width: 40%"
|
|
|
- placeholder="请选择所属分类"
|
|
|
+ :placeholder="$t('StatisticAnalysis.FittingEquationChart.detail_dialog_placeholder01')"
|
|
|
clearable
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="截距(b)" prop="bName" v-if="checkCharts.includes(6)">
|
|
|
+ <el-form-item :label="this.$t('StatisticAnalysis.FittingEquationChart.detail_dialog_chart_type02')" prop="bName" v-if="checkCharts.includes(6)">
|
|
|
<el-input
|
|
|
v-model="form.bName"
|
|
|
style="width: 40%"
|
|
|
- placeholder="请填写图表名称"
|
|
|
+ :placeholder="$t('StatisticAnalysis.FittingEquationChart.detail_dialog_placeholder02')"
|
|
|
clearable
|
|
|
/>
|
|
|
<el-cascader
|
|
@@ -76,15 +76,15 @@
|
|
|
emitPath: false
|
|
|
}"
|
|
|
style="width: 40%"
|
|
|
- placeholder="请选择所属分类"
|
|
|
+ :placeholder="$t('StatisticAnalysis.FittingEquationChart.detail_dialog_placeholder01')"
|
|
|
clearable
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="相关系数(r²)" prop="relevanceName" v-if="checkCharts.includes(7)">
|
|
|
+ <el-form-item :label="this.$t('StatisticAnalysis.FittingEquationChart.detail_dialog_chart_type03')" prop="relevanceName" v-if="checkCharts.includes(7)">
|
|
|
<el-input
|
|
|
v-model="form.relevanceName"
|
|
|
style="width: 40%"
|
|
|
- placeholder="请填写图表名称"
|
|
|
+ :placeholder="$t('StatisticAnalysis.FittingEquationChart.detail_dialog_placeholder02')"
|
|
|
clearable
|
|
|
/>
|
|
|
<el-cascader
|
|
@@ -97,7 +97,7 @@
|
|
|
emitPath: false
|
|
|
}"
|
|
|
style="width: 40%"
|
|
|
- placeholder="请选择所属分类"
|
|
|
+ :placeholder="$t('StatisticAnalysis.FittingEquationChart.detail_dialog_placeholder01')"
|
|
|
clearable
|
|
|
/>
|
|
|
</el-form-item>
|
|
@@ -105,9 +105,9 @@
|
|
|
</div>
|
|
|
<div class="dia-bot">
|
|
|
<el-button type="primary" style="margin-right: 20px" @click="saveHandle"
|
|
|
- >保存</el-button
|
|
|
+ >{{ $t('StatisticAnalysis.FittingEquationChart.detail_dialog_title') }}</el-button
|
|
|
>
|
|
|
- <el-button type="primary" plain @click="cancelHandle">取消</el-button>
|
|
|
+ <el-button type="primary" plain @click="cancelHandle">{{ $t('StatisticAnalysis.FittingEquationChart.detail_dialog_cancel') }}</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</template>
|
|
@@ -143,16 +143,41 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
+ computed:{
|
|
|
+ chartsType(){
|
|
|
+ return [
|
|
|
+ { name: /* '弹性系数a' */this.$t('StatisticAnalysis.FittingEquationChart.detail_dialog_chart_type01'),key: 5 },
|
|
|
+ { name: /* '截距b' */this.$t('StatisticAnalysis.FittingEquationChart.detail_dialog_chart_type02'),key: 6 },
|
|
|
+ { name: /* '相关系数r²' */this.$t('StatisticAnalysis.FittingEquationChart.detail_dialog_chart_type03'),key: 7 },
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ formRules(){
|
|
|
+ return {
|
|
|
+ aName:[
|
|
|
+ { required: true, message: /* '图表名称不能为空' */this.$t('StatisticAnalysis.FittingEquationChart.detail_dialog_form_rules01'), trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ bName:[
|
|
|
+ { required: true, message: /* '图表名称不能为空' */this.$t('StatisticAnalysis.FittingEquationChart.detail_dialog_form_rules01'), trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ relevanceName:[
|
|
|
+ { required: true, message: /* '图表名称不能为空' */this.$t('StatisticAnalysis.FittingEquationChart.detail_dialog_form_rules01'), trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ classify:[
|
|
|
+ { required: true, message: /* '图表分类不能为空' */this.$t('StatisticAnalysis.FittingEquationChart.detail_dialog_form_rules02'), trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
data () {
|
|
|
return {
|
|
|
classifyOptions:[],//分类列表
|
|
|
|
|
|
checkCharts: [5,6,7],
|
|
|
- chartsType: [
|
|
|
+ /* chartsType: [
|
|
|
{ name: '弹性系数a',key: 5 },
|
|
|
{ name: '截距b',key: 6 },
|
|
|
{ name: '相关系数r²',key: 7 },
|
|
|
- ],
|
|
|
+ ], */
|
|
|
|
|
|
form: {
|
|
|
aName: '',
|
|
@@ -163,7 +188,7 @@ export default {
|
|
|
bClassify: '',
|
|
|
relevanceClassify: ''
|
|
|
},
|
|
|
- formRules: {
|
|
|
+/* formRules: {
|
|
|
aName:[
|
|
|
{ required: true, message: '图表名称不能为空', trigger: 'blur' },
|
|
|
],
|
|
@@ -176,7 +201,7 @@ export default {
|
|
|
classify:[
|
|
|
{ required: true, message: '图表分类不能为空', trigger: 'blur' },
|
|
|
],
|
|
|
- },
|
|
|
+ }, */
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -199,7 +224,7 @@ export default {
|
|
|
|
|
|
/* 加入图库 */
|
|
|
async saveHandle() {
|
|
|
- if(!this.checkCharts.length) return this.$message.warning('请至少选择一个图表')
|
|
|
+ if(!this.checkCharts.length) return this.$message.warning(/* '请至少选择一个图表' */this.$t('StatisticAnalysis.FittingEquationChart.detail_dialog_save_check'))
|
|
|
await this.$refs.diaForm.validate();
|
|
|
|
|
|
const { MultipleGraphConfigId,DateType,date,xEdbs,yEdbs } = this.$parent.leftOption;
|
|
@@ -247,7 +272,7 @@ export default {
|
|
|
let res = await fittingEquationInterface.chartEdit(params)
|
|
|
if(res.Ret !== 200) return
|
|
|
|
|
|
- this.$message.success('保存成功')
|
|
|
+ this.$message.success(/* '保存成功' */this.$t('StatisticAnalysis.FittingEquationChart.detail_dialog_save_success'))
|
|
|
|
|
|
this.cancelHandle();
|
|
|
this.$emit('saveBack',{code: res.Data.UniqueCode,id: res.Data.ChartInfoId})
|