123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 |
- <!--门禁授权-->
- <template>
- <div class="authorize">
- <div class="authorize-page" v-if="pageType == 1">
- <div class="title-box">
- <div>
- <p class="top-p-color">门禁授权</p>
- <p class="bottom-p-color"></p>
- </div>
- <div @click="titleClick(2)">
- <p>授权失败</p>
- <p></p>
- </div>
- <div @click="titleClick(3)">
- <p>授权日志</p>
- <p></p>
- </div>
- </div>
- <div class="authorize-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.operate" clearable placeholder="请选择状态">
- <el-option
- v-for="item in optionsListTwo"
- :key="item.code"
- :label="item.name"
- :value="item.code">
- </el-option>
- </el-select>
- </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="left" prop="deptName" />
- <el-table-column label="实验室" align="left" prop="subName" />
- <el-table-column label="位置" align="left" prop="posi" />
- <el-table-column label="实验室负责人" align="left" prop="adminName" />
- <el-table-column label="门禁" align="left" prop="hardName" />
- <el-table-column label="授权人数" align="left" prop="available" />
- <el-table-column label="状态" align="left" prop="operate" >
- <template slot-scope="scope" v-if="scope.row.operate">
- <span>{{scope.row.operate.name}}</span>
- </template>
- </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-hasPermi="['haikang:user:list']"
- @click="handleClick('',scope.row,'detail')"
- >查看授权</p>
- </div>
- </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>
- <lookImpower v-if="pageType == 2" :pageData="pageData"></lookImpower>
- </div>
- </template>
- <script>
- import { getHaikangList } from '@/api/laboratory/subject'
- import lookImpower from "./lookImpower.vue";
- export default {
- name: "authorize",
- components: {
- lookImpower
- },
- data(){
- return{
- pageType:1,
- loading:false,
- // 搜索数据
- queryParamsData:{
- pageNum:1,
- pageSize:20,
- searchValue:'',
- operate:'',
- },
- // 搜索实际发送数据
- queryParams:{
- pageNum:1,
- pageSize:20,
- },
- //数据数量
- total:10,
- tableList:[{}],
- //审批状态
- optionsListTwo:[{code:null,name:'全部'},{code:0,name:'离线'},{code:2,name:'在线'}],
- //详情
- pageData:{},
- }
- },
- created() {
- },
- mounted(){
- this.getList();
- },
- methods:{
- handleClick(index,row,doType){
- if(doType=='detail'){
- this.pageType=2
- this.pageData=row
- console.log(this.pageData)
- }else if(doType=='back'){
- this.pageType=1
- }
- },
- //操作接口
- goPageButton(){
- this.pageType = 1;
- },
- titleClick(type){
- this.$parent.titleClick(type);
- },
- /** 搜索按钮操作 */
- 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.handleQuery();
- },
- //获取数据列表
- getList(){
- this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
- getHaikangList(this.queryParamsData).then(response => {
- this.tableList = response.rows;
- this.total = response.total
- });
- },
- }
- }
- </script>
- <style scoped lang="scss">
- .authorize{
- flex:1;
- display: flex;
- flex-direction: column;
- .authorize-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;
- }
- }
- .authorize-min{
- flex:1;
- display: flex;
- flex-direction: column;
- overflow: hidden;
- margin:0 20px!important;
- .button-box{
- display: flex;
- }
- }
- }
- }
- </style>
|