|
@@ -43,12 +43,12 @@
|
|
|
<el-form-item label="" prop="title" style="float: right">
|
|
|
<p class="inquire-button-one"
|
|
|
style="width: 120px;margin-left: 10px;"
|
|
|
- @click="handleClick('','','add')"
|
|
|
+ @click="handleClick('','','addStudent')"
|
|
|
v-hasPermi="['airbottle:supplier:add']"
|
|
|
><i class="el-icon-plus"></i>新增学生授权</p>
|
|
|
<p class="inquire-button-one"
|
|
|
style="width: 120px;margin-left: 10px;"
|
|
|
- @click="handleClick('','','add')"
|
|
|
+ @click="handleClick('','','addTeacher')"
|
|
|
v-hasPermi="['airbottle:supplier:add']"
|
|
|
><i class="el-icon-plus"></i>新增教职工授权</p>
|
|
|
|
|
@@ -101,12 +101,22 @@
|
|
|
<el-form :model="dialogForm" ref="dialogForm" :inline="true" label-width="140px">
|
|
|
<el-form-item label="关键字" prop="name" >
|
|
|
<el-input
|
|
|
- v-model="dialogForm.name"
|
|
|
+ v-model="dialogForm.searchValue"
|
|
|
placeholder="请输入名称/联系方式"
|
|
|
clearable
|
|
|
size="small"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="所属单位" prop="deptId" label-width="80px">
|
|
|
+ <el-select v-model="dialogForm.deptId" clearable placeholder="请选择学院">
|
|
|
+ <el-option
|
|
|
+ v-for="item in collegeOptions"
|
|
|
+ :key="item.deptId"
|
|
|
+ :label="item.deptName"
|
|
|
+ :value="item.deptId">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<p class="inquire-button-one" style="margin-left:20px;" @click="onSearch">查询</p>
|
|
|
<p class="reset-button-one" style="margin-left:20px;" @click="resetForm">重置</p>
|
|
@@ -114,43 +124,79 @@
|
|
|
</el-form>
|
|
|
<div class="btn_list">
|
|
|
<i class="el-icon-warning"></i>
|
|
|
- <i>已选择 {{labWhiteJoinSubList.length}} 项</i>
|
|
|
+ <i>已选择 {{labWhiteJoinSubList.length}} 项目</i>
|
|
|
<i @click="toggleSelection(dialogTable)">全选本页</i>
|
|
|
<i></i>
|
|
|
<i @click="toggleSelection()">清除选项</i>
|
|
|
- <div class="bottom-button-box">
|
|
|
- <el-button class="color_99" @click="closeDialog(1)">关闭</el-button>
|
|
|
- <el-button class="color_ff back_one" @click="closeDialog(2)">确定</el-button>
|
|
|
- </div>
|
|
|
</div>
|
|
|
<el-table ref="multipleTable" border tooltip-effect="dark" :row-key="getRowKeys" :data="dialogTable"
|
|
|
highlight-current-row @selection-change="handleSelectionChange" style="cursor: pointer;height:500px;">
|
|
|
<el-table-column type="selection" width="55" :reserve-selection="true" align="center"></el-table-column>
|
|
|
- <el-table-column label="申请实验室名称" show-overflow-tooltip align="left" prop="name"/>
|
|
|
- <el-table-column label="楼栋" align="left" prop="building" />
|
|
|
- <el-table-column label="楼层" align="left" prop="buildName" />
|
|
|
- <el-table-column label="学院" align="left" prop="deptName" />
|
|
|
- <el-table-column label="实验室负责人" align="left" prop="adminName" />
|
|
|
- <el-table-column label="安全分级" align="left" prop="levelName" >
|
|
|
+ <el-table-column label="所属单位" align="left" prop="deptName"/>
|
|
|
+ <el-table-column label="姓名" align="left" prop="nickName" />
|
|
|
+ <el-table-column label="导师" align="left" prop="tutorUserName" v-if="userType==1"/>
|
|
|
+ <el-table-column label="专业" align="left" prop="major" v-if="userType==1"/>
|
|
|
+ <el-table-column label="身份" align="left" prop="positionName" v-if="userType==2"/>
|
|
|
+ <el-table-column label="验证方式" align="left" prop="status">
|
|
|
<template slot-scope="scope">
|
|
|
- <span :style="'color:'+scope.row.fiedColor+';'">{{scope.row.levelName}}</span>
|
|
|
+ <el-select v-model="scope.row.status" clearable >
|
|
|
+ <el-option
|
|
|
+ v-for="item in verifyWayList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="失效时间" align="left" prop="status">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="scope.row.date+''"
|
|
|
+ type="date"
|
|
|
+ placeholder="请选择失效时间">
|
|
|
+ </el-date-picker>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
-
|
|
|
</el-table>
|
|
|
<pagination :page-sizes="[20, 30, 40, 50]"
|
|
|
v-show="total>0"
|
|
|
:total="total"
|
|
|
:page.sync="dialogForm.pageNum"
|
|
|
:limit.sync="dialogForm.pageSize"
|
|
|
- @pagination="getUserRoleBySub"
|
|
|
+ @pagination="getUserList"
|
|
|
/>
|
|
|
+ <div class="configuration">
|
|
|
+ <el-form :model="configuration" ref="queryForm" :inline="true" v-if="unifyDeploy">
|
|
|
+ <el-form-item label="验证方式:" prop="name">
|
|
|
+ <el-select v-model="configuration.status" clearable >
|
|
|
+ <el-option
|
|
|
+ v-for="item in verifyWayList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="失效时间:" prop="name">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="configuration.state"
|
|
|
+ type="date"
|
|
|
+ placeholder="请选择失效时间">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <p :class="unifyDeploy?'add-button-one-120':'inquire-button-one'" @click="unifyDeployFun()">{{unifyDeploy?'取消统一配置':'统一配置'}}</p>
|
|
|
+ <el-button class="color_ff back_one" @click="closeDialog(2)">确定</el-button>
|
|
|
+ </div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { supplierDelete, supplierList, supplierStop } from '@/api/gasManage3_0/gasManage'
|
|
|
+import { listStudentUser, listTeacherUser } from '@/api/system/user_student'
|
|
|
+import { listDepartments } from '@/api/system/dept'
|
|
|
|
|
|
export default {
|
|
|
name: "Approval",
|
|
@@ -170,64 +216,107 @@ export default {
|
|
|
tableData:[{}],
|
|
|
dateRange:[],
|
|
|
pageData:{},
|
|
|
- dialogForm:{},
|
|
|
+ dialogForm:{
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ searchValue:'',
|
|
|
+ deptId:'',
|
|
|
+ },
|
|
|
dialogTitle:'选择学生',
|
|
|
dialogVisible:false,
|
|
|
+ collegeOptions:[],//学院
|
|
|
labWhiteJoinSubList:[],
|
|
|
+ dialogTable:[{name:''}],
|
|
|
+ radioList:[
|
|
|
|
|
|
+ ],
|
|
|
+ userType:1,//判断是学生 1 教职工2
|
|
|
+ verifyWayList:[
|
|
|
+ {
|
|
|
+ id:'1',
|
|
|
+ name:'人脸',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id:'2',
|
|
|
+ name:'指纹',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id:'3',
|
|
|
+ name:'刷卡',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id:'4',
|
|
|
+ name:'密码',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ configuration:{},
|
|
|
+ unifyDeploy:false,
|
|
|
};
|
|
|
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
- //监听关联记录弹窗关闭
|
|
|
- handleClose(){
|
|
|
- console.log('弹窗关闭');
|
|
|
- },
|
|
|
- //查询
|
|
|
- onSearch() {
|
|
|
- this.dialogForm.pageNo = 1;
|
|
|
- this.getUserRoleBySub();
|
|
|
- },
|
|
|
- //重置
|
|
|
- resetForm() {
|
|
|
- this.dialogForm.name = '';
|
|
|
- this.dialogForm.floorId = '';
|
|
|
- this.dialogForm.buildId = '';
|
|
|
- this.floorList=[];
|
|
|
- this.onSearch();
|
|
|
- },
|
|
|
- //取消选中
|
|
|
- toggleSelection(rows) {
|
|
|
- let _this=this;
|
|
|
- if (rows) {
|
|
|
- rows.forEach(row => {
|
|
|
- this.$refs.multipleTable.toggleRowSelection(row,true);
|
|
|
- });
|
|
|
|
|
|
- } else {
|
|
|
- this.$refs.multipleTable.clearSelection();
|
|
|
- }
|
|
|
- },
|
|
|
- //选中实验室
|
|
|
- handleSelectionChange(val){
|
|
|
- console.log(val)
|
|
|
- console.log(this.labWhiteJoinSubList)
|
|
|
- let _this=this;
|
|
|
- this.labWhiteJoinSubList=[];
|
|
|
- this.labWhiteJoinSubList=val;
|
|
|
- _this.arr=this.labWhiteJoinSubList
|
|
|
+ //查询
|
|
|
+ onSearch() {
|
|
|
+ this.dialogForm.pageNo = 1;
|
|
|
+ this.getUserRoleBySub();
|
|
|
+ },
|
|
|
+ //重置
|
|
|
+ resetForm() {
|
|
|
+ this.dialogForm.searchValue = '';
|
|
|
+ this.dialogForm.deptId = '';
|
|
|
+ this.onSearch();
|
|
|
+ },
|
|
|
+ //统一配置
|
|
|
+ unifyDeployFun(){
|
|
|
+ this.unifyDeploy=!this.unifyDeploy
|
|
|
+ },
|
|
|
+ getRowKeys(row) {
|
|
|
+ return row.userId; //指定row-key的一个标识
|
|
|
+ },
|
|
|
+ //监听关联记录弹窗关闭
|
|
|
+ handleClose(){
|
|
|
+ console.log('弹窗关闭');
|
|
|
+ },
|
|
|
+ //取消选中
|
|
|
+ toggleSelection(rows) {
|
|
|
+ let _this=this;
|
|
|
+ if (rows) {
|
|
|
+ rows.forEach(row => {
|
|
|
+ this.$refs.multipleTable.toggleRowSelection(row,true);
|
|
|
+ });
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.$refs.multipleTable.clearSelection();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //选中实验室
|
|
|
+ handleSelectionChange(val){
|
|
|
+ let _this=this;
|
|
|
+ this.labWhiteJoinSubList=[];
|
|
|
+ this.labWhiteJoinSubList=val;
|
|
|
+
|
|
|
+ },
|
|
|
|
|
|
- },
|
|
|
handleClick(index,row,doType){
|
|
|
let _this=this;
|
|
|
- if(doType=='add'){//新增学生授权
|
|
|
+ if(doType=='addStudent'){//新增学生授权
|
|
|
+ _this.unifyDeploy=false;
|
|
|
_this.dialogVisible=true;
|
|
|
- }else if(doType=='add'){//新增教职工授权
|
|
|
-
|
|
|
+ _this.dialogTitle='选择学生';
|
|
|
+ _this.userType=1;
|
|
|
+ this.getUserList(1);
|
|
|
+ }else if(doType=='addTeacher'){//新增教职工授权
|
|
|
+ _this.unifyDeploy=false;
|
|
|
+ _this.dialogVisible=true;
|
|
|
+ _this.dialogTitle='选择教职工';
|
|
|
+ _this.userType=2;
|
|
|
+ this.getUserList(2);
|
|
|
}else if(doType=='delete'){//删除
|
|
|
let _this=this
|
|
|
- this.$confirm('是否确认删除?', "警告", {
|
|
|
+ console.log(row)
|
|
|
+ this.$confirm('是否确认删除['+row.companyName+']门禁授权?', "警告", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
@@ -242,32 +331,65 @@ export default {
|
|
|
}).catch(() => {});
|
|
|
}
|
|
|
},
|
|
|
- /** 搜索按钮操作 */
|
|
|
+ //获取学院列表
|
|
|
+ listDepartments(){
|
|
|
+ listDepartments().then(response => {
|
|
|
+ this.collegeOptions = response.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 弹框查询学生列表 */
|
|
|
+ getUserList(type) {//type 1学生 2教职工
|
|
|
+ let _this=this;
|
|
|
+ this.loading = true;
|
|
|
+ if(type==1){
|
|
|
+ listStudentUser(this.addDateRange(this.dialogForm, this.dateRange)).then(response => {
|
|
|
+ this.dialogTable = response.rows;
|
|
|
+ this.total = response.total;
|
|
|
+ this.loading = false;
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }else if(type==2){
|
|
|
+ listTeacherUser(this.addDateRange(this.dialogForm, this.dateRange)).then(response => {
|
|
|
+ this.dialogTable = response.rows;
|
|
|
+ this.total = response.total;
|
|
|
+ this.loading = false;
|
|
|
+ }
|
|
|
+ );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ /** 弹框搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
this.queryParams.pageNum = 1;
|
|
|
this.getList();
|
|
|
},
|
|
|
- /** 重置按钮操作 */
|
|
|
+ /** 弹框重置按钮操作 */
|
|
|
resetQuery() {
|
|
|
this.queryParams.searchValue = "";
|
|
|
this.queryParams.status = "";
|
|
|
this.handleQuery();
|
|
|
},
|
|
|
- //返回
|
|
|
- backPage(){
|
|
|
- this.$parent.handleClick('','','back');
|
|
|
- this.$parent.getList();
|
|
|
- },
|
|
|
- getList(){
|
|
|
- let _this=this;
|
|
|
- supplierList(_this.queryParams).then( response => {
|
|
|
- let res=response.rows;
|
|
|
- _this.tableData=res;
|
|
|
- _this.total=response.total;
|
|
|
- });
|
|
|
- },
|
|
|
+ //返回
|
|
|
+ backPage(){
|
|
|
+ this.$parent.handleClick('','','back');
|
|
|
+ this.$parent.getList();
|
|
|
+ },
|
|
|
+ getList(){
|
|
|
+ let _this=this;
|
|
|
+ supplierList(_this.queryParams).then( response => {
|
|
|
+ let res=response.rows;
|
|
|
+ _this.tableData=res;
|
|
|
+ _this.total=response.total;
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
+ this.listDepartments();
|
|
|
+
|
|
|
this.getList()
|
|
|
}
|
|
|
};
|
|
@@ -303,6 +425,7 @@ export default {
|
|
|
padding:20px 20px 20px!important;
|
|
|
border-radius:10px;
|
|
|
}
|
|
|
+ /*弹框*/
|
|
|
.btn_list{
|
|
|
width: 100%;
|
|
|
height: 40px;
|
|
@@ -373,6 +496,15 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ .configuration{
|
|
|
+ height: 70px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+ align-items: center;
|
|
|
+ border-top: 1px solid #D8D8D8;
|
|
|
+ .el-form-item{
|
|
|
+ margin-bottom: 0!important;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|