Преглед на файлове

Merge remote-tracking branch 'origin/demo_' into demo_

hfxc226 преди 2 години
родител
ревизия
2fde0d8062
променени са 1 файла, в които са добавени 7 реда и са изтрити 3 реда
  1. 7 3
      src/views/sb/info/modules/BaseFormLocation.vue

+ 7 - 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
@@ -82,6 +82,7 @@ export default {
         {
           title: '序号',
           key: 'index',
+          align: 'center',
           width: 50,
           scopedSlots: { customRender: 'index' }
         },
@@ -140,7 +141,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)
     },