draftPage.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <!--草稿箱-->
  2. <template>
  3. <div class="draftPage">
  4. <div class="draftPage-min">
  5. <el-form :model="queryParamsData" class="form-box" ref="queryForm" :inline="true">
  6. <el-form-item label="关键字" prop="searchValue">
  7. <el-input
  8. style="width:210px;"
  9. maxLength="30"
  10. v-model="queryParamsData.searchValue"
  11. placeholder="编号/化学品名/实验室"
  12. clearable
  13. size="small"
  14. />
  15. </el-form-item>
  16. <el-form-item label="创建时间" prop="terminalStatus">
  17. <el-date-picker
  18. :clearable="false"
  19. v-model="dateRange"
  20. size="small"
  21. style="width: 220px"
  22. value-format="yyyy-MM-dd"
  23. type="daterange"
  24. range-separator="-"
  25. start-placeholder="开始日期"
  26. end-placeholder="结束日期"
  27. ></el-date-picker>
  28. </el-form-item>
  29. <el-form-item>
  30. <p class="inquire-button-one" @click="handleQuery" style="margin-right:10px;">查询</p>
  31. <p class="reset-button-one" @click="resetQuery">重置</p>
  32. </el-form-item>
  33. <el-form-item style="float: right;">
  34. <el-col :span="1.5">
  35. <p class="reset-button-one"
  36. @click="backPage"
  37. >返回</p>
  38. </el-col>
  39. </el-form-item>
  40. </el-form>
  41. <el-table border :data="tableList"ref="multipleTable">
  42. <el-table-column label="申购编号" align="center" prop="applyNum" width="210" show-overflow-tooltip/>
  43. <el-table-column label="实验室" align="center" prop="subName" width="307" show-overflow-tooltip/>
  44. <el-table-column label="申购信息" align="center" prop="chemicalNames" show-overflow-tooltip/>
  45. <el-table-column label="创建时间" align="center" prop="createTime" width="200" show-overflow-tooltip/>
  46. <el-table-column label="操作" align="center" prop="operator" width="130">
  47. <template slot-scope="scope">
  48. <div class="button-box">
  49. <p class="table-min-button"
  50. style="margin:0!important;"
  51. @click="goPageInfo(2,scope.row)"
  52. >编辑</p>
  53. <p class="table-min-button"
  54. style="margin:0!important;"
  55. @click="goPageInfo(2,scope.row)"
  56. >删除</p>
  57. </div>
  58. </template>
  59. </el-table-column>
  60. </el-table>
  61. <pagination
  62. v-show="total>0"
  63. :total="total"
  64. :page-sizes="[20, 30, 40, 50]"
  65. :page.sync="queryParams.pageNum"
  66. :limit.sync="queryParams.pageSize"
  67. @pagination="getList"
  68. />
  69. </div>
  70. </div>
  71. </template>
  72. <script>
  73. import { getHxpapplyMyDraftsList } from "@/api/studentApi/chemicalManagement/index";
  74. export default {
  75. name: "draftPage",
  76. data(){
  77. return{
  78. // 遮罩层
  79. loading:false,
  80. //页面状态
  81. pageType:1,
  82. // 创建时间
  83. dateRange:[],
  84. // 搜索数据
  85. queryParamsData:{
  86. pageNum:1,
  87. pageSize:20,
  88. },
  89. // 搜索实际发送数据
  90. queryParams:{
  91. pageNum:1,
  92. pageSize:20,
  93. },
  94. //数据数量
  95. total:0,
  96. //数据数组
  97. tableList:[],
  98. }
  99. },
  100. created() {
  101. },
  102. mounted(){
  103. this.getList();
  104. },
  105. methods: {
  106. //获取数据列表
  107. getList(){
  108. this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
  109. if(this.dateRange[0]){
  110. this.queryParamsData.beginCreateTime = this.dateRange[0];
  111. this.queryParamsData.endCreateTime = this.dateRange[1];
  112. }else {
  113. this.queryParamsData.beginCreateTime = null
  114. this.queryParamsData.endCreateTime = null
  115. }
  116. getHxpapplyMyDraftsList(this.queryParamsData).then(response => {
  117. this.total = response.total;
  118. this.tableList = response.rows;
  119. });
  120. },
  121. /** 搜索按钮操作 */
  122. handleQuery() {
  123. this.queryParamsData.pageNum = 1;
  124. this.queryParamsData.pageSize = 20;
  125. this.queryParams = JSON.parse(JSON.stringify(this.queryParamsData));
  126. this.getList();
  127. },
  128. /** 重置按钮操作 */
  129. resetQuery() {
  130. this.$set(this,'queryParamsData',{});
  131. this.$set(this,'queryParams',{});
  132. this.$set(this,'dateRange',[]);
  133. this.handleQuery();
  134. },
  135. //返回
  136. backPage(){
  137. this.$parent.pageToggle(1);
  138. },
  139. }
  140. }
  141. </script>
  142. <style scoped lang="scss">
  143. .draftPage{
  144. flex:1;
  145. display: flex;
  146. flex-direction: column;
  147. overflow: hidden;
  148. p{
  149. margin:0;
  150. padding:0;
  151. }
  152. .draftPage-min{
  153. flex:1;
  154. display: flex;
  155. flex-direction: column;
  156. overflow: hidden;
  157. padding:20px;
  158. .button-box{
  159. display: flex;
  160. }
  161. }
  162. }
  163. </style>