checkConfigListPage.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <template>
  2. <div class="listPage">
  3. <div class="listPage-min" v-if="pageType == 1">
  4. <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
  5. <el-form-item label="检查项名称" prop="name" label-width="100px">
  6. <el-input
  7. v-model="queryParams.name"
  8. placeholder="请输入检查项名称"
  9. clearable
  10. size="small"
  11. />
  12. </el-form-item>
  13. <el-form-item>
  14. <p class="inquire-button-one" @click="handleQuery">查询</p>
  15. <p class="reset-button-one" @click="resetQuery">重置</p>
  16. </el-form-item>
  17. <el-form-item style="float: right">
  18. <el-col :span="1.5">
  19. <span class="reset-button-one"
  20. style="font-weight:700;margin-bottom:20px;"
  21. @click="backPage"><i class="el-icon-arrow-left"></i>返回</span>
  22. </el-col>
  23. </el-form-item>
  24. </el-form>
  25. <el-table v-loading="loading" border :data="checkOptionList">
  26. <el-table-column label="检查项名称" align="left" prop="name" />
  27. <el-table-column label="检查项" align="left" prop="parentNames">
  28. <template slot-scope="scope">{{scope.row.parentId == 0?'根目录':scope.row.parentNames}}</template>
  29. </el-table-column>
  30. <el-table-column label="检查人" align="left" prop="nickName" />
  31. <el-table-column label="检查时间" align="left" prop="createTime" />
  32. <el-table-column label="操作" align="left" class-name="small-padding fixed-width" width="120">
  33. <template slot-scope="scope">
  34. <div class="table-button-box">
  35. <p class="table-button-null"></p>
  36. <p class="table-button-p"
  37. @click="goInfo(scope.row)">查看</p>
  38. <p class="table-button-null"></p>
  39. </div>
  40. </template>
  41. </el-table-column>
  42. </el-table>
  43. <pagination
  44. style="margin-bottom:20px;"
  45. v-show="total>0"
  46. :total="total"
  47. :page.sync="queryParams.pageNum"
  48. :limit.sync="queryParams.pageSize"
  49. @pagination="getList"
  50. />
  51. </div>
  52. <check-record-info-page v-if="pageType == 2" :infoId="infoId"></check-record-info-page>
  53. </div>
  54. </template>
  55. <script>
  56. import { tempListCheckRecord,getCheckIdByoptionId } from "@/api/laboratory/checkRecord";
  57. import checkRecordInfoPage from "../checkRecord/checkRecordInfoPage.vue"
  58. export default {
  59. name: 'listPage',
  60. components: {
  61. checkRecordInfoPage
  62. },
  63. data() {
  64. return {
  65. pageType:1,
  66. infoId:"",
  67. loading:false,
  68. total:0,
  69. checkOptionList:[],
  70. // 查询参数
  71. queryParams: {
  72. pageNum: 1,
  73. pageSize:20,
  74. deptId: null,
  75. deptName: null,
  76. userId: null,
  77. name: null,
  78. parentId: null
  79. },
  80. }
  81. },
  82. mounted(){
  83. this.getList();
  84. },
  85. methods:{
  86. //页面状态切换
  87. goPageInfo(type){
  88. if(type == 1){
  89. this.pageType = 1;
  90. this.getList();
  91. }
  92. },
  93. //查看详情
  94. goInfo(row){
  95. console.log("row",row)
  96. getCheckIdByoptionId({jcxId:row.id}).then( response => {
  97. console.log("response",response)
  98. if(response.data.id == 0){
  99. this.msgError("该检查项没有相关检查记录")
  100. return
  101. }
  102. this.infoId = response.data.id;
  103. this.pageType = 2;
  104. });
  105. },
  106. //返回
  107. backPage(){
  108. this.$parent.goPageType(1);
  109. },
  110. /** 搜索按钮操作 */
  111. handleQuery() {
  112. this.queryParams.pageNum = 1;
  113. this.getList();
  114. },
  115. /** 重置按钮操作 */
  116. resetQuery() {
  117. // this.resetForm("queryForm");
  118. this.$set(this,'queryParams',{
  119. pageNum: 1,
  120. pageSize:20,
  121. name:"",
  122. });
  123. this.handleQuery();
  124. },
  125. /** 查询检查项选项列表 */
  126. getList() {
  127. this.loading = true;
  128. tempListCheckRecord(this.queryParams).then( response => {
  129. this.checkOptionList = response.rows;
  130. this.total = response.total;
  131. this.loading = false;
  132. });
  133. },
  134. }
  135. }
  136. </script>
  137. <style scoped lang="scss">
  138. .listPage{
  139. flex:1;
  140. display: flex;
  141. flex-direction: column;
  142. overflow: hidden;
  143. .listPage-min{
  144. flex:1;
  145. display: flex;
  146. flex-direction: column;
  147. overflow: hidden;
  148. }
  149. }
  150. </style>