useGas.vue 5.7 KB

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