From 6c170b6b427f0882da35957e73f385d318970a06 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期五, 25 十月 2024 17:59:19 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/formDialog.vue | 69 +++++++++++++++++++---------------
1 files changed, 39 insertions(+), 30 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/formDialog.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/formDialog.vue
index e11d0a9..f30d66c 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/formDialog.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/formDialog.vue
@@ -60,6 +60,7 @@
:queryCondition="queryCondition"
:queryTree="queryTree"
:levelFlag.sync="form.levelFlag"
+ @queryHandler="queryHandler"
></form-query-dialog>
</fieldset>
</el-main>
@@ -73,10 +74,10 @@
</template>
<script>
-import {linkSave,getBizTypeQTDs} from "@/api/queryTemplate/businessTypeQuery";
+import {btmSave,getBizTypeQTDs,getCriteriaBtm} from "@/api/queryTemplate/businessTypeQuery";
import basicOption from "@/util/basic-option";
import {queryTemplateListByAttr} from "@/api/queryTemplate/queryDefine";
-import formQueryDialog from "./formQueryDialog.vue";
+import formQueryDialog from "@/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue";
export default {
name: "formDialog",
components:{formQueryDialog},
@@ -201,9 +202,18 @@
allowDrop: () => {
return false;
},
- allowDrag: () => {
- return true;
+ allowDrag: (dropNode) => {
+ if (dropNode.data.attrs && dropNode.data.attrs.length>0) {
+ return false;
+ } else {
+ return true;
+ }
},
+ props:{
+ label:'name',
+ value:'name',
+ children:'attrs'
+ }
},
businessQueryDefineForm:'',//涓氬姟绫诲瀷鏌ヨ妯℃澘瀹氫箟閫変腑鍊�
businessQueryDefineDic:[],//涓氬姟绫诲瀷鏌ヨ妯℃澘瀹氫箟涓嬫媺鏁版嵁
@@ -227,7 +237,6 @@
if (data.selectData) {
this.selectData = data.selectData;
this.form.qtName = this.selectData.qtName;
- this.form.level = this.selectData.queryTemplate.level;
if (data.selectData.queryTemplate.orderInfoList && data.selectData.queryTemplate.orderInfoList.length > 0) {
this.orderInfoList = JSON.parse(JSON.stringify(data.selectData.queryTemplate.orderInfoList));//宸叉湁鎺掑簭
}
@@ -244,6 +253,7 @@
};
}
this.dialog.showDialog = true;
+ this.treeOption.defaultExpandedKeys=[data.treeData.label]
this.getTemp(data.treeData.label)
this.getAllAttr();
},
@@ -268,7 +278,7 @@
if (valid) {
const formData=this.initFormData();
console.log(formData)
- linkSave(formData).then(res => {
+ btmSave(formData).then(res => {
if (res.data.success) {
this.$message.success("淇濆瓨鎴愬姛");
this.cancelDialog();
@@ -288,16 +298,7 @@
qtName: this.form.qtName,
levelFlag: this.form.levelFlag,
queryTemplate: {
- clauseList: ['*'],
- direction: this.form.direction,
- id: this.form.qtName,
- linkType: this.form.btmName,
orderInfoList: this.orderInfoList,
- recReturnMode: 1,//閫掑綊杩斿洖鏁版嵁妯″紡:1锛歊ECRETURNMODE_FLAT, 2锛歊ECRETURNMODE_FILTER
- rightFlag: true,
- secretFlag: true,
- type: 'link',
- version: this.form.version
}
}
if (formData.levelFlag == 1) {
@@ -341,7 +342,6 @@
},
// 琛屽垹闄�
rowDeleteHandler(data) {
- debugger;
this.orderInfoList.splice(data.index,1);
this.orderFieldList.unshift({
id: data.row.orderField
@@ -390,31 +390,22 @@
//鑾峰彇鏌ヨ妯℃澘瀹氫箟涓嬫媺
getTemp(btmName) {
if (btmName) {
- queryTemplateListByAttr({btmName: btmName}).then(res => {
+ queryTemplateListByAttr({btmName: btmName,linkFlag:false}).then(res => {
const data = res.data.data.map(item => {
- item.label = item.name + '-' + (item.linkTypeName || item.btmName);
+ item.label = item.name + '-' + item.btmName;
item.value = item.name;
return item;
});
this.businessQueryDefineDic=data;
data.length>0 && (this.businessQueryDefineForm= data[0].value);
-
})
}
},
businessQueryDefineChange(data) {
if (data.value) {
- const childData = data.item.attrs.map(item => {
- return {
- label: item.name,
- value: item.name,
- atttributes:item
- };
- });
this.businessTreeData = [{
- label: data.value,
- value: data.value,
- children: childData
+ name: data.value,
+ attrs: data.item.attrs
}]
}
},
@@ -430,7 +421,25 @@
if(this.form.levelFlag==1) {
this.$refs.formQuery.$refs.tree.$emit('tree-node-drag-end', ev);
}
- }
+ },
+ //鏌ヨ
+ queryHandler(){
+ this.$refs.form.validate((valid) => {
+ if (valid) {
+ this.$refs.formQuery.queryResultDialog.loading=true;
+ const formData=this.initFormData();
+ getCriteriaBtm(formData).then(res => {
+ if (res.data.success) {
+ this.resultData=res.data.data;
+ this.$refs.formQuery.queryResultDialog.showDialog=true;
+ this.$refs.formQuery.queryResultDialog.loading=false;
+ }
+ });
+ } else {
+ return false;
+ }
+ });
+ },
},
}
</script>
--
Gitblit v1.9.3