Просмотр исходного кода

项目报告审核增加点击展开全部按钮

Lijy 2 лет назад
Родитель
Сommit
05e4cbd3c2

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/finance.vue

@@ -484,7 +484,7 @@
                 <el-button type="primary" @click="saveProjectSetting()" >{{ $t('btn.determine') }}</el-button>
             </div>
         </el-dialog>
-        <el-dialog title="$t('allocationdata')" v-if="intoAmortizationDialog" :visible.sync="intoAmortizationDialog" customClass="customWidth" width="500px">
+        <el-dialog :title="$t('allocationdata')" v-if="intoAmortizationDialog" :visible.sync="intoAmortizationDialog" customClass="customWidth" width="500px">
             <p>{{'1.' + $t('other.download')}}
             <el-link type="primary" style="margin-left:5px;" :underline="false" :href="'./upload/'+$t('allocationImporttemplates')+'.xlsx'" :download="$t('allocationImporttemplates') + '.xlsx'">{{$t('allocationImporttemplates')+'.xlsx'}}</el-link>
             </p>

+ 18 - 4
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list.vue

@@ -64,10 +64,13 @@
             </el-form>
         </el-col>
         <!--列表-->
-        <el-table :data="list" ref="multipleTable" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;"
-            @selection-change="handleSelectionChange">
+        <el-table :data="list" ref="multipleTable" v-if="showTable" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;"
+            @selection-change="handleSelectionChange" :default-expand-all="defaultExpandAllFlg">
             <el-table-column type="selection" width="55"></el-table-column>
-            <el-table-column type="expand">
+            <el-table-column type="expand" :label="''">
+                <template slot="header">
+                    <i :class="defaultExpandAllFlg ? 'el-icon-arrow-down' : 'el-icon-arrow-right'" style="cursor: pointer;" @click="defaultExpandAllFlgCli()"></i>
+                </template>
                 <template slot-scope="props">
                     <el-timeline>
                         <el-timeline-item v-for="(item,index) in props.row.data" :key="index">
@@ -468,7 +471,9 @@
 
                 approveinData: null,
                 approveinDialog: false,
-                isbatch: false
+                isbatch: false,
+                defaultExpandAllFlg: false,
+                showTable: true
             };
         },
         filters: {
@@ -949,6 +954,15 @@
                 this.search.userIdArray = arr
                 console.log(this.search.userIdArray, '数据看看')
                 this.usersSearch(false)
+            },
+            defaultExpandAllFlgCli() {
+                this.defaultExpandAllFlg = !this.defaultExpandAllFlg
+                this.list = JSON.parse(JSON.stringify(this.list))
+                this.$nextTick(()=>{this.$refs.multipleTable.doLayout()})
+                this.showTable = false
+                this.$nextTick(() => {
+                    this.showTable = true
+                })
             }
         },
         created() {