123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188 |
- <!--用气审核-->
- <template>
- <div class="app-container approval_handle">
- <div class="approval_handle-page" v-if="pageType==1">
- <template>
- <el-tabs v-model="activeName" @tab-click="handleTabClick">
- <el-tab-pane label="待审核(10)" name="1"></el-tab-pane>
- <el-tab-pane label="已通过(99)" name="2"></el-tab-pane>
- <el-tab-pane label="未通过(9)" name="3"></el-tab-pane>
- </el-tabs>
- </template>
- <el-form :model="queryParams" ref="queryForm" style="margin-top:20px;" :inline="true">
- <el-form-item label="关键字" prop="safetyPrecautions" >
- <el-input v-model="form.safetyPrecautions" placeholder="申请人/联系电话" maxlength="50" />
- </el-form-item>
- <el-form-item>
- <p class="inquire-button-one" @click="handleQuery">查询</p>
- <p class="reset-button-one" @click="resetQuery">重置</p>
- </el-form-item>
- </el-form>
- <el-table border v-loading="loading" :data="tableData">
- <el-table-column label="申请人" align="left" prop="location"/>
- <el-table-column label="联系方式" align="left" prop="createTime"></el-table-column>
- <el-table-column label="使用气体" align="left" prop="createTime"></el-table-column>
- <el-table-column label="申请时间" align="left" prop="createTime"></el-table-column>
- <el-table-column label="操作" align="left" class-name="small-padding fixed-width" width="120">
- <template slot-scope="scope">
- <div class="button-box">
- <p class="table-min-button"
- v-if="activeName==1"
- v-hasPermi="['airbottle:taskManage:query']"
- @click="handleClick('',scope.row,'check')"
- >审核</p>
- <p class="table-min-button"
- v-if="activeName==2 || activeName==3"
- v-hasPermi="['airbottle:taskManage:query']"
- @click="handleClick('',scope.row,'detail')"
- >详情</p>
- </div>
- </template>
- </el-table-column>
- </el-table>
- <pagination :page-sizes="[20, 30, 40, 50]"
- :total="total"
- layout="total, prev, pager, next, sizes, jumper"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
- @pagination="getList"
- />
- </div>
- <!--详情页面-->
- <detail-page v-if="pageType==2" :pageData2="pageData2"></detail-page>
- </div>
- </template>
- <script>
- import { gasApplyList, } from '@/api/gasManage3_0/gasManage'
- import { getToken } from "@/utils/auth";
- import detailPage from '@/views/gasManage_syd/useGasCheck/useGasCheckDetail'
- export default {
- name: "Approval",
- components: {
- detailPage
- },
- data() {
- return {
- activeName:'1',
- //页面状态
- pageType:1,
- loading:false,
- headers: {
- Authorization: "Bearer " + getToken()
- },
- // 查询参数
- queryParams: {
- pageNum: 1,
- pageSize:20,
- remark:'login',
- searchValue:'',
- startTime:'',
- endTime:'',
- },
- total:0,
- tableData:[{}],
- dateRange:[],
- pageData2:{},
- form:{
- },
- rules:{
- txt:[
- {required: true, message: '请输入播放文字', trigger: 'blur'},
- { required: true, message: "请输入播放文字", validator: this.spaceJudgment, trigger: "blur" }
- ],
- },
- };
- },
- methods: {
- handleTabClick(tab, event) {
- console.log(tab, event);
- },
- handleClick(index,row,doType){
- let _this=this;
- if(doType=='check'){//审核
- this.pageType=2;
- _this.pageData2.status=0;
- _this.pageData2.id=row.id;
- }else if(doType=='detail'){//详情
- this.pageType=2;
- _this.pageData2.status=1;
- _this.pageData2.id=row.id;
- }else if(doType=='back'){//详情
- this.pageType=1;
- }
- },
- /** 搜索按钮操作 */
- handleQuery() {
- this.queryParams.pageNum = 1;
- this.getList();
- },
- /** 重置按钮操作 */
- resetQuery() {
- this.queryParams.searchValue = "";
- this.dateRange=[];
- this.queryParams.startTime=null;
- this.queryParams.endTime=null
- this.handleQuery();
- },
- // 取消按钮
- cancel() {
- this.form = {};
- this.dialogVisible = false;
- },
- /*提交*/
- submitForm(){
- this.$refs["form"].validate(valid => {
- if (valid) {
- let id = this.subId;
- }
- });
- },
- getList(){
- let _this=this;
- if(this.dateRange&&this.dateRange.length>0) {
- this.queryParams.startTime=this.dateRange[0]
- this.queryParams.endTime=this.dateRange[1]
- } else {
- this.queryParams.startTime=null;
- this.queryParams.endTime=null
- }
- gasApplyList(_this.queryParams).then( response => {
- let res=response.rows;
- //_this.tableData=res;
- _this.total=response.total;
- });
- },
- },
- mounted() {
- this.getList()
- }
- };
- </script>
- <style scoped lang="scss">
- .approval_handle {
- display: flex!important;
- flex-direction: column;
- .approval_handle-page{
- flex:1;
- display: flex!important;
- flex-direction: column;
- box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
- padding:20px 20px 20px!important;
- border-radius:10px;
- .button-box{
- width:200px;
- display: flex;
- }
- }
- }
- </style>
|