|
@@ -15,7 +15,7 @@
|
|
|
:src="$icons.computed"
|
|
|
style="color: #fff; width: 16px; height: 16px; margin-right: 5px"
|
|
|
/>
|
|
|
- <span style="font-size: 16px">{{ (operationForm.edb_id ? (operationForm.view ? '查看' : '编辑') : '') + switchType.get(type) }}</span>
|
|
|
+ <span style="font-size: 16px">{{ (operationForm.edb_id ? (operationForm.view ? '查看' : '编辑') : '') + titleMap.get(type) }}</span>
|
|
|
</div>
|
|
|
<div class="dialog-main">
|
|
|
|
|
@@ -163,7 +163,7 @@
|
|
|
<selectUnit
|
|
|
v-model="formData.unit"
|
|
|
style="width: 340px"
|
|
|
- :disabled="!operationForm.edb_id&&[6,7].includes(type)"
|
|
|
+ :disabled="!operationForm.edb_id&&[6,7,75].includes(type)"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="指标目录" prop="menu">
|
|
@@ -181,7 +181,7 @@
|
|
|
placeholder="请选择频度"
|
|
|
style="width: 340px"
|
|
|
clearable
|
|
|
- :disabled="[5,14,61,63].includes(type)||(!operationForm.edb_id&&[6,7].includes(type))"
|
|
|
+ :disabled="[5,14,61,63,75].includes(type)||(!operationForm.edb_id&&[6,7].includes(type))"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in frequencyArr"
|
|
@@ -237,7 +237,7 @@
|
|
|
style="margin-right: 20px"
|
|
|
@click="saveHandle"
|
|
|
:loading="loading"
|
|
|
- >{{loading ? '计算中...' : operationForm.edb_id ? '保存' : save_txts.get(type)}}</el-button
|
|
|
+ >{{loading ? '计算中...' : operationForm.edb_id ? '保存' : saveBtnMap.get(type)}}</el-button
|
|
|
>
|
|
|
<el-button type="primary" plain @click="cancelHandle('cancel')">取消</el-button>
|
|
|
</div>
|
|
@@ -255,6 +255,7 @@
|
|
|
import { dataBaseInterface } from '@/api/api.js';
|
|
|
import { formRules } from './util';
|
|
|
import { unitArr } from '@/utils/defaultOptions';
|
|
|
+import { isArray } from 'highcharts';
|
|
|
export default {
|
|
|
name:'',
|
|
|
props: {
|
|
@@ -359,7 +360,7 @@ export default {
|
|
|
key: 'SourceName',
|
|
|
},
|
|
|
],
|
|
|
- switchType: new Map([
|
|
|
+ titleMap: new Map([
|
|
|
[5,'累计值转月/季值'],
|
|
|
[6,'同比值'],
|
|
|
[7,'同差值'],
|
|
@@ -375,8 +376,9 @@ export default {
|
|
|
[61,'累计值转月/季值'],
|
|
|
[62,'累计值'],
|
|
|
[63,'累计值'],
|
|
|
+ [75,'日均值']
|
|
|
]),//标题
|
|
|
- save_txts: new Map([
|
|
|
+ saveBtnMap: new Map([
|
|
|
[5,'转月值计算'],
|
|
|
[6,'同比值计算'],
|
|
|
[7,'同差值计算'],
|
|
@@ -391,6 +393,7 @@ export default {
|
|
|
[61,'转季值计算'],
|
|
|
[62,'累计值计算'],
|
|
|
[63,'年初至今计算'],
|
|
|
+ [75,'日均值计算'],
|
|
|
]),//保存文案
|
|
|
formData: {
|
|
|
targetName:'',
|
|
@@ -604,7 +607,7 @@ export default {
|
|
|
Source: this.type,
|
|
|
EdbName: this.formData.targetName,
|
|
|
Unit: this.formData.unit,
|
|
|
- ClassifyId: this.formData.menu[this.formData.menu.length - 1],
|
|
|
+ ClassifyId: Array.isArray(this.formData.menu)?this.formData.menu[this.formData.menu.length - 1]:this.formData.menu,
|
|
|
Frequency: this.formData.frequency,
|
|
|
Formula: valueMap[this.type] ? String(this.formData[valueMap[this.type]]) : String(this.formData.n_num),
|
|
|
FromEdbInfoId: this.select_target,
|
|
@@ -687,13 +690,20 @@ export default {
|
|
|
61: obj.EdbName,
|
|
|
62: obj.EdbName,
|
|
|
63: obj.EdbName,
|
|
|
+ 75: `${obj.EdbName}日均值`
|
|
|
+ }
|
|
|
+
|
|
|
+ let frequerncyMap = {
|
|
|
+ 14: '日度',
|
|
|
+ 61: '季度',
|
|
|
+ 62: ''
|
|
|
}
|
|
|
|
|
|
this.formData = {
|
|
|
targetName: name_map[this.type] || '',
|
|
|
- frequency: this.type === 14 ? '日度' : this.type === 61 ? '季度' : this.type === 62 ? '' : obj.Frequency,
|
|
|
- unit: [5,8,14,7,35].includes(this.type) ? obj.Unit : '无',
|
|
|
- menu:'',
|
|
|
+ frequency: frequerncyMap[this.type] || obj.Frequency,
|
|
|
+ unit: [5,8,14,7,35,75].includes(this.type) ? obj.Unit : '无',
|
|
|
+ menu: this.type===75 ? obj.ClassifyId : '',
|
|
|
n_num: 1,
|
|
|
moveType: 1,
|
|
|
moveUnit: '天',
|