|
@@ -424,10 +424,10 @@ export default {
|
|
|
//存放html代码块
|
|
|
iframeUrl: "",
|
|
|
FormListDefaultValue: {}, //表单组的默认表单数据
|
|
|
-
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
+ console.log('[123455]')
|
|
|
// 得到当前展示的table的唯一标识
|
|
|
// this.treeData = []
|
|
|
this.tableKey = this.$route.query.tableKey;
|
|
@@ -448,28 +448,42 @@ export default {
|
|
|
const templateData = JSON.parse(res.data.template);
|
|
|
this.templateData = templateData
|
|
|
const data = JSON.parse(res.data.data);
|
|
|
- console.log('[Template Data]', templateData);
|
|
|
+ console.log('[Template Data1]', templateData);
|
|
|
console.log('[Data]', data);
|
|
|
if (templateData && data) {
|
|
|
this.treeData = data
|
|
|
- this.defaultProps.label = templateData.treeShowLabel
|
|
|
+ // this.treeTableCondition = templateData?.TableCondition
|
|
|
|
|
|
+ // this.defaultProps.label = templateData.treeShowLabel
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
},
|
|
|
handleNodeClick(data) {
|
|
|
- console.log('treeData', data);
|
|
|
- console.log('[tableList]',this.tableList)
|
|
|
-
|
|
|
+ console.log('--------------------1--------------------------');
|
|
|
+ // this.querymap.warehouse_name = '一号仓库'
|
|
|
+ console.log('data', data);
|
|
|
+ console.log('templateData', this.templateData);
|
|
|
+ console.log('----------------------------------------------');
|
|
|
+ console.log('treeTableCondition', this.templateData.treeTableCondition);
|
|
|
+ let columnValue = this.templateData?.treeTableCondition == 'name' ? data.name : data.label
|
|
|
+ let treeQueryMap = {
|
|
|
+ columnName: this.templateData.treeTableJoinTableCondition,
|
|
|
+ columnValue: columnValue
|
|
|
+ }
|
|
|
+ console.log('treeQueryMap', treeQueryMap)
|
|
|
+ console.log('queryParams', this.queryParams)
|
|
|
+ // let
|
|
|
+ // console.log('[tableList]',this.tableList)
|
|
|
+ // this.queryParams
|
|
|
},
|
|
|
isUpperCase(char) {
|
|
|
return char === char.toUpperCase();
|
|
|
},
|
|
|
|
|
|
getList(queryParams) {
|
|
|
- console.log('queryParams',queryParams)
|
|
|
+ console.log('queryParams', queryParams)
|
|
|
+ // if(queryParams.treeQueryMap){}
|
|
|
this.loading = true;
|
|
|
// 序列化当前查询参数列表
|
|
|
queryParams && (this.queryParams.queryMap = Object.assign({}, queryParams.queryMap));
|
|
@@ -500,7 +514,15 @@ export default {
|
|
|
(item) => item.btnGroupType == "top"
|
|
|
) || [];
|
|
|
this.calcuteExcuteCol();
|
|
|
- this.$nextTick(() => this.$refs.tableRef.doLayout());
|
|
|
+ // this.$nextTick(() => this.$refs.tableRef.doLayout());
|
|
|
+ // 确保DOM更新完成,并且检查this.$refs.tableRef是否存在
|
|
|
+ this.$nextTick(() => {
|
|
|
+ if (this.$refs.tableRef && typeof this.$refs.tableRef.doLayout === 'function') {
|
|
|
+ this.$refs.tableRef.doLayout();
|
|
|
+ } else {
|
|
|
+ console.warn('tableRef 或 doLayout 方法不可用');
|
|
|
+ }
|
|
|
+ });
|
|
|
this.queryParams.orderByColumn =
|
|
|
res.data.resultMap.querySql.orderByColumn;
|
|
|
this.sortOrder = JSON.parse(res.data.resultMap.querySql.sortOrder);
|