houzhongjian
2024-07-23 8501060c4f921d1e744c477e4dc08eb47b52693c
提交 | 用户 | 时间
850106 1 <template>
H 2   <div class="mod-any_proc_report">
3
4     <el-table
5         v-loading="dataListLoading"
6         :data="dataList"
7         border
8         @selection-change="dataListSelectionChangeHandle"
9         @sort-change="dataListSortChangeHandle"
10         style="width: 100%;">
11       <el-table-column type="index" header-align="center" align="center" width="50"></el-table-column>
12       <el-table-column prop="reportName" :label="$t('anyProcReport.reportName')" header-align="center"
13                        align="left"></el-table-column>
14       <el-table-column prop="reportDate" :label="$t('anyProcReport.reportDate')" header-align="center"
15                        align="left"></el-table-column>
16       <el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="80">
17         <template slot-scope="scope">
18           <el-button type="text" size="small" @click="viewReport(scope.row.id)">查看报告</el-button>
19         </template>
20       </el-table-column>
21     </el-table>
22     <el-pagination
23         :current-page="page"
24         :page-sizes="[10, 20, 50, 100]"
25         :page-size="limit"
26         :total="total"
27         layout="total, sizes, prev, pager, next, jumper"
28         @size-change="pageSizeChangeHandle"
29         @current-change="pageCurrentChangeHandle">
30     </el-pagination>
31
32     <!-- 弹窗, 详情 -->
33     <report-view v-if="reportViewVisible" ref="reportView"></report-view>
34   </div>
35 </template>
36 <script>
37   import mixinViewModule from '@/mixins/view-module'
38   import ReportView from './report-view'
39
40   export default {
41     name: 'AnyReport',
42     mixins: [mixinViewModule],
43     components: {ReportView},
44     props: {
45       procCode: String
46     },
47     data() {
48       return {
49         mixinViewModuleOptions: {
50           getDataListURL: '/iailab-ntt-model/any/proc-report/page',
51           getDataListIsPage: true,
52           deleteURL: '/iailab-ntt-model/any/proc-report',
53           deleteIsBatch: true
54         },
55         dataForm: {
56           procCode: '',
57           startTime: '',
58           endTime: '',
59         },
60         reportViewVisible: false
61       }
62     },
63     watch: {
64       procCode: {
65         immediate: true,
66         handler() {
67           this.dataForm.procCode = this.procCode
68           this.getDataList()
69         }
70       }
71
72     },
73     methods: {
74       viewReport(id) {
75         this.reportViewVisible = true;
76         this.$nextTick(() => {
77           this.$refs.reportView.dataForm.id = id
78           this.$refs.reportView.init();
79         });
80       }
81     },
82     computed: {
83       getProcCode() {
84         return this.procCode
85       }
86     }
87
88   }
89 </script>