From 3b3fd904b9b34e77445d749bca8c28beadcaf3db Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期三, 27 十一月 2024 14:35:50 +0800
Subject: [PATCH] 查询模板查询条件显示

---
 Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue |   50 +++++++++++++++++++++++++-------------------------
 1 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue
index b93849e..bfe46ab 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue
@@ -10,10 +10,10 @@
       <div v-for="(condition,index) in conditionList" :key="index" class="el-input--small"
            style="margin-bottom: 5px; text-align:left">
         <span :title="condition.clause"
-              style="width: 200px;display: inline-block;text-align: right">{{ condition.clause }}</span>
+              style="width: 32%;display: inline-block;text-align: right;word-break: break-all">{{ condition.clause }}</span>
         <avue-select v-model="condition.operator" :clearable="false" :dic="condition.operatorDic" :disabled="readOnly"
                      style="width: 80px;margin: 0 5px;" type="tree"></avue-select>
-        <el-date-picker v-if="condition.type=='VTDate'" v-model="condition.ordinaryValue" :disabled="readOnly"
+        <!--<el-date-picker v-if="condition.type=='VTDate'" v-model="condition.ordinaryValue" :disabled="readOnly"
                         style="width:300px;margin-right: 5px;display: inline-block;" type="date"
                         value-format="YYYY-MM-DD">
         </el-date-picker>
@@ -33,7 +33,9 @@
                            :disabled="readOnly"
                            style="width:300px;margin-right: 5px;display: inline-block;"></avue-input-number>
         <avue-input v-else v-model="condition.ordinaryValue" :disabled="readOnly" placeholder=""
-                    style="width: 300px;margin-right: 5px;"></avue-input>
+                    style="width: 300px;margin-right: 5px;"></avue-input>-->
+        <avue-input v-model="condition.ordinaryValue" :disabled="readOnly" placeholder=""
+                    style="width: 36%;margin-right: 5px;"></avue-input>
         <el-button v-if="!readOnly" plain size="mini" type="primary" @click="checkTemp(index)">閫夋嫨鏌ヨ妯℃澘</el-button>
         <el-button v-if="!readOnly" icon="el-icon-delete" size="mini" style="padding: 7px 8px" type="danger"
                    @click="delCondition(index)"></el-button>
@@ -174,7 +176,11 @@
     readOnly: {
       type: Boolean,
       default: false
-    }
+    },
+    searchColumn: {
+      type: Array,
+      default: []
+    },
   },
   data() {
     return {
@@ -260,24 +266,7 @@
         header: false,
         height: window.innerHeight - 220,
         menu: false,
-        column: [
-          {
-            label: 'OID',
-            prop: 'OID',
-          },
-          {
-            label: 'REVISIONOID',
-            prop: 'REVISIONOID'
-          },
-          {
-            label: 'NAMEOID',
-            prop: 'NAMEOID'
-          },
-          {
-            label: 'BTMNAME',
-            prop: 'BTMNAME'
-          }
-        ]
+        column: this.searchColumn
       },
       clickNode: {},
       operatorIntDic: [{
@@ -368,7 +357,7 @@
                 if (queryTemplate.condition.cIMap[key].leafInfo.value.queryTemplate) {
                   getValue(queryTemplate.condition.cIMap[key].leafInfo.value.queryTemplate, item)
                 } else {
-                  item.ordinaryValue = queryTemplate.condition.cIMap[key].leafInfo.value.ordinaryValue;
+                  //item.ordinaryValue = queryTemplate.condition.cIMap[key].leafInfo.value.ordinaryValue;
                   item.type = queryTemplate.condition.cIMap[key].leafInfo.type;
                   if (['VTInteger', 'VTDouble', 'VTLong'].includes(item.type)) {
                     item.operatorDic = that.operatorIntDic;
@@ -392,7 +381,19 @@
                 operatorDic: []
               }
               if (this.queryCondition.cIMap[key].leafInfo.value.queryTemplate) {
-                getValue(this.queryCondition.cIMap[key].leafInfo.value.queryTemplate, item)
+                item.ordinaryValue = this.queryCondition.cIMap[key].leafInfo.value.queryTemplate.id+';'+this.queryCondition.cIMap[key].leafInfo.value.queryTemplate.clauseList.join(',');
+                if(this.queryCondition.cIMap[key].leafInfo.value.queryTemplate.id.indexOf('qt_')==0){
+                  getValue(this.queryCondition.cIMap[key].leafInfo.value.queryTemplate, item)
+                }else {
+                  item.type = this.queryCondition.cIMap[key].leafInfo.type;
+                  if (['VTInteger', 'VTDouble', 'VTLong'].includes(item.type)) {
+                    item.operatorDic = that.operatorIntDic;
+                  } else if (['VTDateTime', 'VTDate', 'VTTime'].includes(item.type)) {
+                    item.operatorDic = that.operatorDateDic;
+                  } else {
+                    item.operatorDic = that.operatorDic;
+                  }
+                }
               } else {
                 item.ordinaryValue = this.queryCondition.cIMap[key].leafInfo.value.ordinaryValue;
                 item.type = this.queryCondition.cIMap[key].leafInfo.type;
@@ -550,7 +551,6 @@
       return item
     },
     handleDragEnd(draggingNode, dropNode, dropType, ev) {
-      debugger;
       console.log('tree drag end: ', dropNode && dropNode.label, dropType);
     },
     handleDragOver({event}) {

--
Gitblit v1.9.3