Browse Source

增加组织机构条件查询逻辑

周壕 1 year ago
parent
commit
bba4c94df4

+ 1 - 1
vue/src/components/basic/query/display-chart-bar.vue

@@ -73,8 +73,8 @@
 
         series.slice(0,1);
         for(let i=0;i<this.measures.length;i++) {
-          const colName = "RENAME"+(i+this.bases.length);
           const it = this.measures[i];
+          const colName = "RENAME"+it.disOrder;
           let col = {name: (it.displayName?it.displayName:it.fieldName), type: this.serieType, data:[] as any};
           for(let n=0;n<this.dataList.length;n++){
             const data = this.dataList[n];

+ 14 - 14
vue/src/components/basic/query/drag-where.vue

@@ -2,14 +2,14 @@
   <div class="query-area">
     <template v-for="(it, index) in tagList">
       <div class="query-area-item"
-           :class="((this.index == index?'query-area-item-active':'') + (convertDataType(tagList[index])==2?' query-area-item-time':''))"
+           :class="((this.index == index?'query-area-item-active':'') + (convertDataType(tagList[index])==3?' query-area-item-time':''))"
       >
         <div class="query-area-header">
           <div class="query-area-item-title">
             {{ it.displayName ? it.displayName : it.fieldName }}:
           </div>
           <template v-for="(op, idx) in tagList[index].values">
-            <div v-if="convertDataType(tagList[index])==0" class="query-area-body">
+            <div v-if="convertDataType(tagList[index])==1" class="query-area-body">
               <div class="query-area-body-oper">
                 <a-select v-model:value="tagList[index].values[idx].operation"
                           :options="operTexts"></a-select>
@@ -23,7 +23,7 @@
               </div>
             </div>
 
-            <div v-if="convertDataType(tagList[index])==1" class="query-area-body">
+            <div v-if="convertDataType(tagList[index])==2" class="query-area-body">
               <div class="query-area-body-oper">
                 <a-select v-model:value="tagList[index].values[idx].operation" :options="operNumbers"></a-select>
               </div>
@@ -42,7 +42,7 @@
               </div>
             </div>
 
-            <div v-if="convertDataType(tagList[index])==2" class="query-area-body">
+            <div v-if="convertDataType(tagList[index])==3" class="query-area-body">
               <div
                 :class="(getIsTimeLimit(tagList[index].values[idx].operation)?'query-area-body-oper':'query-area-body-time')">
                 <a-select v-model:value="tagList[index].values[idx].operation" :options="operTimes"></a-select>
@@ -77,7 +77,7 @@
               </div>
             </div>
 
-            <div v-if="convertDataType(tagList[index])==3" class="query-area-body">
+            <div v-if="convertDataType(tagList[index])==4" class="query-area-body">
               <div class="query-area-body-oper">
                 <a-select v-model:value="tagList[index].values[idx].operation" :options="operDics"></a-select>
               </div>
@@ -91,7 +91,7 @@
               </div>
             </div>
 
-            <div v-if="convertDataType(tagList[index])==7" class="query-area-body query-area-body-organization">
+            <div v-if="convertDataType(tagList[index])==8" class="query-area-body query-area-body-organization">
               <div class="query-area-body-oper">
                 <a-select v-model:value="tagList[index].values[idx].operation" :options="operDics"></a-select>
               </div>
@@ -207,7 +207,7 @@ export default defineComponent({
       //加载字典
       if (data.dictionaryCode) this.getDictionary(data.dictionaryCode);
       //加载组织结构树
-      if (this.convertDataType(data) == 7) this.getOrganization();
+      if (this.convertDataType(data) == 8) this.getOrganization();
 
       return {
         tempFeildId: data.tempFeildId,
@@ -221,7 +221,7 @@ export default defineComponent({
         isDrag: 1,
         displayName: data.displayName ? data.displayName : null,
         values: data.values ? data.values :
-          [{operation: (this.convertDataType(data) == 2 ? 'date' : '='), val: '', val2: ''}],
+          [{operation: (this.convertDataType(data) == 3 ? 'date' : '='), val: '', val2: ''}],
 
         subId: data.subId ? data.subId : null,
         subjectName: data.subjectName ? data.subjectName : null,
@@ -236,8 +236,8 @@ export default defineComponent({
       this.tagList[index].values.splice(idx, 1);
     },
     convertDataType(row: any) {
-      if (row.queryType && (row.queryType <= 4 || row.queryType==8)) return row.queryType - 1;
-      else return 0;
+      if (row.queryType && (row.queryType <= 4 || row.queryType==8)) return row.queryType*1;
+      else return 1;
     },
     onRangeChange(value: [Dayjs, Dayjs], dateString: [string, string]) {
       console.log('Selected Time: ', value);
@@ -247,7 +247,7 @@ export default defineComponent({
       this.tagList.forEach((row, index) => {
         row.disOrder = index;
         row.operation = row.values[0].operation;
-        if (this.convertDataType(row) == 2) {
+        if (this.convertDataType(row) == 3) {
           row.value1 = row.value2 = null;
 
           let formatString = "YYYY-MM-DD";
@@ -263,7 +263,7 @@ export default defineComponent({
             row.value1 = row.values[0].val2.format(formatString);
           }
         }
-        else if (this.convertDataType(row) == 7) {
+        else if (this.convertDataType(row) == 8) {
           row.value1 = row.values[0].val.join(',');
           row.value2 = null;
         }
@@ -281,7 +281,7 @@ export default defineComponent({
         }
         row.values = [{operation: row.operation, val: row.value1, val2: row.value2}];
 
-        if (this.convertDataType(row) == 2) {
+        if (this.convertDataType(row) == 3) {
           let formatString = "YYYY-MM-DD";
           if (this.getTimeType(row.values[0].operation) == "datetime") formatString = "YYYY-MM-DD HH:mm:ss";
 
@@ -297,7 +297,7 @@ export default defineComponent({
         }
         if (row.dictionaryCode) this.getDictionary(row.dictionaryCode);
 
-        if (this.convertDataType(row) == 7) {
+        if (this.convertDataType(row) == 8) {
           this.getOrganization();
 
           row.values[0].val = [];