useGas.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <!--用气申请-->
  2. <template>
  3. <div class="app-container approval_handle">
  4. <div class="approval_handle-page" v-if="pageType == 1">
  5. <div class="top-click-img-box">
  6. <img src="@/assets/ZDimages/icon_banner_yqsq.png" alt="">
  7. <p v-hasPermi="['airbottle:useAgsApplyManage:add']" @click="handleClick('','','apply')">开始申请</p>
  8. </div>
  9. <el-form :model="queryParams" ref="queryForm" style="margin-top:20px;" :inline="true">
  10. <el-form-item label="状态" prop="zgType" label-width="80px">
  11. <el-select v-model="queryParams.auditStatus" placeholder="请选择" clearable size="small">
  12. <el-option label="待审核" value="0" />
  13. <el-option label="已通过" value="1" />
  14. <el-option label="未通过" value="2" />
  15. </el-select>
  16. </el-form-item>
  17. <el-form-item>
  18. <p class="inquire-button-one" @click="handleQuery">查询</p>
  19. <p class="reset-button-one" @click="resetQuery">重置</p>
  20. </el-form-item>
  21. </el-form>
  22. <el-table border v-loading="loading" :data="tableData">
  23. <el-table-column label="申请实验室" align="left" prop="location"/>
  24. <el-table-column label="申请时间" align="left" prop="createTime"></el-table-column>
  25. <el-table-column label="使用气体" align="left" prop="useGasName"></el-table-column>
  26. <el-table-column label="使用期限" align="left" prop="startTime">
  27. <template slot-scope="scope">
  28. {{scope.row.startTime}}至{{scope.row.endTime}}
  29. </template>
  30. </el-table-column>
  31. <el-table-column label="状态" align="left" prop="auditStatus">
  32. <template slot-scope="scope">
  33. <p :class="scope.row.remark == 0?'color_warn':(scope.row.remark == 1?'color_14AE10':(scope.row.remark == 2?'color_red':''))">{{scope.row.remark == 0?'待审核':(scope.row.remark == 1?'通过':(scope.row.remark == 2?'驳回':''))}}</p>
  34. </template>
  35. </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="table-button-box">
  39. <p class="table-button-null"></p>
  40. <p class="table-button-p"
  41. v-hasPermi="['airbottle:useAgsApplyManage:query']"
  42. @click="handleClick('',scope.row,'detail')"
  43. >查看</p>
  44. <p class="table-button-null"></p>
  45. </div>
  46. </template>
  47. </el-table-column>
  48. </el-table>
  49. <pagination :page-sizes="[20, 30, 40, 50]"
  50. :total="total"
  51. layout="total, prev, pager, next, sizes, jumper"
  52. :page.sync="queryParams.pageNum"
  53. :limit.sync="queryParams.pageSize"
  54. @pagination="getList"
  55. />
  56. </div>
  57. <!--添加页面-->
  58. <add-page v-if="pageType==2" :pageData="pageData"></add-page>
  59. <!--详情页面-->
  60. <detail-page v-if="pageType==3" :pageData2="pageData2"></detail-page>
  61. </div>
  62. </template>
  63. <script>
  64. import { useAgsApplyList,} from '@/api/gasManage3_0/gasManage'
  65. import { getToken } from "@/utils/auth";
  66. import addPage from "./useGasAdd.vue"
  67. import detailPage from "./useGasDetail.vue"
  68. export default {
  69. name: "Approval",
  70. components: {
  71. addPage,
  72. detailPage
  73. },
  74. data() {
  75. return {
  76. //页面状态
  77. pageType:1,
  78. loading:false,
  79. headers: {
  80. Authorization: "Bearer " + getToken()
  81. },
  82. // 查询参数
  83. queryParams: {
  84. pageNum: 1,
  85. pageSize:20,
  86. auditStatus:'',
  87. },
  88. total:0,
  89. tableData:[],
  90. pageData:{},//0添加1编辑
  91. pageData2:{},
  92. };
  93. },
  94. methods: {
  95. handleClick(index,row,doType){
  96. let _this=this;
  97. if(doType=='apply'){//申请
  98. _this.pageData.status=0;
  99. _this.pageType=2;
  100. }else if(doType=='detail'){//查看
  101. _this.pageData2.id=row.id;
  102. _this.pageData2.remark=row.remark;
  103. _this.pageType=3;
  104. }else if(doType=='back'){//返回
  105. _this.pageType=1;
  106. }else if(doType=='again'){//重新申请
  107. _this.pageType=2;
  108. _this.pageData.status=1;
  109. _this.pageData.id=row;
  110. }
  111. },
  112. /** 搜索按钮操作 */
  113. handleQuery() {
  114. this.queryParams.pageNum = 1;
  115. this.getList();
  116. },
  117. /** 重置按钮操作 */
  118. resetQuery() {
  119. this.queryParams.auditStatus = "";
  120. this.handleQuery();
  121. },
  122. getList(){
  123. let _this=this;
  124. useAgsApplyList(_this.queryParams).then( response => {
  125. let res=response.rows;
  126. _this.tableData=res;
  127. _this.total=response.total;
  128. });
  129. },
  130. },
  131. mounted() {
  132. this.getList()
  133. }
  134. };
  135. </script>
  136. <style scoped lang="scss">
  137. .approval_handle {
  138. display: flex!important;
  139. flex-direction: column;
  140. .approval_handle-page{
  141. flex:1;
  142. display: flex!important;
  143. flex-direction: column;
  144. box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
  145. padding:20px 20px 20px!important;
  146. border-radius:10px;
  147. .top-click-img-box{
  148. width:1536px;
  149. height:250px;
  150. margin:0 auto 20px;
  151. position: relative;
  152. img{
  153. width:1536px;
  154. height:250px;
  155. }
  156. p{
  157. margin:0;
  158. position: absolute;
  159. left:294px;
  160. bottom:24px;
  161. width:200px;
  162. height:50px;
  163. border-radius:25px;
  164. line-height:50px;
  165. font-size:24px;
  166. text-align: center;
  167. color:#fff;
  168. font-weight: 500;
  169. border: 1px solid #69eeff;
  170. cursor: pointer;
  171. }
  172. }
  173. .form-box{
  174. }
  175. .button-box{
  176. width:200px;
  177. display: flex;
  178. }
  179. }
  180. }
  181. </style>