useGasCheck.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <!--用气审核-->
  2. <template>
  3. <div class="app-container approval_handle">
  4. <div class="approval_handle-page" v-if="pageType==1">
  5. <template>
  6. <el-tabs v-model="activeName" @tab-click="handleTabClick">
  7. <el-tab-pane :label="'待审核('+totalWait+')'" name="1"></el-tab-pane>
  8. <el-tab-pane :label="'已通过('+totalPass+')'" name="2"></el-tab-pane>
  9. <el-tab-pane :label="'未通过('+totalRefuse+')'" name="3"></el-tab-pane>
  10. </el-tabs>
  11. </template>
  12. <el-form :model="queryParams" ref="queryForm" style="margin-top:20px;" :inline="true">
  13. <el-form-item label="关键字" prop="safetyPrecautions" >
  14. <el-input v-model="queryParams.searchValue" placeholder="申请人/联系电话" maxlength="50" />
  15. </el-form-item>
  16. <el-form-item>
  17. <p class="inquire-button-one" @click="handleQuery">查询</p>
  18. <p class="reset-button-one" @click="resetQuery">重置</p>
  19. </el-form-item>
  20. </el-form>
  21. <el-table border v-loading="loading" :data="tableData">
  22. <el-table-column label="申请人" align="left" prop="applyUserName"/>
  23. <el-table-column label="联系方式" align="left" prop="applyUserPhone"></el-table-column>
  24. <el-table-column label="使用气体" align="left" prop="useGasName"></el-table-column>
  25. <el-table-column label="申请时间" align="left" prop="applyTime"></el-table-column>
  26. <el-table-column label="操作" align="left" class-name="small-padding fixed-width" width="120">
  27. <template slot-scope="scope">
  28. <div class="button-box">
  29. <p class="table-min-button"
  30. v-if="activeName==1"
  31. v-hasPermi="['airbottle:taskManage:query']"
  32. @click="handleClick('',scope.row,'check')"
  33. >审核</p>
  34. <p class="table-min-button"
  35. v-if="activeName==2 || activeName==3"
  36. v-hasPermi="['airbottle:taskManage:query']"
  37. @click="handleClick('',scope.row,'detail')"
  38. >详情</p>
  39. </div>
  40. </template>
  41. </el-table-column>
  42. </el-table>
  43. <pagination :page-sizes="[20, 30, 40, 50]"
  44. :total="total"
  45. layout="total, prev, pager, next, sizes, jumper"
  46. :page.sync="queryParams.pageNum"
  47. :limit.sync="queryParams.pageSize"
  48. @pagination="getList"
  49. />
  50. </div>
  51. <!--详情页面-->
  52. <detail-page v-if="pageType==2" :pageData2="pageData2"></detail-page>
  53. </div>
  54. </template>
  55. <script>
  56. import { usegasPassApplyList, usegasRefuseApplyList,
  57. usegasTitle,
  58. usegasWaitApplyList
  59. } from '@/api/gasManage3_0/gasManageSYD'
  60. import { getToken } from "@/utils/auth";
  61. import detailPage from '@/views/gasManage_syd/manage/useGasCheck/useGasCheckDetail'
  62. export default {
  63. name: "Approval",
  64. components: {
  65. detailPage
  66. },
  67. data() {
  68. return {
  69. activeName:'1',
  70. //页面状态
  71. pageType:1,
  72. loading:false,
  73. headers: {
  74. Authorization: "Bearer " + getToken()
  75. },
  76. // 查询参数
  77. queryParams: {
  78. pageNum: 1,
  79. pageSize:20,
  80. searchValue:'',
  81. },
  82. total:0,
  83. totalWait:0,
  84. totalPass:0,
  85. totalRefuse:0,
  86. tableData:[],
  87. dateRange:[],
  88. pageData2:{},
  89. form:{
  90. },
  91. rules:{
  92. txt:[
  93. {required: true, message: '请输入播放文字', trigger: 'blur'},
  94. { required: true, message: "请输入播放文字", validator: this.spaceJudgment, trigger: "blur" }
  95. ],
  96. },
  97. };
  98. },
  99. methods: {
  100. handleTabClick(tab, event) {
  101. // console.log(tab, event);
  102. console.log(this.activeName)
  103. this.getList()
  104. },
  105. handleClick(index,row,doType){
  106. let _this=this;
  107. if(doType=='check'){//审核
  108. this.pageType=2;
  109. _this.pageData2.status=0;
  110. _this.pageData2.item=row;
  111. }else if(doType=='detail'){//详情
  112. this.pageType=2;
  113. _this.pageData2.status=1;
  114. _this.pageData2.item=row;
  115. }else if(doType=='back'){//详情
  116. this.pageType=1;
  117. this.usegasTitle()
  118. this.getList()
  119. }
  120. },
  121. /** 搜索按钮操作 */
  122. handleQuery() {
  123. this.queryParams.pageNum = 1;
  124. this.getList();
  125. },
  126. /** 重置按钮操作 */
  127. resetQuery() {
  128. this.queryParams.searchValue = "";
  129. this.handleQuery();
  130. },
  131. // 取消按钮
  132. cancel() {
  133. this.form = {};
  134. this.dialogVisible = false;
  135. },
  136. /*提交*/
  137. submitForm(){
  138. this.$refs["form"].validate(valid => {
  139. if (valid) {
  140. let id = this.subId;
  141. }
  142. });
  143. },
  144. //tab头部数值
  145. usegasTitle(){
  146. usegasTitle().then( response => {
  147. let res=response.data;
  148. this.totalWait=res.waitApplyCount;
  149. this.totalPass=res.passApplyCount;
  150. this.totalRefuse=res.refuseApplyCount;
  151. });
  152. },
  153. getList(){
  154. let _this=this;
  155. if(this.activeName==1){
  156. usegasWaitApplyList(_this.queryParams).then( response => {
  157. let res=response.rows;
  158. _this.tableData=res;
  159. _this.total=response.total;
  160. });
  161. }else if(this.activeName==2){
  162. usegasPassApplyList(_this.queryParams).then( response => {
  163. let res=response.rows;
  164. _this.tableData=res;
  165. _this.total=response.total;
  166. });
  167. }else if(this.activeName==3){
  168. usegasRefuseApplyList(_this.queryParams).then( response => {
  169. let res=response.rows;
  170. _this.tableData=res;
  171. _this.total=response.total;
  172. });
  173. }
  174. },
  175. },
  176. mounted() {
  177. this.usegasTitle()
  178. this.getList()
  179. }
  180. };
  181. </script>
  182. <style scoped lang="scss">
  183. .approval_handle {
  184. display: flex!important;
  185. flex-direction: column;
  186. .approval_handle-page{
  187. flex:1;
  188. display: flex!important;
  189. flex-direction: column;
  190. box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
  191. padding:20px 20px 20px!important;
  192. border-radius:10px;
  193. .button-box{
  194. width:200px;
  195. display: flex;
  196. }
  197. }
  198. }
  199. </style>