Procházet zdrojové kódy

公式配置优化页面布局

duy před 2 roky
rodič
revize
c05b100bf5

+ 1 - 0
src/views/exctab/excelmodel/excelmodel.vue

@@ -435,6 +435,7 @@
       :before-close="excelhandleClose">
       <span>
         <el-upload
+          accept=".xls, .xlsx"
           class="upload-demo"
           action="#"
           :auto-upload="false"

+ 8 - 4
src/views/formula/component/funComponent/dateDeviation.vue

@@ -14,19 +14,19 @@
       </template>
       
       <span style="font-size:35px" class="mg-l-20 mg-r-20">/</span>
-      <el-date-picker v-model="dateValue" type="date" size="medium" placeholder="选择日期" format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd" @change="dateChange"></el-date-picker>
-      <el-select v-model="operator" @change="operChange" placeholder="请选择" size="medium" style="width:100px" class="mg-l-20 mg-r-20">
+      <el-date-picker v-model="dateValue" type="date" :size="inputSize" placeholder="选择日期" format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd" @change="dateChange"></el-date-picker>
+      <el-select v-model="operator" @change="operChange" placeholder="请选择" :size="inputSize" style="width:100px" class="mg-l-20 mg-r-20">
         <el-option label="+" value="+"></el-option>
         <el-option label="-" value="-"></el-option>
       </el-select>
 
       <template>
         <el-tag closable v-if="arg1Name" @close="deleteEle('1')">{{arg1Name}}</el-tag>
-        <el-input v-else :value="''" @focus="curFocusIndex = 2" size="medium" placeholder="参数名称" style="width:100px"></el-input>
+        <el-input v-else :value="''" @focus="curFocusIndex = 2" :size="inputSize" placeholder="参数名称" style="width:100px"></el-input>
       </template>
 
       <span style="font-size:35px" class="mg-l-20 mg-r-20">/</span>
-      <el-input v-model="input" placeholder="输入值" size="medium" @change="inputChange" style="width:100px"></el-input>
+      <el-input v-model="input" placeholder="输入值" :size="inputSize" @change="inputChange" style="width:100px"></el-input>
     </div>
   </div>
 </template>
@@ -50,6 +50,10 @@ export default {
     isShow:{
       type:Boolean,
       default:true
+    },
+    inputSize:{
+      type:String,
+      default:'medium'
     }
   },
   data(){

+ 20 - 9
src/views/formula/editnew.vue

@@ -244,16 +244,19 @@
                            <div class="formula-title"> 嵌套公式:</div>
                         <div class="formula-box">
                             <div class="formula-list-box" v-for="(item,index) in innerFormulaList" :key="index"  @click="checkInnerList(item,index)">
-                                <span class="formula-list"  v-bind:class="{'span-select':index===nowIndex}"> {{'('+Number(index+1)+')'}}{{item.title}}</span> 
+                                <span class="formula-list"    v-if="item&&item['children']&&item['children'].length>0" v-bind:class="{'span-select':index===nowIndex}"> {{'('+Number(index+1)+')'}}{{item['children'][0]['name']}}</span> 
                                 <div class="formula-detail"   v-if="index===nowIndex">
-                                      <!-- <component ref="dynamiccomponent" v-bind:is="componentMap[item.name]" :formulainfo="item" :curele="equationSelectEle" :formulamap="formulaMap" @uncheck="unCheckEleComp" class="flex1"></component> -->
                                           <component 
+                                          style="font-size:12px"
                                           ref="dynamiccomponent" 
-                                          v-bind:is="'date-deviation'" 
-                                          :formulainfo="item" 
+                                          v-if="item&&item['children']&&item['children'].length>0"
+                                          v-bind:is="componentMap[item['children'][0]['name']]" 
+                                          :formulainfo="item['children'][0]" 
                                           :curele="equationSelectEle" 
                                           :formulamap="formulaMap" 
                                           @uncheck="unCheckEleComp" 
+                                          :isShow="false"
+                                          :inputSize="'small'"
                                           class="flex1">
                                           </component>
                                           <div class="formula-detail-element">
@@ -554,6 +557,7 @@ import {formulaArrayToString} from "./formulaArrayToString"
 import {formulaStringToArray} from "./formulaStringToArray"
 
 import draggable from 'vuedraggable'
+import { log } from '@antv/g2plot/lib/utils';
 
 export default {
   components: {
@@ -690,7 +694,7 @@ export default {
       elementTbinfo:false,
       istabinfo:false,
      stringTypeList:[],
-     checkFormula:[],
+     checkFormula:[{initTableName:''}],
      checkid:'',
      nowIndex:'',
      innerFormulaList:[
@@ -1166,7 +1170,11 @@ export default {
         this.processSelectIndex = index;
         this.processType = arrName;
         item.selected = true;
-        this.elementTbinfo=true
+        if(arrName==='resultFormula'){
+            this.elementTbinfo=true
+        }else{
+           this.elementTbinfo=false
+        }
 
         if(this.showFunDetail){
           //切到第一个
@@ -1176,6 +1184,7 @@ export default {
       }else{
         this.processType = '';
       }
+        this.innerFormulaList=this.processFormula//内部元素嵌套公式
     },
   //点选公式溯源公式
   equationClicksouce(item,index){
@@ -1183,6 +1192,8 @@ export default {
     this.nowtitleIndex=index;
     this.istabinfo=true;
     this.checkid=item.id
+  
+    console.log(this.processFormula,'this.processFormula');
     this.getEleDeatilList()
    
     
@@ -1468,8 +1479,6 @@ export default {
         //let formula = formulaStringToArray('FC.sum(FC.repeat(E[测试测试_222]))+FC.ifelse(3<E[测试测试_333]&&E[测试测试_333]<10,E[测试测试_222]+E[测试测试_333],E[测试测试_333])',detail.map,this.formulaMap);
         let formula = formulaStringToArray(detail.formula,detail.map,this.formulaMap);
         this.processFormula = formula.processFormula;
-        this.processFormula1=formula.processFormula;
-     
         formula.resultFormula[0].id = this.resultFormula[0].id;
         formula.resultFormula[0].name = this.resultFormula[0].name;
         formula.resultFormula[0].tableElementKey = this.resultFormula[0].tableElementKey;
@@ -1793,6 +1802,7 @@ export default {
               })
             }
           }
+          console.log( this.formulaList,' this.formulaList');
         }).finally(() => {
           resolve();
         })
@@ -1813,11 +1823,12 @@ export default {
          
       },
       checkInnerList(item,index){
+        console.log(item,'item');
         this.nowIndex=index
         // this.innerFormulaList.forEach((item)=>{
         //   item.selected=false
         // })
-        item.selected=!item.selected;
+       
       }
   }
 };