|
@@ -437,18 +437,9 @@ export default {
|
|
|
// 得到当前展示的table的唯一标识
|
|
|
this.tableKey = this.$route.query.tableKey;
|
|
|
},
|
|
|
- watch: {
|
|
|
- tableList: {
|
|
|
- handler(val) {
|
|
|
- // console.log(JSON.parse(JSON.stringify(val)), "tableListChange");
|
|
|
- },
|
|
|
- deep: true,
|
|
|
- },
|
|
|
- },
|
|
|
+ watch: {},
|
|
|
computed: {
|
|
|
isShowExcuteCol() {
|
|
|
- // console.log(!this.excuteBtnArr?.every((arr) => arr.children.length == 0));
|
|
|
- // return true;
|
|
|
return !this.excuteBtnArr?.every((arr) => arr.children.length == 0);
|
|
|
},
|
|
|
},
|
|
@@ -471,7 +462,6 @@ export default {
|
|
|
});
|
|
|
// 获取操作列的按钮数据
|
|
|
this.excuteBtnArr = res.data.resultMap.button;
|
|
|
- // console.log('res', this.templateInfo)
|
|
|
this.queryParams.orderByColumn =
|
|
|
res.data.resultMap.querySql.orderByColumn;
|
|
|
this.sortOrder = JSON.parse(res.data.resultMap.querySql.sortOrder);
|
|
@@ -494,7 +484,6 @@ export default {
|
|
|
);
|
|
|
// 根据sql语句查询当前表数据
|
|
|
unionListTableData(this.queryParams).then(async (res) => {
|
|
|
- // console.log('unionListTableData');
|
|
|
this.tableList = [];
|
|
|
res.rows.forEach((item) => {
|
|
|
this.tableList.push(item.resultMap);
|
|
@@ -526,7 +515,6 @@ export default {
|
|
|
queryCriteriaValue: this.queryParams.queryMap.queryCriteriaValue,
|
|
|
},
|
|
|
}).then((res) => {
|
|
|
- // console.log('getStatisticList', res);
|
|
|
this.statisticList = res.data;
|
|
|
});
|
|
|
});
|
|
@@ -685,11 +673,7 @@ export default {
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
async handleUpdate(row, btnData) {
|
|
|
- // console.log(this.currentBtnData);
|
|
|
-
|
|
|
let nameTable = this.templateInfo.template.dtTableName;
|
|
|
- // console.log(nameTable);
|
|
|
- // console.log('row', row);
|
|
|
this.rowobj = {};
|
|
|
let obj = {};
|
|
|
for (let key in row) {
|
|
@@ -702,7 +686,6 @@ export default {
|
|
|
let str = modifiedTable.substring(nameTable.length + 1);
|
|
|
obj[str] = row[key];
|
|
|
}
|
|
|
- // console.log("row", row);
|
|
|
// getInfoBySqlKey(this.templateInfo.template.sqlKey).then(({ data }) => {
|
|
|
// if (!data || !data.dfVueTemplate) {
|
|
|
// this.$message.error("当前表格未绑定表单!");
|
|
@@ -753,8 +736,6 @@ export default {
|
|
|
this.groupKey = this.currentBtnData.btnTableFormGroupKey;
|
|
|
this.$nextTick(() => {
|
|
|
let refChild = this.$refs.dialogRef;
|
|
|
-
|
|
|
- // console.log(this.$refs.dialogRef);
|
|
|
refChild.getLists(this.groupKey);
|
|
|
});
|
|
|
|
|
@@ -766,7 +747,6 @@ export default {
|
|
|
tableKey: tablesubKey,
|
|
|
},
|
|
|
}).then((res) => {
|
|
|
- // console.log('统计', res);
|
|
|
this.subCount = res.data;
|
|
|
});
|
|
|
|
|
@@ -791,7 +771,6 @@ export default {
|
|
|
"'" + obj[this.templateInfo.template.primaryKey] + "'";
|
|
|
|
|
|
getStatisticList(data).then((res) => {
|
|
|
- // console.log('统计', res);
|
|
|
this.tableCount = res.data;
|
|
|
});
|
|
|
}
|
|
@@ -846,11 +825,9 @@ export default {
|
|
|
},
|
|
|
// 添加真正的字段名
|
|
|
addRealFieldName(row) {
|
|
|
- console.log(row);
|
|
|
let fieldList = Object.keys(row);
|
|
|
// let tableName = this.longestCommonSubstring(fieldList);
|
|
|
let tableName = camelCase(this.tableName);
|
|
|
- console.log(this.tableName);
|
|
|
fieldList.forEach((field) => {
|
|
|
let realField = field.replace(tableName, "");
|
|
|
realField = realField[0].toLocaleLowerCase() + realField.substring(1);
|
|
@@ -887,13 +864,12 @@ export default {
|
|
|
let primary = camelCase(this.templateInfo.template?.primaryKey);
|
|
|
this.addRealFieldName(row);
|
|
|
if (row[primary] != undefined && row[primary] != null) {
|
|
|
- console.log(row[primary]);
|
|
|
delIds = [];
|
|
|
delIds.push(row[primary]);
|
|
|
}
|
|
|
let data = {
|
|
|
basicMap: {
|
|
|
- btnType: 9,
|
|
|
+ btnType: btnData.btnType,
|
|
|
btnKey: btnData.btnKey,
|
|
|
tableName: this.tableName,
|
|
|
},
|
|
@@ -929,7 +905,6 @@ export default {
|
|
|
// 批量删除接口
|
|
|
handleBatchDelete() {
|
|
|
let delIds = this.ids;
|
|
|
- console.log(this.ids);
|
|
|
let primary = camelCase(this.templateInfo.template?.primaryKey);
|
|
|
// if (row && row[primary] != undefined && row[primary] != null) {
|
|
|
// delIds = [];
|
|
@@ -1042,7 +1017,6 @@ export default {
|
|
|
// 弹窗新增的数
|
|
|
addListHandler(val) {
|
|
|
this.addLists.push(...val);
|
|
|
- // console.log(this.addLists);
|
|
|
},
|
|
|
// 绑定弹窗Dialog确定按钮
|
|
|
btnComfirm() {
|
|
@@ -1063,7 +1037,6 @@ export default {
|
|
|
},
|
|
|
// 去掉表名 开头字母小写
|
|
|
formatField(field = "", tableName) {
|
|
|
- // console.log(field, tableName);
|
|
|
let temp = field.replace(tableName, "");
|
|
|
return toUnderline(temp[0].toLowerCase() + temp.slice(1));
|
|
|
},
|
|
@@ -1224,9 +1197,7 @@ export default {
|
|
|
);
|
|
|
if (!fieldConditionList.length) return tableList;
|
|
|
let res = await this.setDictStyleData();
|
|
|
- // console.log(res);
|
|
|
this.dictStyleObj = res;
|
|
|
- // console.log(JSON.parse(JSON.stringify(this.dictStyleObj)));
|
|
|
tableList.forEach((row) => {
|
|
|
// if (!row.styleFieldObj) row.styleFieldObj = {};
|
|
|
for (let i = 0; i < fieldConditionList.length; i++) {
|