Procházet zdrojové kódy

指标分类页面优化和bug调整

liusungtsun před 1 rokem
rodič
revize
35ac15a616
2 změnil soubory, kde provedl 13 přidání a 5 odebrání
  1. 4 1
      src/views/norm/feeindex.vue
  2. 9 4
      src/views/norm/formula.vue

+ 4 - 1
src/views/norm/feeindex.vue

@@ -272,7 +272,7 @@
       </el-dialog>
     </div>
 
-    <formula @closeFormulaHandler="closeFormulaHandler" @dataFormulaHandler="dataFormulaHandler" :id="id" :normId="normId" reset :isShowFormulaDialog="isShowFormulaDialog" />
+    <formula @closeFormulaHandler="closeFormulaHandler" ref="formula" @dataFormulaHandler="dataFormulaHandler"  :id="id" :normId="normId" reset :isShowFormulaDialog="isShowFormulaDialog" />
 
   </el-dialog>
 </template>
@@ -422,6 +422,9 @@ export default {
     formulaDialog(id,formula) {
       this.isShowFormulaDialog = true;
       this.id = id;
+      // formula使用props传值有延迟,使用ref传入
+      this.$refs.formula.init(formula)
+      
     },
     dataFormulaHandler(data) {
       this.isShowFormulaDialog = false;

+ 9 - 4
src/views/norm/formula.vue

@@ -112,7 +112,7 @@
 
     <div slot="footer" class="dialog-footer">
       <el-button type="primary" @click="submit">确 定</el-button>
-      <el-button @click="cancel">取 消</el-button>
+      <el-button @click="closeFormulaHandler">取 消</el-button>
     </div>
   </el-dialog>
 </template>
@@ -178,6 +178,7 @@
         default: () => {
           return null;
         },
+
       },
     },
     mounted() {
@@ -187,8 +188,15 @@
         });
         this.NORMFEEList = response.rows;
       });
+      
     },
     methods: {
+      // formula使用props传值有延迟,使用ref传入
+      init(formula) {
+        if(formula) {
+          this.number_input = formula
+        }
+      },
       close () {
         this.addMetadataSelect = [];
         this.no_show_number_input = '';
@@ -197,9 +205,6 @@
       closeFormulaHandler() {
         this.$emit("closeFormulaHandler");
       },
-      cancel() {
-        this.isShowFormulaDialog = false;
-      },
       // 回删功能
       number_input_delete() {
         this.number_input = this.number_input.replace(/.$/, '')