123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229 |
- <!--申请-->
- <template>
- <div class="application">
- <div class="application-page" v-if="pageType == 1">
- <div class="title-box">
- <div @click="titleClick">
- <p>门禁授权</p>
- <p></p>
- </div>
- <div>
- <p class="top-p-color">授权申请</p>
- <p class="bottom-p-color"></p>
- </div>
- </div>
- <div class="application-min">
- <el-form :model="queryParamsData" ref="queryForm" :inline="true">
- <el-form-item label="关键字" prop="searchValue" label-width="68px">
- <el-input
- maxlength="20"
- v-model="queryParamsData.searchValue"
- placeholder="姓名/实验室"
- clearable
- size="small"/>
- </el-form-item>
- <el-form-item label="状态" prop="status" label-width="50px">
- <el-select v-model="queryParamsData.status" clearable placeholder="请选择状态">
- <el-option
- v-for="item in optionsListTwo"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="申请时间" prop="subjectId" label-width="80px">
- <el-date-picker
- :clearable="false"
- v-model="dateRange"
- style="width: 240px;height:40px;"
- value-format="yyyy-MM-dd"
- type="daterange"
- range-separator="-"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- ></el-date-picker>
- </el-form-item>
- <el-form-item style="float: right;">
- <el-col :span="1.5">
- <p class="inquire-button-one"
- style="width:100px;margin-right:0;"
- @click="goPageButton(2)"
- >授权申请</p>
- </el-col>
- </el-form-item>
- <el-form-item>
- <p class="inquire-button-one" @click="handleQuery" style="margin-right:10px;">查询</p>
- <p class="reset-button-one" @click="resetQuery">重置</p>
- </el-form-item>
- </el-form>
- <el-table v-loading="loading" border :data="tableList">
- <el-table-column label="申请时间" align="center" prop="creatTime" show-overflow-tooltip/>
- <el-table-column label="申请实验室" align="center" prop="subjectName" show-overflow-tooltip/>
- <el-table-column label="位置" align="center" prop="position" show-overflow-tooltip v-if="$store.state.settings.smartAlarmType == 1"/>
- <el-table-column label="所属学院" align="center" prop="college" show-overflow-tooltip/>
- <el-table-column label="审批人" align="center" prop="examineName" width="160px" show-overflow-tooltip/>
- <el-table-column label="完成时间" align="center" prop="approvalTime" width="160px" show-overflow-tooltip/>
- <el-table-column label="状态" align="center" prop="applyStatus" width="180px" show-overflow-tooltip>
- <template slot-scope="scope">
- <span>{{scope.row.applyStatus==1?'审批中':(scope.row.applyStatus==2?'已授权':(scope.row.applyStatus==3?'已拒绝':''))}}</span>
- </template>
- </el-table-column>
- </el-table>
- <pagination :page-sizes="[20, 30, 40, 50]"
- v-show="total>0"
- :total="total"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
- @pagination="getList"/>
- </div>
- </div>
- <addPage v-if="pageType == 2"></addPage>
- </div>
- </template>
- <script>
- import { applyList } from "@/api/laboratory/subject";
- import addPage from "./addPage.vue";
- export default {
- name: "application",
- components: {
- addPage
- },
- data(){
- return{
- pageType:1,
- // table操作按钮校验
- tableButtonType:this.hasPermiDom(['system:user_student:query','system:user_student:query']),
- loading:false,
- // 搜索数据
- queryParamsData:{
- pageNum:1,
- pageSize:20,
- },
- // 搜索实际发送数据
- queryParams:{
- pageNum:1,
- pageSize:20,
- },
- dateRange:[],
- //数据数量
- total:10,
- tableList:[],
- //审批状态
- optionsListTwo:[{id:'1',name:'审批中'},{id:'2',name:'已授权'},{id:'3',name:'已拒绝'}]
- }
- },
- created() {
- },
- mounted(){
- this.getList();
- },
- methods:{
- titleClick(){
- this.$parent.titleClick(1);
- },
- //页面状态切换
- goPageButton(type){
- if(type == 1){
- this.pageType = 1;
- }else if(type == 2){
- this.pageType = 2;
- }else if(type == 3){
- this.resetQuery();
- this.pageType = 1;
- }
- },
- /** 搜索按钮操作 */
- handleQuery() {
- this.queryParamsData.pageNum = 1;
- this.queryParamsData.pageSize = 20;
- this.queryParams = JSON.parse(JSON.stringify(this.queryParamsData));
- this.getList();
- },
- /** 重置按钮操作 */
- resetQuery() {
- this.$set(this,'queryParamsData',{});
- this.$set(this,'queryParams',{});
- this.$set(this,'dateRange',[]);
- this.handleQuery();
- },
- //获取数据列表
- getList(){
- this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
- if(this.dateRange&&this.dateRange.length>0) {
- this.queryParamsData.startTime = this.dateRange[0];
- this.queryParamsData.endTime = this.dateRange[1];
- } else {
- this.queryParamsData.startTime = null;
- this.queryParamsData.endTime = null;
- }
- applyList(this.queryParamsData).then(response => {
- this.tableList = response.rows;
- this.total = response.total
- });
- },
- }
- }
- </script>
- <style scoped lang="scss">
- .application{
- flex:1;
- display: flex;
- flex-direction: column;
- .application-page{
- flex:1;
- display: flex;
- flex-direction: column;
- overflow: hidden;
- .title-box{
- display: flex;
- border-bottom:1px solid #E0E0E0;
- margin-bottom:20px;
- div{
- height:80px;
- margin-right:20px;
- cursor: pointer;
- p:nth-child(1){
- font-size:18px;
- text-align: center;
- padding:0 20px;
- margin-top:26px;
- }
- p:nth-child(2){
- width:40px;
- height:4px;
- border-radius:40px;
- margin:12px auto;
- }
- .top-p-color{
- color: #0045AF;
- }
- .bottom-p-color{
- background: #0045AF;
- }
- }
- .buttonTitleColorA{
- color:#0045AF;
- }
- .buttonTitleColorB{
- color:#999999;
- }
- }
- .application-min{
- flex:1;
- display: flex;
- flex-direction: column;
- overflow: hidden;
- margin:0 20px!important;
- .button-box{
- display: flex;
- }
- }
- }
- }
- </style>
|