|
@@ -54,6 +54,7 @@
|
|
:remote-method="query=>{searchHandle(query)}"
|
|
:remote-method="query=>{searchHandle(query)}"
|
|
@click.native="inputFocusHandle"
|
|
@click.native="inputFocusHandle"
|
|
@blur="search_have_more = false"
|
|
@blur="search_have_more = false"
|
|
|
|
+ @change="chooseTarget(formData.pre_edb,'pre_edb')"
|
|
>
|
|
>
|
|
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
|
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
|
<el-option
|
|
<el-option
|
|
@@ -75,7 +76,7 @@
|
|
</div>
|
|
</div>
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
- <span v-if="formData.pre_edb">({{$t('Edb.Detail.e_start_time')}}:{{ searchOptions.find(item => item.EdbInfoId === formData.pre_edb) ? searchOptions.find(item => item.EdbInfoId === formData.pre_edb).StartDate : ''}})</span>
|
|
|
|
|
|
+ <span v-if="formData.pre_date">({{$t('Edb.Detail.e_start_time')}}:{{ formData.pre_date}})</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item :label="$t('EtaBasePage.label_concat_date_after')" prop="after_edb">
|
|
<el-form-item :label="$t('EtaBasePage.label_concat_date_after')" prop="after_edb">
|
|
<el-select
|
|
<el-select
|
|
@@ -90,7 +91,7 @@
|
|
:remote-method="query=>{searchHandle(query)}"
|
|
:remote-method="query=>{searchHandle(query)}"
|
|
@click.native="inputFocusHandle"
|
|
@click.native="inputFocusHandle"
|
|
@blur="search_have_more = false"
|
|
@blur="search_have_more = false"
|
|
- @change="chooseTarget(formData.after_edb,'searchOptions')"
|
|
|
|
|
|
+ @change="chooseTarget(formData.after_edb,'after_edb')"
|
|
>
|
|
>
|
|
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
|
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
|
<el-option
|
|
<el-option
|
|
@@ -112,7 +113,7 @@
|
|
</div>
|
|
</div>
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
- <span v-if="formData.after_edb">({{$t('Edb.Detail.e_latest_date')}}:{{ searchOptions.find(item => item.EdbInfoId === formData.after_edb) ? searchOptions.find(item => item.EdbInfoId === formData.after_edb).EndDate : ''}})</span>
|
|
|
|
|
|
+ <span v-if="formData.after_date">({{$t('Edb.Detail.e_latest_date')}}:{{ formData.after_date }})</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</template>
|
|
</template>
|
|
<template v-else>
|
|
<template v-else>
|
|
@@ -129,7 +130,7 @@
|
|
:remote-method="query=>{searchHandle(query,'month')}"
|
|
:remote-method="query=>{searchHandle(query,'month')}"
|
|
@click.native="e => {inputFocusHandle(e,'month')} "
|
|
@click.native="e => {inputFocusHandle(e,'month')} "
|
|
@blur="search_have_more = false"
|
|
@blur="search_have_more = false"
|
|
- @change="chooseTarget(formData.old_stay_edb,'searchMonthOptions')"
|
|
|
|
|
|
+ @change="chooseTarget(formData.old_stay_edb,'old_stay_edb')"
|
|
>
|
|
>
|
|
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
|
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
|
<el-option
|
|
<el-option
|
|
@@ -151,7 +152,7 @@
|
|
</div>
|
|
</div>
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
- <span v-if="formData.old_stay_edb">({{$t('EtaBasePage.label_end_date')}}:{{searchMonthOptions.find(item => item.EdbInfoId === formData.old_stay_edb) ? searchMonthOptions.find(item => item.EdbInfoId === formData.old_stay_edb).EndDate : ''}})</span>
|
|
|
|
|
|
+ <span v-if="formData.old_stay_date">({{$t('EtaBasePage.label_end_date')}}:{{ formData.old_stay_date }})</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item :label="$t('EtaBasePage.label_onyear_date')" prop="concat_edb">
|
|
<el-form-item :label="$t('EtaBasePage.label_onyear_date')" prop="concat_edb">
|
|
<el-select
|
|
<el-select
|
|
@@ -272,7 +273,7 @@ export default {
|
|
|
|
|
|
// this.searchHandle();
|
|
// this.searchHandle();
|
|
const backData = _.cloneDeep(this.params);
|
|
const backData = _.cloneDeep(this.params);
|
|
- this.default_type = backData.source === 23||backData.source === 47 ? 1 : 2;
|
|
|
|
|
|
+ this.default_type = [23,47].includes(backData.source) ? 1 : 2;
|
|
|
|
|
|
this.formData = {
|
|
this.formData = {
|
|
date: backData.date,
|
|
date: backData.date,
|
|
@@ -287,13 +288,16 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
//options 回显
|
|
//options 回显
|
|
- if(backData.source === 23||backData.source === 47) {
|
|
|
|
|
|
+ if([23,47].includes(backData.source)) {
|
|
this.searchOptions = backData.from_arr.map(item => ({
|
|
this.searchOptions = backData.from_arr.map(item => ({
|
|
EdbInfoId: item.FromEdbInfoId,
|
|
EdbInfoId: item.FromEdbInfoId,
|
|
EdbName: item.FromEdbName,
|
|
EdbName: item.FromEdbName,
|
|
StartDate: item.StartDate,
|
|
StartDate: item.StartDate,
|
|
EndDate: item.EndDate,
|
|
EndDate: item.EndDate,
|
|
}))
|
|
}))
|
|
|
|
+
|
|
|
|
+ this.formData.pre_date = backData.from_arr[0].StartDate
|
|
|
|
+ this.formData.after_date = backData.from_arr[0].EndDate
|
|
}else {
|
|
}else {
|
|
this.searchMonthOptions = backData.from_arr.filter(obj => obj.FromTag === 'A').map(item => ({
|
|
this.searchMonthOptions = backData.from_arr.filter(obj => obj.FromTag === 'A').map(item => ({
|
|
EdbInfoId: item.FromEdbInfoId,
|
|
EdbInfoId: item.FromEdbInfoId,
|
|
@@ -301,6 +305,8 @@ export default {
|
|
StartDate: item.StartDate,
|
|
StartDate: item.StartDate,
|
|
EndDate: item.EndDate,
|
|
EndDate: item.EndDate,
|
|
}));
|
|
}));
|
|
|
|
+
|
|
|
|
+ this.formData.old_stay_date = backData.from_arr.find(obj => obj.FromTag === 'A').EndDate
|
|
|
|
|
|
this.searchMonthConcatOptions = backData.from_arr.filter(obj => obj.FromTag === 'B').map(item => ({
|
|
this.searchMonthConcatOptions = backData.from_arr.filter(obj => obj.FromTag === 'B').map(item => ({
|
|
EdbInfoId: item.FromEdbInfoId,
|
|
EdbInfoId: item.FromEdbInfoId,
|
|
@@ -376,8 +382,11 @@ export default {
|
|
formData: {
|
|
formData: {
|
|
date: '',
|
|
date: '',
|
|
pre_edb: '',
|
|
pre_edb: '',
|
|
|
|
+ pre_date: '',
|
|
after_edb: '',
|
|
after_edb: '',
|
|
|
|
+ after_date: '',
|
|
old_stay_edb: '',
|
|
old_stay_edb: '',
|
|
|
|
+ old_stay_date: '',
|
|
concat_edb: '',
|
|
concat_edb: '',
|
|
edb_name: '',
|
|
edb_name: '',
|
|
menu: '',
|
|
menu: '',
|
|
@@ -449,13 +458,22 @@ export default {
|
|
// 选中指标更新默认值
|
|
// 选中指标更新默认值
|
|
chooseTarget(val,key){
|
|
chooseTarget(val,key){
|
|
if(!val) return
|
|
if(!val) return
|
|
- const arr=key==='searchMonthOptions'?this.searchMonthOptions:this.searchOptions
|
|
|
|
|
|
+ const arr=key==='old_stay_edb'?this.searchMonthOptions:this.searchOptions
|
|
|
|
+
|
|
let obj = arr.find(item => item.EdbInfoId === val);
|
|
let obj = arr.find(item => item.EdbInfoId === val);
|
|
console.log(obj);
|
|
console.log(obj);
|
|
this.formData.edb_name=`${obj.EdbName}/拼接`
|
|
this.formData.edb_name=`${obj.EdbName}/拼接`
|
|
this.formData.menu=obj.ClassifyId||''
|
|
this.formData.menu=obj.ClassifyId||''
|
|
this.formData.frequency=obj.Frequency
|
|
this.formData.frequency=obj.Frequency
|
|
this.formData.unit=obj.Unit
|
|
this.formData.unit=obj.Unit
|
|
|
|
+
|
|
|
|
+ //日期也要常驻显示 加字段存了
|
|
|
|
+ const showDateMap = {
|
|
|
|
+ 'old_stay_edb': { key:'old_stay_date',valKey:'EndDate' },
|
|
|
|
+ 'after_edb': { key:'after_date',valKey:'EndDate' },
|
|
|
|
+ 'pre_edb': { key:'pre_date',valKey:'StartDate' }
|
|
|
|
+ }
|
|
|
|
+ this.formData[showDateMap[key].key] = obj[showDateMap[key].valKey]
|
|
},
|
|
},
|
|
|
|
|
|
/* 搜索 */
|
|
/* 搜索 */
|