|
@@ -1,124 +1,126 @@
|
|
<!--分级管控管理-->
|
|
<!--分级管控管理-->
|
|
<template>
|
|
<template>
|
|
- <div class="app-container gradeManage">
|
|
|
|
- <div class="page-container gradeManage-page" v-if="pageType == 1">
|
|
|
|
- <div class="page-form-title-box">
|
|
|
|
- <el-form :model="queryParams" class="form-box" ref="queryForm"
|
|
|
|
- :inline="true" style="width:100%;">
|
|
|
|
- <el-form-item label="" prop="searchValue">
|
|
|
|
- <el-input
|
|
|
|
- maxLength="30"
|
|
|
|
- v-model="queryParams.searchValue"
|
|
|
|
- placeholder="请输入名称/学院"
|
|
|
|
- style="width: 200px"
|
|
|
|
- />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="" prop="deptId">
|
|
|
|
- <el-select v-model="queryParams.deptId" placeholder="请选择学院" style="width: 200px">
|
|
|
|
- <el-option
|
|
|
|
- v-for="dict in deptIdOptionList"
|
|
|
|
- :key="dict.deptId"
|
|
|
|
- :label="dict.deptName"
|
|
|
|
- :value="dict.deptId"
|
|
|
|
|
|
+ <div class="gradeManage">
|
|
|
|
+ <div class="app-container" v-if="pageType == 1">
|
|
|
|
+ <div class="page-container gradeManage-page">
|
|
|
|
+ <div class="page-form-title-box">
|
|
|
|
+ <el-form :model="queryParams" class="form-box" ref="queryForm"
|
|
|
|
+ :inline="true" style="width:100%;">
|
|
|
|
+ <el-form-item label="" prop="searchValue">
|
|
|
|
+ <el-input
|
|
|
|
+ maxLength="30"
|
|
|
|
+ v-model="queryParams.searchValue"
|
|
|
|
+ placeholder="请输入名称/学院"
|
|
|
|
+ style="width: 200px"
|
|
/>
|
|
/>
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="" prop="typeId">
|
|
|
|
- <el-select v-model="queryParams.typeId" placeholder="请选择安全分类" style="width: 200px">
|
|
|
|
- <el-option
|
|
|
|
- v-for="dict in typeOptionList"
|
|
|
|
- :key="dict.typeId"
|
|
|
|
- :label="dict.typeName"
|
|
|
|
- :value="dict.typeId"
|
|
|
|
- />
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="" prop="level">
|
|
|
|
- <el-select v-model="queryParams.level" placeholder="请选择安全分级" style="width: 200px">
|
|
|
|
- <el-option
|
|
|
|
- v-for="dict in levelOptionList"
|
|
|
|
- :key="dict.levelId"
|
|
|
|
- :label="dict.levelName"
|
|
|
|
- :value="dict.levelId"
|
|
|
|
- />
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="" prop="state">
|
|
|
|
- <el-select v-model="queryParams.state" placeholder="请选择状态" style="width: 200px">
|
|
|
|
- <el-option
|
|
|
|
- v-for="dict in statusOptionList"
|
|
|
|
- :key="dict.value"
|
|
|
|
- :label="dict.label"
|
|
|
|
- :value="dict.value"
|
|
|
|
- />
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="" prop="moldId">
|
|
|
|
- <el-select v-model="queryParams.moldId" placeholder="请选择类型" style="width: 200px">
|
|
|
|
- <el-option
|
|
|
|
- v-for="dict in moldIdOptionList"
|
|
|
|
- :key="dict.moldId"
|
|
|
|
- :label="dict.moldName"
|
|
|
|
- :value="dict.moldId"
|
|
|
|
- />
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
|
|
|
|
- <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
|
|
|
|
- <p class="page-add-common-style-button"
|
|
|
|
- style="float: right;"
|
|
|
|
- @click="clickPageType(2)"
|
|
|
|
- v-hasPermiRouter="['laboratory:gradeManage:add']"
|
|
|
|
- >新增</p>
|
|
|
|
- </el-form>
|
|
|
|
- </div>
|
|
|
|
- <div class="page-content-box">
|
|
|
|
- <el-table class="table-box" v-loading="loading" border :data="dataList" @selection-change="handleSelectionChange">
|
|
|
|
- <!--<el-table-column type="selection" width="55" align="center" />-->
|
|
|
|
- <el-table-column label="管控名称" align="left" prop="name" show-overflow-tooltip/>
|
|
|
|
- <el-table-column label="学院" align="left" prop="deptName" width="149" show-overflow-tooltip/>
|
|
|
|
- <el-table-column label="实验室类型" align="left" prop="moldName" width="149">
|
|
|
|
- <template slot-scope="scope">{{scope.row.moldName?scope.row.moldName:'--'}}</template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="安全分类" align="left" prop="typeName" width="130">
|
|
|
|
- <template slot-scope="scope">{{scope.row.typeName?scope.row.typeName:'--'}}</template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="安全分级" align="left" prop="levelName" width="130">
|
|
|
|
- <template slot-scope="scope">{{scope.row.levelName?scope.row.levelName:'--'}}</template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="管控规则数" align="left" prop="ruleNum" width="130"/>
|
|
|
|
- <el-table-column label="状态" align="left" prop="status" width="149">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <span :class="scope.row.status == 1?'tableTypeColorA':(scope.row.status == 0?'tableTypeColorB':'')">{{scope.row.status == 1?'开启':(scope.row.status == 0?'关闭':'')}}</span>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="编辑人" align="left" prop="updateBy" width="149"/>
|
|
|
|
- <el-table-column label="编辑时间" align="left" prop="updateTime" width="179"/>
|
|
|
|
- <!--<el-table-column label="适配实验室数" align="left" prop="subNum" />-->
|
|
|
|
- <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160px" v-if="tableButtonType">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <div class="table-button-box">
|
|
|
|
- <p class="table-button-null"></p>
|
|
|
|
- <p class="table-button-p"
|
|
|
|
- @click="clickPageType(3,scope.row)"
|
|
|
|
- v-hasPermiAnd="['laboratory:gradeManage:query','laboratory:gradeManage:edit']"
|
|
|
|
- >编辑</p>
|
|
|
|
- <p class="table-button-p"
|
|
|
|
- @click="handleDelete(scope.row)"
|
|
|
|
- v-hasPermi="['laboratory:gradeManage:remove']"
|
|
|
|
- >删除</p>
|
|
|
|
- <p class="table-button-null"></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"
|
|
|
|
- />
|
|
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="" prop="deptId">
|
|
|
|
+ <el-select v-model="queryParams.deptId" placeholder="请选择学院" style="width: 200px">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="dict in deptIdOptionList"
|
|
|
|
+ :key="dict.deptId"
|
|
|
|
+ :label="dict.deptName"
|
|
|
|
+ :value="dict.deptId"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="" prop="typeId">
|
|
|
|
+ <el-select v-model="queryParams.typeId" placeholder="请选择安全分类" style="width: 200px">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="dict in typeOptionList"
|
|
|
|
+ :key="dict.typeId"
|
|
|
|
+ :label="dict.typeName"
|
|
|
|
+ :value="dict.typeId"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="" prop="level">
|
|
|
|
+ <el-select v-model="queryParams.level" placeholder="请选择安全分级" style="width: 200px">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="dict in levelOptionList"
|
|
|
|
+ :key="dict.levelId"
|
|
|
|
+ :label="dict.levelName"
|
|
|
|
+ :value="dict.levelId"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="" prop="state">
|
|
|
|
+ <el-select v-model="queryParams.state" placeholder="请选择状态" style="width: 200px">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="dict in statusOptionList"
|
|
|
|
+ :key="dict.value"
|
|
|
|
+ :label="dict.label"
|
|
|
|
+ :value="dict.value"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="" prop="moldId">
|
|
|
|
+ <el-select v-model="queryParams.moldId" placeholder="请选择类型" style="width: 200px">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="dict in moldIdOptionList"
|
|
|
|
+ :key="dict.moldId"
|
|
|
|
+ :label="dict.moldName"
|
|
|
|
+ :value="dict.moldId"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
|
|
|
|
+ <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
|
|
|
|
+ <p class="page-add-common-style-button"
|
|
|
|
+ style="float: right;"
|
|
|
|
+ @click="clickPageType(2)"
|
|
|
|
+ v-hasPermiRouter="['laboratory:gradeManage:add']"
|
|
|
|
+ >新增</p>
|
|
|
|
+ </el-form>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="page-content-box">
|
|
|
|
+ <el-table class="table-box" v-loading="loading" border :data="dataList" @selection-change="handleSelectionChange">
|
|
|
|
+ <!--<el-table-column type="selection" width="55" align="center" />-->
|
|
|
|
+ <el-table-column label="管控名称" align="left" prop="name" show-overflow-tooltip/>
|
|
|
|
+ <el-table-column label="学院" align="left" prop="deptName" width="149" show-overflow-tooltip/>
|
|
|
|
+ <el-table-column label="实验室类型" align="left" prop="moldName" width="149">
|
|
|
|
+ <template slot-scope="scope">{{scope.row.moldName?scope.row.moldName:'--'}}</template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="安全分类" align="left" prop="typeName" width="130">
|
|
|
|
+ <template slot-scope="scope">{{scope.row.typeName?scope.row.typeName:'--'}}</template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="安全分级" align="left" prop="levelName" width="130">
|
|
|
|
+ <template slot-scope="scope">{{scope.row.levelName?scope.row.levelName:'--'}}</template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="管控规则数" align="left" prop="ruleNum" width="130"/>
|
|
|
|
+ <el-table-column label="状态" align="left" prop="status" width="149">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span :class="scope.row.status == 1?'tableTypeColorA':(scope.row.status == 0?'tableTypeColorB':'')">{{scope.row.status == 1?'开启':(scope.row.status == 0?'关闭':'')}}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="编辑人" align="left" prop="createName" width="149"/>
|
|
|
|
+ <el-table-column label="编辑时间" align="left" prop="createTime" width="179"/>
|
|
|
|
+ <!--<el-table-column label="适配实验室数" align="left" prop="subNum" />-->
|
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160px" v-if="tableButtonType">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div class="table-button-box">
|
|
|
|
+ <p class="table-button-null"></p>
|
|
|
|
+ <p class="table-button-p"
|
|
|
|
+ @click="clickPageType(3,scope.row)"
|
|
|
|
+ v-hasPermiAnd="['laboratory:gradeManage:query','laboratory:gradeManage:edit']"
|
|
|
|
+ >编辑</p>
|
|
|
|
+ <p class="table-button-p"
|
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
|
+ v-hasPermi="['laboratory:gradeManage:remove']"
|
|
|
|
+ >删除</p>
|
|
|
|
+ <p class="table-button-null"></p>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ <pagination :page-sizes="[20, 30, 40, 50]"
|
|
|
|
+ v-show="total>0"
|
|
|
|
+ :total="total"
|
|
|
|
+ :page.sync="queryParams.page"
|
|
|
|
+ :limit.sync="queryParams.pageSize"
|
|
|
|
+ @pagination="getList"
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 新增编辑 -->
|
|
<!-- 新增编辑 -->
|
|
@@ -194,7 +196,7 @@
|
|
open: false,
|
|
open: false,
|
|
// 查询参数
|
|
// 查询参数
|
|
queryParams: {
|
|
queryParams: {
|
|
- pageNum: 1,
|
|
|
|
|
|
+ page: 1,
|
|
pageSize:20,
|
|
pageSize:20,
|
|
searchValue: null,
|
|
searchValue: null,
|
|
status:null,
|
|
status:null,
|
|
@@ -347,11 +349,11 @@
|
|
},
|
|
},
|
|
/** 查询分级管控管理列表 */
|
|
/** 查询分级管控管理列表 */
|
|
getList() {
|
|
getList() {
|
|
- this.loading = true;
|
|
|
|
|
|
+ this.$set(this,'loading',true);
|
|
laboratoryGradeManageList(this.queryParams).then( response => {
|
|
laboratoryGradeManageList(this.queryParams).then( response => {
|
|
- this.dataList = response.rows;
|
|
|
|
- this.total = response.total;
|
|
|
|
- this.loading = false;
|
|
|
|
|
|
+ this.$set(this,'dataList',response.data.records);
|
|
|
|
+ this.$set(this,'total',response.data.total);
|
|
|
|
+ this.$set(this,'loading',false);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 取消按钮
|
|
// 取消按钮
|
|
@@ -379,7 +381,7 @@
|
|
},
|
|
},
|
|
/** 搜索按钮操作 */
|
|
/** 搜索按钮操作 */
|
|
handleQuery() {
|
|
handleQuery() {
|
|
- this.$set(this.queryParams,'pageNum',1);
|
|
|
|
|
|
+ this.$set(this.queryParams,'page',1);
|
|
this.getList();
|
|
this.getList();
|
|
},
|
|
},
|
|
/** 重置按钮操作 */
|
|
/** 重置按钮操作 */
|
|
@@ -456,6 +458,9 @@
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
.gradeManage{
|
|
.gradeManage{
|
|
|
|
+ flex:1;
|
|
|
|
+ display: flex;
|
|
|
|
+ overflow: hidden;
|
|
.gradeManage-page{
|
|
.gradeManage-page{
|
|
.button-box{
|
|
.button-box{
|
|
margin:0 auto;
|
|
margin:0 auto;
|