|
@@ -217,13 +217,13 @@ export default {
|
|
|
},1000)
|
|
|
return
|
|
|
}
|
|
|
- const { ExcelName,ExcelClassifyId,ExcelType,TableData,ModifyTime,Button,SourcesFrom} = res.Data;
|
|
|
+ const { ExcelName,ExcelClassifyId,ExcelType,TableData,ModifyTime,Button,SourcesFrom,ExcelSource} = res.Data;
|
|
|
this.sheetButton=Button
|
|
|
this.sheetForm = {
|
|
|
name: ExcelName,
|
|
|
classify: ExcelClassifyId,
|
|
|
sheetType: ExcelType,
|
|
|
- SourcesFrom:SourcesFrom || this.setDefaultSource()
|
|
|
+ SourcesFrom:SourcesFrom || this.setDefaultSource(ExcelSource)
|
|
|
}
|
|
|
|
|
|
this.sheetSourceFrom = JSON.parse(this.sheetForm.SourcesFrom)
|
|
@@ -234,10 +234,10 @@ export default {
|
|
|
})
|
|
|
this.$refs.customTableRef.initSheetData(TableData);
|
|
|
},
|
|
|
- setDefaultSource(){
|
|
|
+ setDefaultSource(sourceText){
|
|
|
return JSON.stringify({
|
|
|
isShow: true,
|
|
|
- text: '',
|
|
|
+ text: sourceText,
|
|
|
color: "#606266",
|
|
|
fontSize: 9
|
|
|
})
|
|
@@ -245,7 +245,6 @@ export default {
|
|
|
/* 选择指标push指标数组 */
|
|
|
async handleSelectTarget(e) {
|
|
|
if(!e) return
|
|
|
- this.updateSourceFrom(e.SourceName)
|
|
|
const { EdbName,EdbNameEn,UnitEn,EdbInfoId,Unit,Frequency } = e;
|
|
|
if(this.$refs.customTableRef.config.data.find(_ => _.EdbInfoId===EdbInfoId)) return this.$message.warning(this.$t('OnlineExcelPage.already_exists_msg') )
|
|
|
|
|
@@ -260,7 +259,8 @@ export default {
|
|
|
SortType: this.$refs.customTableRef.config.order===1 ? 'desc' : 'asc',
|
|
|
Num: 12
|
|
|
})
|
|
|
-
|
|
|
+ console.log(Data,'DataData');
|
|
|
+ this.updateSourceFrom(Data.ExcelSource)
|
|
|
this.$refs.customTableRef.updateEdbData({
|
|
|
Data: Data.Data.map(_ => ({..._,DataTimeType: 1,})),
|
|
|
EdbAliasName: '',
|
|
@@ -387,7 +387,7 @@ export default {
|
|
|
if(!source) return
|
|
|
let concatSourceArr = this.sheetSourceFrom.text?`${this.sheetSourceFrom.text},${source}`.split(','):[source];
|
|
|
let sourceStr = Array.from(new Set(concatSourceArr)).join(',');
|
|
|
- this.sheetSourceFrom.text=sourceStr
|
|
|
+ this.$set(this.sheetSourceFrom,'text',sourceStr)
|
|
|
this.sheetForm.SourcesFrom=JSON.stringify(this.sheetSourceFrom)
|
|
|
}
|
|
|
},
|