|
@@ -1,16 +1,15 @@
|
|
<template>
|
|
<template>
|
|
- <div class="subject">
|
|
|
|
- <div class="subject-page" v-if="pageType == 1">
|
|
|
|
- <div class="subject-page-min">
|
|
|
|
- <div class="left-subject-list left-subject-list-flex">
|
|
|
|
- <el-form :model="queryParams" ref="queryForm" :inline="true"
|
|
|
|
- style="border-bottom:1px solid #D8D8D8">
|
|
|
|
|
|
+ <div class="app-container subject">
|
|
|
|
+ <div class="page-container subject-page" v-if="pageType == 1">
|
|
|
|
+ <div class="left-subject-list">
|
|
|
|
+ <div class="page-form-title-box">
|
|
|
|
+ <el-form :model="queryParams" ref="queryForm" :inline="true">
|
|
<el-form-item label="" prop="searchValue">
|
|
<el-form-item label="" prop="searchValue">
|
|
<el-input
|
|
<el-input
|
|
v-model="queryParams.searchValue"
|
|
v-model="queryParams.searchValue"
|
|
placeholder="实验室/房间号"
|
|
placeholder="实验室/房间号"
|
|
clearable
|
|
clearable
|
|
- style="width:150px;margin-left:20px;"
|
|
|
|
|
|
+ style="width:150px;"
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="" prop="deptId">
|
|
<el-form-item label="" prop="deptId">
|
|
@@ -46,7 +45,7 @@
|
|
<p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
|
|
<p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
|
|
<p class="page-reset-common-style-button" @click="resetQuery">重置</p>
|
|
<p class="page-reset-common-style-button" @click="resetQuery">重置</p>
|
|
<p class="page-submit-common-style-button"
|
|
<p class="page-submit-common-style-button"
|
|
- style="float: right;margin-right:20px;"
|
|
|
|
|
|
+ style="float: right;"
|
|
@click="clickPage(2)"
|
|
@click="clickPage(2)"
|
|
v-hasPermi="['laboratory:subject:add']"
|
|
v-hasPermi="['laboratory:subject:add']"
|
|
>新增</p>
|
|
>新增</p>
|
|
@@ -54,78 +53,73 @@
|
|
<import-component :importConfig="importConfig"></import-component>
|
|
<import-component :importConfig="importConfig"></import-component>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
- <div class="table_border">
|
|
|
|
- <el-table class="table-box" ref="multipleTable" border :data="dataList" highlight-current-row
|
|
|
|
- @current-change="handleCurrentChange">
|
|
|
|
- <el-table-column label="排序" align="left" prop="orderNum" width="80">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-input maxlength="4" type="text" oninput="value=value.replace(/[^0-9.]/g,'')"
|
|
|
|
- v-model="scope.row.orderNum" @focus="liveSort(scope.row)"
|
|
|
|
- @blur="editSort(scope.row)"></el-input>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="实验室名称" align="left" prop="subName" show-overflow-tooltip/>
|
|
|
|
- <el-table-column label="房间号" align="left" prop="roomName" width="120" show-overflow-tooltip>
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <span>{{scope.row.roomName?scope.row.roomName:'未绑定'}}</span>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="学院" align="left" prop="deptName" width="130" show-overflow-tooltip/>
|
|
|
|
- <el-table-column label="分类/分级" align="left" prop="levelName" width="150" show-overflow-tooltip>
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <span>{{scope.row.typeName}}/</span>
|
|
|
|
- <span :style="'color:'+scope.row.levelColor+';'">{{scope.row.levelName}}</span>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="实验室责任人" align="left" prop="adminName" width="150" show-overflow-tooltip/>
|
|
|
|
- <el-table-column label="安全责任人" align="left" prop="safeUserNames" width="150" show-overflow-tooltip/>
|
|
|
|
- <el-table-column label="操作" align="left" width="180">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <div class="table-button-box">
|
|
|
|
- <p class="table-button-null"></p>
|
|
|
|
- <p class="table-button-p" v-hasPermi="['laboratory:subject:query']" @click="clickPage(7,scope.row)">
|
|
|
|
- 详情</p>
|
|
|
|
- <el-dropdown trigger="click" size="mini" @command="(command) => handleCommand(command, scope.row)">
|
|
|
|
- <p class="table-button-p">更多>></p>
|
|
|
|
- <el-dropdown-menu slot="dropdown" style="margin:0!important;">
|
|
|
|
- <el-dropdown-item style="height:36px;line-height:36px;width:90px;text-align: center" command="1"
|
|
|
|
- v-hasPermiAnd="['laboratory:subject:query','laboratory:subject:edit']">关联配置
|
|
|
|
- </el-dropdown-item>
|
|
|
|
- <el-dropdown-item style="height:36px;line-height:36px;width:90px;text-align: center"
|
|
|
|
- command="2">物联配置
|
|
|
|
- </el-dropdown-item>
|
|
|
|
- <el-dropdown-item style="height:36px;line-height:36px;width:90px;text-align: center" command="3"
|
|
|
|
- v-hasPermi="['laboratory:subjectmaterial:add']">准入配置
|
|
|
|
- </el-dropdown-item>
|
|
|
|
- <el-dropdown-item style="height:36px;line-height:36px;width:90px;text-align: center" command="4"
|
|
|
|
- v-hasPermiAnd="['laboratory:subject:query','laboratory:subject:edit']">编辑
|
|
|
|
- </el-dropdown-item>
|
|
|
|
- <el-dropdown-item style="height:36px;line-height:36px;width:90px;text-align: center" command="5"
|
|
|
|
- v-hasPermi="['laboratory:subject:remove']">删除
|
|
|
|
- </el-dropdown-item>
|
|
|
|
- </el-dropdown-menu>
|
|
|
|
- </el-dropdown>
|
|
|
|
- <p class="table-button-null"></p>
|
|
|
|
- </div>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
- <pagination
|
|
|
|
- v-show="total>0"
|
|
|
|
- :total="total"
|
|
|
|
- :page.sync="queryParams.page"
|
|
|
|
- :limit.sync="queryParams.pageSize"
|
|
|
|
- @pagination="getList"
|
|
|
|
- />
|
|
|
|
- </div>
|
|
|
|
</div>
|
|
</div>
|
|
- <index-right-page ref="indexRightPage"></index-right-page>
|
|
|
|
|
|
+ <div class="page-content-box">
|
|
|
|
+ <el-table class="table-box" ref="multipleTable" border :data="dataList" highlight-current-row
|
|
|
|
+ @current-change="handleCurrentChange">
|
|
|
|
+ <el-table-column label="排序" align="left" prop="orderNum" width="80">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-input maxlength="4" type="text" oninput="value=value.replace(/[^0-9.]/g,'')"
|
|
|
|
+ v-model="scope.row.orderNum" @focus="liveSort(scope.row)"
|
|
|
|
+ @blur="editSort(scope.row)"></el-input>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="实验室名称" align="left" prop="subName" show-overflow-tooltip/>
|
|
|
|
+ <el-table-column label="房间号" align="left" prop="roomName" width="120" show-overflow-tooltip>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span>{{scope.row.roomName?scope.row.roomName:'未绑定'}}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="学院" align="left" prop="deptName" width="130" show-overflow-tooltip/>
|
|
|
|
+ <el-table-column label="分类/分级" align="left" prop="levelName" width="150" show-overflow-tooltip>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span>{{scope.row.typeName}}/</span>
|
|
|
|
+ <span :style="'color:'+scope.row.levelColor+';'">{{scope.row.levelName}}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="实验室责任人" align="left" prop="adminName" width="150" show-overflow-tooltip/>
|
|
|
|
+ <el-table-column label="安全责任人" align="left" prop="safeUserNames" width="150" show-overflow-tooltip/>
|
|
|
|
+ <el-table-column label="操作" align="left" width="180">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div class="table-button-box">
|
|
|
|
+ <p class="table-button-null"></p>
|
|
|
|
+ <p class="table-button-p" v-hasPermi="['laboratory:subject:query']" @click="clickPage(7,scope.row)">
|
|
|
|
+ 详情</p>
|
|
|
|
+ <el-dropdown trigger="click" size="mini" @command="(command) => handleCommand(command, scope.row)">
|
|
|
|
+ <p class="table-button-p">更多>></p>
|
|
|
|
+ <el-dropdown-menu slot="dropdown" style="margin:0!important;">
|
|
|
|
+ <el-dropdown-item style="height:36px;line-height:36px;width:90px;text-align: center" command="1"
|
|
|
|
+ v-hasPermiAnd="['laboratory:subject:query','laboratory:subject:edit']">关联配置
|
|
|
|
+ </el-dropdown-item>
|
|
|
|
+ <el-dropdown-item style="height:36px;line-height:36px;width:90px;text-align: center" command="2"
|
|
|
|
+ v-hasPermi="['laboratory:subjectmaterial:add']">准入配置
|
|
|
|
+ </el-dropdown-item>
|
|
|
|
+ <el-dropdown-item style="height:36px;line-height:36px;width:90px;text-align: center" command="3"
|
|
|
|
+ v-hasPermiAnd="['laboratory:subject:query','laboratory:subject:edit']">编辑
|
|
|
|
+ </el-dropdown-item>
|
|
|
|
+ <el-dropdown-item style="height:36px;line-height:36px;width:90px;text-align: center" command="4"
|
|
|
|
+ v-hasPermi="['laboratory:subject:remove']">删除
|
|
|
|
+ </el-dropdown-item>
|
|
|
|
+ </el-dropdown-menu>
|
|
|
|
+ </el-dropdown>
|
|
|
|
+ <p class="table-button-null"></p>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ <pagination
|
|
|
|
+ v-show="total>0"
|
|
|
|
+ :total="total"
|
|
|
|
+ :page.sync="queryParams.page"
|
|
|
|
+ :limit.sync="queryParams.pageSize"
|
|
|
|
+ @pagination="getList"
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <index-right-page ref="indexRightPage"></index-right-page>
|
|
</div>
|
|
</div>
|
|
<!--新增/编辑-->
|
|
<!--新增/编辑-->
|
|
<add-subject v-if="pageType == 2" :subjectData="subjectData"></add-subject>
|
|
<add-subject v-if="pageType == 2" :subjectData="subjectData"></add-subject>
|
|
- <!--物联设备-->
|
|
|
|
- <device-list v-if="pageType == 3" :subjectData="subjectData"></device-list>
|
|
|
|
<!--准入配置-->
|
|
<!--准入配置-->
|
|
<admission-configuration v-if="pageType == 4" :subjectData="subjectData"></admission-configuration>
|
|
<admission-configuration v-if="pageType == 4" :subjectData="subjectData"></admission-configuration>
|
|
<!--关联配置-->
|
|
<!--关联配置-->
|
|
@@ -150,10 +144,8 @@
|
|
laboratorySubRelInfoGetHazardSubRelInfo,
|
|
laboratorySubRelInfoGetHazardSubRelInfo,
|
|
laboratorySubRelInfoUpdateBySort
|
|
laboratorySubRelInfoUpdateBySort
|
|
} from '@/api/integratedManagement/index'
|
|
} from '@/api/integratedManagement/index'
|
|
- import { chemicalCabinetGetDoorList } from '@/api/chemicalManage'
|
|
|
|
import indexRightPage from './indexRightPage/indexRightPage.vue'
|
|
import indexRightPage from './indexRightPage/indexRightPage.vue'
|
|
import addSubject from './addSubject.vue'
|
|
import addSubject from './addSubject.vue'
|
|
- import deviceList from './deviceList.vue'
|
|
|
|
import admissionConfiguration from './admissionConfiguration.vue'
|
|
import admissionConfiguration from './admissionConfiguration.vue'
|
|
import associationConfiguration from './associationConfiguration.vue'
|
|
import associationConfiguration from './associationConfiguration.vue'
|
|
import infoPage from './infoPage.vue'
|
|
import infoPage from './infoPage.vue'
|
|
@@ -162,7 +154,6 @@
|
|
components: {
|
|
components: {
|
|
importComponent,
|
|
importComponent,
|
|
addSubject,
|
|
addSubject,
|
|
- deviceList,
|
|
|
|
admissionConfiguration,
|
|
admissionConfiguration,
|
|
associationConfiguration,
|
|
associationConfiguration,
|
|
infoPage,
|
|
infoPage,
|
|
@@ -230,7 +221,7 @@
|
|
this.pageType = type
|
|
this.pageType = type
|
|
}else if (type == 7) {
|
|
}else if (type == 7) {
|
|
//实验室详情
|
|
//实验室详情
|
|
- this.subjectInfoTwo(row)
|
|
|
|
|
|
+ this.getSubInfo(row,1)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -246,20 +237,15 @@
|
|
})
|
|
})
|
|
break
|
|
break
|
|
case '2':
|
|
case '2':
|
|
- //物联配置
|
|
|
|
- this.pageType = 3
|
|
|
|
- this.$set(this, 'subjectData', row)
|
|
|
|
- break
|
|
|
|
- case '3':
|
|
|
|
//准入配置
|
|
//准入配置
|
|
this.pageType = 4
|
|
this.pageType = 4
|
|
this.$set(this, 'subjectData', row)
|
|
this.$set(this, 'subjectData', row)
|
|
break
|
|
break
|
|
- case '4':
|
|
|
|
|
|
+ case '3':
|
|
//编辑页面
|
|
//编辑页面
|
|
- this.editFun(row)
|
|
|
|
|
|
+ this.getSubInfo(row,2)
|
|
break
|
|
break
|
|
- case '5':
|
|
|
|
|
|
+ case '4':
|
|
//删除
|
|
//删除
|
|
self.$confirm('是否确认删除?', '', {
|
|
self.$confirm('是否确认删除?', '', {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
@@ -278,18 +264,17 @@
|
|
break
|
|
break
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- //实验室编辑
|
|
|
|
- editFun(row) {
|
|
|
|
- laboratorySubRelInfoGetDetailInfo({ infoId: row.infoId }).then(response => {
|
|
|
|
- this.$set(this, 'subjectData', response.data)
|
|
|
|
- this.$set(this, 'pageType', 2)
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- //获取实验室详情
|
|
|
|
- subjectInfoTwo(row) {
|
|
|
|
|
|
+ //获取实验室详情 type:1.详情 2.编辑
|
|
|
|
+ getSubInfo(row,type){
|
|
laboratorySubRelInfoGetDetailInfo({ infoId: row.infoId }).then(response => {
|
|
laboratorySubRelInfoGetDetailInfo({ infoId: row.infoId }).then(response => {
|
|
this.$set(this, 'subjectData', response.data)
|
|
this.$set(this, 'subjectData', response.data)
|
|
- this.$set(this, 'pageType', 6)
|
|
|
|
|
|
+ if(type == 1){
|
|
|
|
+ //详情
|
|
|
|
+ this.$set(this, 'pageType', 6)
|
|
|
|
+ }else if(type == 2){
|
|
|
|
+ //编辑
|
|
|
|
+ this.$set(this, 'pageType', 2)
|
|
|
|
+ }
|
|
})
|
|
})
|
|
},
|
|
},
|
|
//保存当前排序
|
|
//保存当前排序
|
|
@@ -383,63 +368,46 @@
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
.subject {
|
|
.subject {
|
|
- flex: 1;
|
|
|
|
- display: flex !important;
|
|
|
|
|
|
+ flex:1;
|
|
|
|
+ display: flex!important;
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
- ::v-deep .el-table__row {
|
|
|
|
- td:nth-child(1) {
|
|
|
|
- padding: 0;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- ::v-deep .el-table__row{
|
|
|
|
- cursor: pointer;
|
|
|
|
- }
|
|
|
|
|
|
+ box-shadow: none;
|
|
|
|
+ margin:0;
|
|
.subject-page {
|
|
.subject-page {
|
|
- flex: 1;
|
|
|
|
|
|
+ flex:1;
|
|
display: flex;
|
|
display: flex;
|
|
- flex-direction: column;
|
|
|
|
|
|
+ flex-direction: row;
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
- border-radius: 10px;
|
|
|
|
- margin: 5px 0 0 0;
|
|
|
|
- //box-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.1);
|
|
|
|
- .subject-page-min {
|
|
|
|
- flex: 1;
|
|
|
|
- display: flex;
|
|
|
|
- overflow: hidden;
|
|
|
|
- padding: 2px 0 10px 10px;
|
|
|
|
- box-sizing: border-box;
|
|
|
|
- }
|
|
|
|
- .left-subject-list-flex {
|
|
|
|
- flex: 1;
|
|
|
|
- }
|
|
|
|
.left-subject-list {
|
|
.left-subject-list {
|
|
- /*flex:1;*/
|
|
|
|
|
|
+ flex: 1;
|
|
width: 1143px;
|
|
width: 1143px;
|
|
display: flex;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
- margin-right: 6px;
|
|
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.2);
|
|
box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.2);
|
|
border-radius: 10px 10px 10px 10px;
|
|
border-radius: 10px 10px 10px 10px;
|
|
- padding-top: 24px;
|
|
|
|
- margin-bottom: 10px;
|
|
|
|
- .table_border {
|
|
|
|
- flex: 1;
|
|
|
|
- display: flex;
|
|
|
|
- flex-direction: column;
|
|
|
|
- padding: 20px;
|
|
|
|
- box-sizing: border-box;
|
|
|
|
- overflow: hidden;
|
|
|
|
- ::v-deep .el-input--medium .el-input__inner {
|
|
|
|
- height: 26px;
|
|
|
|
- line-height: 26px;
|
|
|
|
- width: 55px;
|
|
|
|
- text-align: center;
|
|
|
|
- padding: 0 10px;
|
|
|
|
|
|
+ margin: 5px 7px 20px 10px;
|
|
|
|
+ .page-content-box {
|
|
|
|
+ .table-box{
|
|
|
|
+ ::v-deep .el-input--medium .el-input__inner {
|
|
|
|
+ height: 26px;
|
|
|
|
+ line-height: 26px;
|
|
|
|
+ width: 55px;
|
|
|
|
+ text-align: center;
|
|
|
|
+ padding: 0 10px;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ ::v-deep .el-table__row {
|
|
|
|
+ td:nth-child(1) {
|
|
|
|
+ padding: 0;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ ::v-deep .el-table__row{
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|