useGasCheckDetail.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. <!--用气审核-详情-->
  2. <template>
  3. <div class="addPage">
  4. <div class="addPage_title">
  5. <p>用气资格详情</p>
  6. <p class="reset-button-one" @click="backPage">返回</p>
  7. </div>
  8. <!--基本信息-->
  9. <div class="info" v-if="form">
  10. <li><i>申请人:</i><i>{{form.applyUserName}}</i></li>
  11. <li><i>联系方式:</i><i>{{form.applyUserPhone}}</i></li>
  12. <li><i>使用气体:</i><i>{{form.useGasName}}</i></li>
  13. <li><i>使用期限:</i><i>{{form.startTime}} 至 {{form.endTime}}</i></li>
  14. <li><i>气瓶用途:</i><i>{{form.gasUse}}</i></li>
  15. <li><i>主要安全措施:</i><i>{{form.safetyPrecautions}}</i></li>
  16. <li class="look_img" @click="lookFile(form.applyCertificate)"><i>用气申请表:</i><i>查看图片</i></li>
  17. <!-- <a :href="lookImgUrl+form.applyCertificate"></a>-->
  18. </div>
  19. <div class="check_btn" v-if="status==0">
  20. <el-input type="textarea" class="apply_tree_b2" v-model="queryParams.remark" placeholder="请输入审核意见" maxlength="200" />
  21. <div class="sub_btn">
  22. <p class="reset-button-one" style="width:150px;margin-right: 30px" @click="handleClick('','','reject')">审核驳回</p>
  23. <p class="inquire-button-one" style="width:150px;" @click="handleClick('','','pass')">审核通过</p>
  24. </div>
  25. </div>
  26. <div class="addPage_b" v-if="tableData">
  27. <!--气瓶信息-->
  28. <div class="addPage_b_t">
  29. <div class="addPage_b_t_title">审核记录</div>
  30. <el-table border v-loading="loading" :data="tableData" height="300px">
  31. <el-table-column label="审核人" align="left" prop="auditUser"/>
  32. <el-table-column label="审核时间" align="left" prop="auditTime"></el-table-column>
  33. <el-table-column label="审核操作" align="left" prop="auditStatus">
  34. <template slot-scope="scope">
  35. <p :class="scope.row.auditStatus == 0?'color_warn':(scope.row.auditStatus == 1?'color_14AE10':(scope.row.auditStatus == 2?'color_red':''))">{{scope.row.auditStatus == 0?'待审核':(scope.row.auditStatus == 1?'已通过':(scope.row.auditStatus == 2?'未通过':''))}}</p>
  36. </template>
  37. </el-table-column>
  38. <el-table-column label="审核说明" align="left" prop="remark"></el-table-column>
  39. </el-table>
  40. </div>
  41. </div>
  42. </div>
  43. </template>
  44. <script>
  45. import { getToken } from "@/utils/auth";
  46. import {
  47. qualificationApplyDetail,
  48. qualificationApplyList,
  49. subjectList,
  50. useAgsApplyDetail
  51. } from '@/api/gasManage3_0/gasManage'
  52. import { usegasAuditRecordList, usegasCheck } from '@/api/gasManage3_0/gasManageSYD'
  53. let Base64 = require('js-base64').Base64;
  54. export default {
  55. name: "addPage",
  56. props:{
  57. pageData2: {},
  58. },
  59. data() {
  60. return {
  61. lookImgUrl: window.location.href.split('://')[0]+'://' + this.judgmentNetworkReturnAddress(), // 图片服务器地址
  62. pageType:1,
  63. headers: {
  64. Authorization: "Bearer " + getToken(),
  65. },
  66. loading:false,
  67. form:{
  68. },
  69. status:0,
  70. total:0,
  71. tableData:[],
  72. queryParams:{
  73. usegasApplyId:'',
  74. remark:'',
  75. auditStatus:'',//0未审核1.通过 2.驳回
  76. }
  77. };
  78. },
  79. methods: {
  80. handleClick(index,row,doType){
  81. let _this=this;
  82. _this.queryParams.usegasApplyId=_this.form.id
  83. if(doType=='pass'){//审核通过
  84. _this.queryParams.auditStatus=1
  85. _this.usegasCheck()
  86. }else if(doType=='reject'){//审核驳回
  87. _this.queryParams.auditStatus=2
  88. _this.usegasCheck()
  89. }
  90. },
  91. /**查看图片 */
  92. lookFile(item){
  93. let visitUrl=window.location.href.split('://')[0]+'://'+this.judgmentNetworkReturnAddress()+'/admin/'+item;
  94. console.log(visitUrl)
  95. window.open(localStorage.getItem('filePreviewUrl') + '/onlinePreview?url='+encodeURIComponent(Base64.encode(visitUrl)));
  96. },
  97. //审核
  98. usegasCheck(){
  99. let _this=this;
  100. usegasCheck(_this.queryParams).then( response => {
  101. let res=response.data;
  102. if(response.code==200){
  103. this.$parent.handleClick('','','back');
  104. }
  105. });
  106. },
  107. /* 审核记录 */
  108. getRecordList(id){
  109. let _this=this;
  110. usegasAuditRecordList({usegasApplyId:id}).then( response => {
  111. let res=response.rows;
  112. _this.tableData=res;
  113. });
  114. },
  115. //返回
  116. backPage(){
  117. this.$parent.handleClick('','','back');
  118. },
  119. },
  120. mounted() {
  121. this.status=this.pageData2.status;
  122. this.form=this.pageData2.item;
  123. this.getRecordList(this.pageData2.item.id);
  124. }
  125. };
  126. </script>
  127. <style scoped lang="scss">
  128. .addPage {
  129. flex:1;
  130. display: flex!important;
  131. flex-direction: column;
  132. box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
  133. border-radius:10px;
  134. /*顶部*/
  135. .addPage_title{
  136. display: flex;
  137. justify-content: space-between;
  138. align-items: center;
  139. border-bottom: 1px solid #E0E0E0;
  140. padding-top:20px;
  141. p:nth-child(1){
  142. flex: 1;
  143. line-height:60px;
  144. color: #0045AF;
  145. font-size:18px;
  146. margin:0 12px 0 20px;
  147. }
  148. p:nth-child(2){
  149. margin-right:20px;
  150. }
  151. p:nth-child(3){
  152. margin-right:20px;
  153. }
  154. }
  155. /*基本信息*/
  156. .info{
  157. display: flex;
  158. justify-content: flex-start;
  159. flex-wrap: wrap;
  160. >li{
  161. list-style-type: none;
  162. margin: 20px 0;
  163. >i{
  164. font-style: normal;
  165. display: inline-block;
  166. vertical-align:text-top;
  167. }
  168. >i:nth-of-type(1){
  169. font-size: 16px;
  170. font-family: Microsoft YaHei;
  171. font-weight: 400;
  172. color: #999999;
  173. line-height: 16px;
  174. width: 120px;
  175. text-align: right;
  176. }
  177. >i:nth-of-type(2){
  178. font-size: 16px;
  179. font-family: Microsoft YaHei;
  180. font-weight: 400;
  181. color: #333333;
  182. line-height: 16px;
  183. width: 240px;
  184. text-align: left;
  185. }
  186. }
  187. .look_img{
  188. cursor: pointer;
  189. >i:nth-of-type(2){
  190. color: #0183FA;
  191. }
  192. }
  193. }
  194. /*审核按钮*/
  195. .check_btn{
  196. text-align: center;
  197. .apply_tree_b2{
  198. width: 90%;
  199. margin: 46px 30px 38px 30px;
  200. }
  201. .sub_btn{
  202. display: flex;
  203. justify-content: center;
  204. margin: 30px 0;
  205. }
  206. }
  207. .addPage_b{
  208. /*气瓶信息*/
  209. .addPage_b_t{
  210. padding: 0 20px;
  211. box-sizing: border-box;
  212. .addPage_b_t_title{
  213. font-size: 16px;
  214. font-family: Microsoft YaHei;
  215. font-weight: bold;
  216. color: #333333;
  217. line-height: 16px;
  218. margin: 40px 0 30px 0;
  219. }
  220. }
  221. }
  222. }
  223. </style>