Răsfoiți Sursa

禅道687,优化

gangyj 2 ani în urmă
părinte
comite
fb360c9d04
1 a modificat fișierele cu 23 adăugiri și 11 ștergeri
  1. 23 11
      src/views/exctab/ElementIdentification/index.vue

+ 23 - 11
src/views/exctab/ElementIdentification/index.vue

@@ -82,12 +82,20 @@
                 style="overflow:auto;height:100%;"
               >
                 <div class="flexBetween flexItemsC">
-                  <el-button
-                    type="info"
-                    size="mini"
-                    :disabled="from.id==''"
-                    @click="automaticRecognition"
-                  >自动识别</el-button>
+                  <div>
+                    <el-button
+                      type="info"
+                      size="mini"
+                      :disabled="from.id==''"
+                      @click="automaticRecognition"
+                    >自动识别</el-button>
+                    <el-button
+                      type="success"
+                      size="mini"
+                      @click="establish()"
+                      :disabled="from.id==''"
+                    >关联WBS并创建元素</el-button>
+                  </div>
                   <div
                     class="el-icon-plus"
                     @click="pushTableData"
@@ -155,12 +163,12 @@
                     </template>
                   </el-table-column>
                 </el-table>
-                <el-button
+                <!-- <el-button
                   type="success"
                   class="martop20 dingwei"
                   @click="establish()"
                   :disabled="from.id==''"
-                >关联WBS并创建元素</el-button>
+                >关联WBS并创建元素</el-button> -->
               </el-col>
             </el-row>
           </div>
@@ -438,7 +446,7 @@ export default {
     },
     pushTableData () {//
       if (this.from.id) {
-        this.tableData.push({
+        this.tableData.unshift({
           eName: '',
           eType: 1,
           eAllowDeviation: ''
@@ -530,8 +538,12 @@ export default {
       this.addElementForm.wbsId = '';
       this.addElementForm.tableType = '';
       this.addElementForm.tableOwner = '';
-      this.$refs.tree.setCheckedKeys([]);
-      this.$refs.tree.setCurrentKey(null);
+
+      if(this.$refs.tree){
+        this.$refs.tree.setCheckedKeys([]);
+        this.$refs.tree.setCurrentKey(null);
+      }
+      
 
       this.addTableData = []
       this.AssociatedPublicTap = false