planExecuteRecord.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <!--预案执行记录-->
  2. <template>
  3. <div class="app-container approval_handle">
  4. <div class="approval_handle-page" v-if="pageType == 1">
  5. <el-form :model="queryParams" ref="queryForm" style="margin-top:20px;" :inline="true">
  6. <el-form-item label="关键字" prop="name">
  7. <el-input
  8. v-model="queryParams.searchValue"
  9. placeholder="预案名称/实验室"
  10. clearable
  11. maxLength="30"
  12. size="small"
  13. />
  14. </el-form-item>
  15. <el-form-item label="预案属性" prop="zgType" label-width="80px">
  16. <el-select v-model="queryParams.riskAttribute" placeholder="请选择" clearable size="small">
  17. <el-option label="全部" value="" />
  18. <el-option label="火灾预案" value="1" />
  19. <el-option label="非火灾预案" value="2" />
  20. </el-select>
  21. </el-form-item>
  22. <el-form-item>
  23. <p class="inquire-button-one" @click="handleQuery">查询</p>
  24. <p class="reset-button-one" @click="resetQuery">重置</p>
  25. </el-form-item>
  26. </el-form>
  27. <el-table border v-loading="loading" :data="tableData">
  28. <el-table-column label="预案名称" align="left" prop="groupName"/>
  29. <el-table-column label="实验室名称" align="left" prop="subjectName"></el-table-column>
  30. <el-table-column label="预案属性" align="left" prop="riskAttribute">
  31. <template slot-scope="scope">
  32. <span>{{scope.row.riskAttribute==1?'火灾预案':(scope.row.riskAttribute==2?'非火灾预案':'')}}</span>
  33. </template>
  34. </el-table-column>
  35. <el-table-column label="预案发生时间" align="left" prop="createTime"></el-table-column>
  36. <el-table-column label="操作" align="left" class-name="small-padding fixed-width" width="120">
  37. <template slot-scope="scope">
  38. <div class="button-box">
  39. <p class="table-min-button" v-hasPermi="['laboratory:hardware5:edit']" @click="handleClick('',scope.row,'detail')">查看</p>
  40. </div>
  41. </template>
  42. </el-table-column>
  43. </el-table>
  44. <pagination
  45. :total="total"
  46. layout="total, prev, pager, next, sizes, jumper"
  47. :page.sync="queryParams.pageNum"
  48. :limit.sync="queryParams.pageSize"
  49. @pagination="getList"
  50. />
  51. </div>
  52. <!--详情页面-->
  53. <detail-page v-if="pageType==2" :pageData="pageData"></detail-page>
  54. </div>
  55. </template>
  56. <script>
  57. import {
  58. riskExeRecordList,
  59. } from '@/api/laboratory/subject'
  60. import detailPage from "./planExecuteRecordDetail"
  61. export default {
  62. name: "Approval",
  63. components: {
  64. detailPage
  65. },
  66. data() {
  67. return {
  68. dialogVisible :false,
  69. //页面状态
  70. pageType:1,
  71. loading:false,
  72. // 查询参数
  73. queryParams: {
  74. pageNum: 1,
  75. pageSize:20,
  76. searchValue:'',
  77. riskAttribute:'',
  78. },
  79. form:{
  80. tagCode:'',
  81. },
  82. total:0,
  83. pageData:{},
  84. tableData:[],
  85. };
  86. },
  87. methods: {
  88. handleClick(index,row,doType){
  89. let _this=this;
  90. if(doType=='detail'){//详情
  91. _this.pageType=2;
  92. _this.pageData=row;
  93. }else if(doType=='back'){//返回
  94. _this.pageType=1;
  95. }
  96. },
  97. /** 搜索按钮操作 */
  98. handleQuery() {
  99. this.queryParams.pageNum = 1;
  100. this.getList();
  101. },
  102. /** 重置按钮操作 */
  103. resetQuery() {
  104. this.queryParams.searchValue = "";
  105. this.queryParams.riskAttribute = "";
  106. this.handleQuery();
  107. },
  108. getList(){
  109. let _this=this;
  110. riskExeRecordList(_this.queryParams).then( response => {
  111. let res=response.rows;
  112. _this.tableData=res;
  113. _this.total=response.total;
  114. });
  115. },
  116. },
  117. mounted() {
  118. this.getList();
  119. }
  120. };
  121. </script>
  122. <style scoped lang="scss">
  123. .approval_handle {
  124. display: flex!important;
  125. flex-direction: column;
  126. overflow: hidden;
  127. .approval_handle-page{
  128. flex:1;
  129. display: flex!important;
  130. flex-direction: column;
  131. box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
  132. padding:20px 20px 20px!important;
  133. border-radius:10px;
  134. overflow: hidden;
  135. .button-box{
  136. width:200px;
  137. display: flex;
  138. }
  139. }
  140. .entering_t{
  141. font-size: 16px;
  142. font-family: Microsoft YaHei;
  143. font-weight: 400;
  144. color: #333333;
  145. line-height: 16px;
  146. margin: 36px auto 25px;
  147. text-align: center;
  148. }
  149. .entering_img{
  150. width: 288px;
  151. height: 140px;
  152. }
  153. .entering_input{
  154. width: 288px;
  155. }
  156. }
  157. </style>