duy 2 жил өмнө
parent
commit
4cc9ab9104

+ 15 - 9
src/views/formula/edit1.vue

@@ -160,7 +160,7 @@
                 <el-link :underline="false" type="primary" @click="addText">输入值</el-link>
               </div>
             </div>
-            <div class="border-grey sele-ele-box" style="height:50px">
+            <div class="border-grey sele-ele-box" >
               <draggable v-model="selectEleFormula">
                 <formula-item
                   v-for="(item,index) in selectEleFormula" :key="index"
@@ -172,8 +172,9 @@
           </el-col>
         </el-row>
         <div class="text-align-c">
-          <el-button size="small" @click="operationHandle" type="primary">保存</el-button>
           <el-button size="small" @click="canceloperationVisible ">取消</el-button>
+          <el-button size="small" @click="operationHandle" type="primary">保存</el-button>
+          
         </div>
       </div>
     </div>
@@ -953,12 +954,14 @@ export default {
         if(this.selectEleFormula.length != 0 && this.deleEleIndex < 0){
           let lastEle = this.selectEleFormula[this.selectEleFormula.length-1];
           if(lastEle.type == 'Element'){
-            this.$message({
-              type: "warning",
-              message: "元素无法连续出现在元素后面"
-            });
-            item.checked = false;
-            return;
+            // this.$message({
+            //   type: "warning",
+            //   message: "元素无法连续出现在元素后面"
+            // });
+            // item.checked = false;
+            // return;
+          
+             
           }
           if(lastEle.type == 'Text'){
             this.$message({
@@ -994,12 +997,14 @@ export default {
     },
     //快捷添加运算符号
     addOperator(operator){
+      console.log('点击加号');
+      console.log(this.selectEleFormula,'this.selectEleFormula11111111');
       this.eleAddFormulaHandle(this.formulaMap[operator]);
     },
 
     //把元素加到公式里
     eleAddFormulaHandle(ele){
-      console.log(ele.tableElementKey,'ele.tableElementKey');
+      console.log(ele,'ele.tableElementKey');
       if(ele.tableElementKey){
         //元素
         if(this.deleEleIndex > -1 && this.selectEleFormula.length-1 >= this.deleEleIndex){
@@ -1778,6 +1783,7 @@ export default {
 .sele-ele-box{
   height: 160px;
   padding: 20px;
+  overflow-y: auto;
   // margin-top: 10px;
 }