|
@@ -948,7 +948,7 @@ export default {
|
|
|
relationFieldList: [],
|
|
|
};
|
|
|
});
|
|
|
- console.log(this.tableFieldList);
|
|
|
+ // console.log(this.tableFieldList);
|
|
|
});
|
|
|
},
|
|
|
// 关联表变化回调
|
|
@@ -1585,9 +1585,9 @@ export default {
|
|
|
data.menuId = result.data;
|
|
|
res = await addDragTable(data);
|
|
|
}
|
|
|
- this.staticSqlKey = uuidv4()
|
|
|
- this.dragTableStatisticList.forEach(item => {
|
|
|
- console.log(item)
|
|
|
+ this.dragTableStatisticList?.forEach(item => {
|
|
|
+ this.staticSqlKey = uuidv4()
|
|
|
+ // console.log(item)
|
|
|
let key = item.statisticType + '(' + item.statisticField + ')'+ ' as result'
|
|
|
this.tableSqlList.push({
|
|
|
tableSql: this.getStaticSQL(key),
|
|
@@ -1700,37 +1700,33 @@ export default {
|
|
|
},
|
|
|
// 添加数据字段对话框
|
|
|
async addDataDialog() {
|
|
|
+ this.staictitle = '添加统计数据字段'
|
|
|
this.isShowAddData = true;
|
|
|
this.dataType = await this.getDicts("table_statistic_type");
|
|
|
this.dataType = this.dataType.data;
|
|
|
// console.log(this.dataType)
|
|
|
},
|
|
|
- // 添加数据字段对话框
|
|
|
- async addDataDialog() {
|
|
|
- this.isShowAddData = true;
|
|
|
- this.dataType = await this.getDicts("table_statistic_type");
|
|
|
- this.dataType = this.dataType.data;
|
|
|
+ async updataDialog() {
|
|
|
+
|
|
|
// console.log(this.dataType)
|
|
|
},
|
|
|
// 修改数据字段
|
|
|
upadtaData(){
|
|
|
- console.log(this.dataCountFormData);
|
|
|
- // this.dragTableStatisticList = this.dragTableStatisticList.map(value => value.xid == this.dataCountFormData.xid || value.id == this.dataCountFormData.id ? this.dataCountFormData : value)
|
|
|
this.dragTableStatisticList.forEach((item, index) => {
|
|
|
- console.log(this.dataCountFormData);
|
|
|
- if(item?.id == this.dataCountFormData?.id){
|
|
|
+ // console.log(this.dataCountFormData);
|
|
|
+ if(item.id !== undefined && item.id == this.dataCountFormData.id){
|
|
|
this.dragTableStatisticList[index] = this.dataCountFormData
|
|
|
- }else if(item?.xid == this.dataCountFormData?.xid){
|
|
|
+ }else if(item.xid == this.dataCountFormData.xid){
|
|
|
this.dragTableStatisticList[index] = this.dataCountFormData
|
|
|
}
|
|
|
})
|
|
|
this.isShowAddData = false
|
|
|
- console.log(this.dragTableStatisticList)
|
|
|
+ // console.log(this.dragTableStatisticList)
|
|
|
this.dataCountFormData = {}
|
|
|
},
|
|
|
// 添加数据字段
|
|
|
addData(){
|
|
|
- console.log(this.dataCountFormData);
|
|
|
+ // console.log(this.dataCountFormData);
|
|
|
this.dataCountFormData.xid = Date.now()
|
|
|
this.dataCountFormData.tableKey = this.tableKey
|
|
|
this.dragTableStatisticList.push(this.dataCountFormData)
|
|
@@ -1754,20 +1750,21 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
// 修改统计信息
|
|
|
- handleUpdateStat(row){
|
|
|
- console.log(row);
|
|
|
- this.staictitle = '修改统计数据字段'
|
|
|
+ async handleUpdateStat(row){
|
|
|
+ // console.log(row);
|
|
|
this.dataCountFormData = row
|
|
|
this.dataCountFormData.xid = Date.now()
|
|
|
- this.addDataDialog()
|
|
|
+ this.staictitle = '修改统计数据字段'
|
|
|
+ this.dataType = await this.getDicts("table_statistic_type");
|
|
|
+ this.dataType = this.dataType.data;
|
|
|
this.isShowAddData = true
|
|
|
- console.log(this.dataCountFormData)
|
|
|
- console.log(this.dragTableStatisticList);
|
|
|
+ // console.log(this.dataCountFormData)
|
|
|
+ // console.log(this.dragTableStatisticList);
|
|
|
},
|
|
|
// 删除统计信息
|
|
|
handleDeleteStat(row){
|
|
|
this.dragTableStatisticList.forEach((item, index) => {
|
|
|
- console.log(item);
|
|
|
+ // console.log(item);
|
|
|
if(item.id == row.id){
|
|
|
this.dragTableStatisticList.splice(index, 1);
|
|
|
}
|