408249787 2 anni fa
parent
commit
dfbf6c85fd
1 ha cambiato i file con 6 aggiunte e 3 eliminazioni
  1. 6 3
      src/views/sb/info/modules/BaseFormLocation.vue

+ 6 - 3
src/views/sb/info/modules/BaseFormLocation.vue

@@ -13,7 +13,7 @@
         :columns="columns"
         :data-source="modal"
         bordered
-        :expanded-row-keys.sync="expandedRowKeys"
+        :defaultExpandAllRows="true"
       >
         <template v-slot:index="text,record,index">
           {{ index+1 }}
@@ -23,7 +23,7 @@
             {{ text }}
           </div>
           <div v-else>
-            <a-input v-if="record.isChild === 1" style="width: 150px" v-model="record.positionNo" />
+            <a-input v-if="record.isChild !== 1" style="width: 150px" v-model="record.positionNo" />
             <div v-else style="width:300px">
               <a-input
                 disabled
@@ -140,7 +140,10 @@ export default {
     base (record, type) {
       this.visible = true
       this.changeType = type
-      this.modal = record
+      this.modal = record.map(item => {
+        if (item.children.length === 0) item.children = null
+        return item
+      })
       console.log(this.modal)
       console.log(this.changeType)
     },