|
@@ -15,8 +15,10 @@
|
|
<div class="page-form-title-box">
|
|
<div class="page-form-title-box">
|
|
<el-form :model="queryParams" class="form-box" ref="queryForm"
|
|
<el-form :model="queryParams" class="form-box" ref="queryForm"
|
|
:inline="true" style="width:100%;">
|
|
:inline="true" style="width:100%;">
|
|
- <el-form-item label="" prop="queryParamsData2">
|
|
|
|
- <el-select v-model="queryParams.queryParamsData2" placeholder="请选择学院" style="width: 160px">
|
|
|
|
|
|
+ <el-form-item label="" prop="deptId">
|
|
|
|
+ <el-select v-model="queryParams.deptId"
|
|
|
|
+ placeholder="请选择学院"
|
|
|
|
+ style="width: 140px">
|
|
<el-option
|
|
<el-option
|
|
v-for="item in deptOptions"
|
|
v-for="item in deptOptions"
|
|
:key="item.deptId"
|
|
:key="item.deptId"
|
|
@@ -25,39 +27,41 @@
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="" prop="queryParamsData3">
|
|
|
|
|
|
+ <el-form-item label="" prop="floorId">
|
|
<el-cascader
|
|
<el-cascader
|
|
- style="width: 180px"
|
|
|
|
|
|
+ style="width: 120px"
|
|
placeholder="请选择楼栋楼层"
|
|
placeholder="请选择楼栋楼层"
|
|
- :props="{value: 'id', label: 'name',children:'buildFloorVoList'}"
|
|
|
|
- v-model="queryParams.queryParamsData3"
|
|
|
|
|
|
+ :props="{value: 'id', label: 'name',children:'buildFloorVoList',checkStrictly: true}"
|
|
|
|
+ v-model="queryParams.buildIdAndfloorId"
|
|
:options="buildFloorOptions">
|
|
:options="buildFloorOptions">
|
|
</el-cascader>
|
|
</el-cascader>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="" prop="queryParamsData4">
|
|
|
|
- <el-select v-model="queryParams.queryParamsData4" placeholder="请选择级别" style="width: 140px">
|
|
|
|
|
|
+ <el-form-item label="" prop="chemicalLevel">
|
|
|
|
+ <el-select v-model="queryParams.chemicalLevel"
|
|
|
|
+ placeholder="请选择级别" style="width: 140px">
|
|
<el-option
|
|
<el-option
|
|
- v-for="dict in optionList"
|
|
|
|
- :key="dict.value"
|
|
|
|
- :label="dict.label"
|
|
|
|
- :value="dict.value"
|
|
|
|
|
|
+ v-for="item in levelOptions"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="" prop="queryParamsData5">
|
|
|
|
- <el-select v-model="queryParams.queryParamsData5" placeholder="请选择类别" style="width: 140px">
|
|
|
|
|
|
+ <el-form-item label="" prop="chemicalCategory">
|
|
|
|
+ <el-select v-model="queryParams.chemicalCategory"
|
|
|
|
+ placeholder="请选择类别" style="width: 140px">
|
|
<el-option
|
|
<el-option
|
|
- v-for="dict in optionList"
|
|
|
|
- :key="dict.value"
|
|
|
|
- :label="dict.label"
|
|
|
|
- :value="dict.value"
|
|
|
|
|
|
+ v-for="item in categoryOptions"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="" prop="queryParamsData1">
|
|
|
|
|
|
+ <el-form-item label="" prop="searchValue">
|
|
<el-input
|
|
<el-input
|
|
maxLength="30"
|
|
maxLength="30"
|
|
- v-model="queryParams.queryParamsData1"
|
|
|
|
|
|
+ v-model="queryParams.searchValue"
|
|
placeholder="化学品名/CAS/编码/实验室/房间号/姓名/联系方式"
|
|
placeholder="化学品名/CAS/编码/实验室/房间号/姓名/联系方式"
|
|
style="width: 340px"
|
|
style="width: 340px"
|
|
/>
|
|
/>
|
|
@@ -73,17 +77,29 @@
|
|
<el-table class="table-box" v-loading="loading" border :data="dataList"
|
|
<el-table class="table-box" v-loading="loading" border :data="dataList"
|
|
@selection-change="handleSelectionChange" :row-key="getRowKeys">
|
|
@selection-change="handleSelectionChange" :row-key="getRowKeys">
|
|
<el-table-column type="selection" width="50" align="center" fixed :reserve-selection="true"/>
|
|
<el-table-column type="selection" width="50" align="center" fixed :reserve-selection="true"/>
|
|
- <el-table-column label="名称" prop="name" width="200" fixed="" show-overflow-tooltip/>
|
|
|
|
- <el-table-column label="CAS" prop="content" width="150" show-overflow-tooltip/>
|
|
|
|
- <el-table-column label="类别" prop="content" width="150" show-overflow-tooltip/>
|
|
|
|
- <el-table-column label="级别" prop="content" width="120" show-overflow-tooltip/>
|
|
|
|
- <el-table-column label="学院" prop="content" width="120" show-overflow-tooltip/>
|
|
|
|
- <el-table-column label="楼栋楼层" prop="content" width="150" show-overflow-tooltip/>
|
|
|
|
- <el-table-column label="实验室" prop="content" width="250" show-overflow-tooltip/>
|
|
|
|
- <el-table-column label="实验室负责人" prop="content" width="170" show-overflow-tooltip/>
|
|
|
|
- <el-table-column label="安全员" prop="content" width="170" show-overflow-tooltip/>
|
|
|
|
- <el-table-column label="库存量" prop="content" width="130" show-overflow-tooltip/>
|
|
|
|
- <el-table-column label="数量" prop="content" width="100" show-overflow-tooltip/>
|
|
|
|
|
|
+ <el-table-column label="名称" prop="chemicalName" width="200" fixed="" show-overflow-tooltip/>
|
|
|
|
+ <el-table-column label="CAS" prop="casNum" width="150" show-overflow-tooltip/>
|
|
|
|
+ <el-table-column label="类别" prop="chemicalCategoryName" width="150" show-overflow-tooltip/>
|
|
|
|
+ <el-table-column label="级别" prop="chemicalLevelName" width="120" show-overflow-tooltip/>
|
|
|
|
+ <el-table-column label="学院" prop="deptName" width="120" show-overflow-tooltip/>
|
|
|
|
+ <el-table-column label="楼栋楼层" prop="content" width="150" show-overflow-tooltip>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span>{{scope.row.buildName}}-{{scope.row.floorName}}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="实验室" prop="content" width="230" show-overflow-tooltip>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span>{{scope.row.subName}}({{scope.row.subRoom}})</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="实验室负责人" prop="adminUser" width="170" show-overflow-tooltip/>
|
|
|
|
+ <el-table-column label="安全员" prop="safeUser" width="170" show-overflow-tooltip/>
|
|
|
|
+ <el-table-column label="库存量" prop="content" width="120" show-overflow-tooltip>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span>{{scope.row.surplus}}{{scope.row.specUnit}}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="数量" prop="chemicalNumber" width="100" show-overflow-tooltip/>
|
|
<el-table-column label="操作" width="150" show-overflow-tooltip v-if="tableButtonType">
|
|
<el-table-column label="操作" width="150" show-overflow-tooltip v-if="tableButtonType">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<div class="table-button-box">
|
|
<div class="table-button-box">
|
|
@@ -114,14 +130,12 @@
|
|
<list-page :propsData="propsData" v-if="pageType === 2"></list-page>
|
|
<list-page :propsData="propsData" v-if="pageType === 2"></list-page>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
-<script>
|
|
|
|
- //import { getDicts } from "@/api/commonality/noPermission";
|
|
|
|
- //import { systemUserSelect } from "@/api/commonality/permission";
|
|
|
|
- //import { getInfo } from "@/api/basicsModules/index";
|
|
|
|
- //import addPage from "./addPage.vue";
|
|
|
|
|
|
+<script>;
|
|
import listPage from "./listPage.vue"
|
|
import listPage from "./listPage.vue"
|
|
import exportComponent from "@/components/exportComponent/exportComponent.vue";
|
|
import exportComponent from "@/components/exportComponent/exportComponent.vue";
|
|
import { getDeptDropList,systemBuildingGetTreeList,} from "@/api/commonality/permission";
|
|
import { getDeptDropList,systemBuildingGetTreeList,} from "@/api/commonality/permission";
|
|
|
|
+ import { getDicts } from '@/api/commonality/noPermission'
|
|
|
|
+ import { chemicalStockStockCollectList } from '@/api/chemicalManage'
|
|
export default {
|
|
export default {
|
|
name: 'collectList',
|
|
name: 'collectList',
|
|
components: {
|
|
components: {
|
|
@@ -139,9 +153,17 @@
|
|
},
|
|
},
|
|
tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
|
|
tableButtonType:this.hasPermiDom(['demo:demo:detail','demo:demo:edit','demo:demo:del',]),
|
|
//页面状态
|
|
//页面状态
|
|
- pageType:2,
|
|
|
|
|
|
+ pageType:1,
|
|
//页面遮罩
|
|
//页面遮罩
|
|
loading:false,
|
|
loading:false,
|
|
|
|
+ //类别
|
|
|
|
+ categoryOptions:[],
|
|
|
|
+ //级别
|
|
|
|
+ levelOptions:[
|
|
|
|
+ {label:'请选择级别',value:''},
|
|
|
|
+ {label:'管控',value:'1'},
|
|
|
|
+ {label:'非管控',value:'2'},
|
|
|
|
+ ],
|
|
//学院
|
|
//学院
|
|
deptOptions:[],
|
|
deptOptions:[],
|
|
//楼栋楼层
|
|
//楼栋楼层
|
|
@@ -152,8 +174,13 @@
|
|
queryParams:{
|
|
queryParams:{
|
|
page:1,
|
|
page:1,
|
|
pageSize:20,
|
|
pageSize:20,
|
|
- queryParamsData1:"",
|
|
|
|
- queryParamsData2 :null,
|
|
|
|
|
|
+ deptId :null,
|
|
|
|
+ floorId :null,
|
|
|
|
+ buildId :null,
|
|
|
|
+ chemicalLevel :null,
|
|
|
|
+ chemicalCategory :null,
|
|
|
|
+ searchValue :null,
|
|
|
|
+ buildIdAndfloorId :[],
|
|
},
|
|
},
|
|
//列表数据
|
|
//列表数据
|
|
dataList:[{},{},{},{},],
|
|
dataList:[{},{},{},{},],
|
|
@@ -172,6 +199,7 @@
|
|
},
|
|
},
|
|
mounted () {
|
|
mounted () {
|
|
this.getDeptDropList();
|
|
this.getDeptDropList();
|
|
|
|
+ this.getDicts();
|
|
this.systemBuildingGetTreeList();
|
|
this.systemBuildingGetTreeList();
|
|
this.getList();
|
|
this.getList();
|
|
},
|
|
},
|
|
@@ -179,8 +207,22 @@
|
|
titleClick(){
|
|
titleClick(){
|
|
this.$parent.titleTypeButton(1);
|
|
this.$parent.titleTypeButton(1);
|
|
},
|
|
},
|
|
|
|
+ //获取化学品类别
|
|
|
|
+ getDicts(){
|
|
|
|
+ getDicts('chemicals_category').then(response => {
|
|
|
|
+ this.$set(this,'categoryOptions',response.data);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
//查询按钮
|
|
//查询按钮
|
|
handleQuery(){
|
|
handleQuery(){
|
|
|
|
+ if (this.queryParams.buildIdAndfloorId[0]){
|
|
|
|
+ if (this.queryParams.buildIdAndfloorId.length ==1){
|
|
|
|
+ this.$set(this.queryParams,'buildId',this.queryParams.buildIdAndfloorId[0]);
|
|
|
|
+ }else if (this.queryParams.buildIdAndfloorId.length ==2){
|
|
|
|
+ this.$set(this.queryParams,'buildId',this.queryParams.buildIdAndfloorId[0]);
|
|
|
|
+ this.$set(this.queryParams,'floorId',this.queryParams.buildIdAndfloorId[1]);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
this.$set(this.queryParams,'page',1);
|
|
this.$set(this.queryParams,'page',1);
|
|
this.getList();
|
|
this.getList();
|
|
},
|
|
},
|
|
@@ -190,28 +232,33 @@
|
|
this.$set(this,'queryParams',{
|
|
this.$set(this,'queryParams',{
|
|
page:1,
|
|
page:1,
|
|
pageSize:20,
|
|
pageSize:20,
|
|
- queryParamsData1:"",
|
|
|
|
- queryParamsData2 :null,
|
|
|
|
|
|
+ deptId :null,
|
|
|
|
+ floorId :null,
|
|
|
|
+ buildId :null,
|
|
|
|
+ chemicalLevel :null,
|
|
|
|
+ chemicalCategory :null,
|
|
|
|
+ useStatus :null,
|
|
|
|
+ searchValue :null,
|
|
|
|
+ buildIdAndfloorId :[],
|
|
});
|
|
});
|
|
this.getList();
|
|
this.getList();
|
|
},
|
|
},
|
|
//获取数据列表
|
|
//获取数据列表
|
|
getList(){
|
|
getList(){
|
|
- // this.$set(this,'loading',true);
|
|
|
|
- // getListFunction(this.queryParams).then(response => {
|
|
|
|
- // this.$set(this,'loading',false);
|
|
|
|
- // this.$set(this,'dataList',response.data.records);
|
|
|
|
- // this.$set(this,'total',response.data.total);
|
|
|
|
- // });
|
|
|
|
|
|
+ this.$set(this,'loading',true);
|
|
|
|
+ chemicalStockStockCollectList(this.queryParams).then(response => {
|
|
|
|
+ this.$set(this,'loading',false);
|
|
|
|
+ this.$set(this,'dataList',response.data.records);
|
|
|
|
+ this.$set(this,'total',response.data.total);
|
|
|
|
+ });
|
|
},
|
|
},
|
|
//操作按钮
|
|
//操作按钮
|
|
tableButton(type,row){
|
|
tableButton(type,row){
|
|
if(type == 2){
|
|
if(type == 2){
|
|
//详情
|
|
//详情
|
|
- let obj = JSON.parse(JSON.stringify(row))
|
|
|
|
- this.$set(this,'propsData',obj);
|
|
|
|
|
|
+ this.$set(this,'propsData',row);
|
|
this.$set(this,'pageType',2);
|
|
this.$set(this,'pageType',2);
|
|
- }else if(type == 1){
|
|
|
|
|
|
+ }else if(type == 'out'){
|
|
//返回并刷新
|
|
//返回并刷新
|
|
this.$set(this,'pageType',1);
|
|
this.$set(this,'pageType',1);
|
|
this.$set(this,'propsData',{});
|
|
this.$set(this,'propsData',{});
|