|
@@ -81,11 +81,11 @@
|
|
|
{{scope.row.rectifyStatus==0?'待整改':(scope.row.rectifyStatus==1?'已整改':(scope.row.rectifyStatus==2?'暂无法整改':''))}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" align="center" prop="deptName" width="70">
|
|
|
+ <el-table-column label="操作" align="center" prop="deptName" width="100">
|
|
|
<template slot-scope="scope">
|
|
|
<div class="table-button-box">
|
|
|
<p class="table-button-null"></p>
|
|
|
- <p class="table-button-p" @click="goPage(3,scope.row)" v-hasPermi="['safety:rectifyClap:query']">详情</p>
|
|
|
+ <p class="table-button-p" @click="goPage(3,scope.row)" v-hasPermiRouter="['safety:rectifyClap:query']">详情</p>
|
|
|
<p class="table-button-null"></p>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -131,9 +131,9 @@
|
|
|
:loading="dialogLoading">
|
|
|
<el-option
|
|
|
v-for="item in dialogSubList"
|
|
|
- :key="item.id"
|
|
|
- :label="item.name"
|
|
|
- :value="item.id">
|
|
|
+ :key="item.subId"
|
|
|
+ :label="item.subName"
|
|
|
+ :value="item.subId">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -180,12 +180,12 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import { securityCheckClapList,checkClapAdd } from '@/apiDemo/safetyCheck/index'
|
|
|
- import { getSubjectDictByViolation } from "@/apiDemo/laboratory/violation";
|
|
|
- import { listDepartments } from "@/apiDemo/system/dept";
|
|
|
+ import { securityCheckClapList,checkClapAdd } from '@/api/safetyCheck/index'
|
|
|
import listPage from './listPage.vue'
|
|
|
import infoPage from './infoPage.vue'
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
+ import { getDeptDropList } from '@/api/commonality/permission'
|
|
|
+ import { laboratorySubRelInfoGetListByDeptId } from '@/api/safetyCheck'
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
components: {
|
|
@@ -197,7 +197,7 @@
|
|
|
loading:false,
|
|
|
uploadImgUrl: this.uploadUrl(), // 上传的图片服务器地址
|
|
|
headers: {
|
|
|
- Authorization: "Bearer " + getToken(),
|
|
|
+ Authorization:getToken(),
|
|
|
},
|
|
|
pageType:1,
|
|
|
deptSelectList:[],
|
|
@@ -312,15 +312,12 @@
|
|
|
//获取数据列表
|
|
|
getList(){
|
|
|
let obj = JSON.parse(JSON.stringify(this.queryParams))
|
|
|
- if(this.dateRange[0]){
|
|
|
- obj.beginTime = this.dateRange[0]
|
|
|
- }else{
|
|
|
- obj.beginTime = ""
|
|
|
- }
|
|
|
- if(this.dateRange[1]){
|
|
|
- obj.endTime = this.dateRange[1]
|
|
|
- }else{
|
|
|
- obj.endTime = ""
|
|
|
+ if(this.dateRange[0]) {
|
|
|
+ obj.beginTime=this.dateRange[0]+'T00:00:00';
|
|
|
+ obj.endTime=this.dateRange[1]+'T23:59:59';
|
|
|
+ } else {
|
|
|
+ obj.beginTime='';
|
|
|
+ obj.endTime='';
|
|
|
}
|
|
|
let self = this;
|
|
|
setTimeout(function(){
|
|
@@ -429,7 +426,8 @@
|
|
|
let obj = {
|
|
|
deptId:val,
|
|
|
}
|
|
|
- getSubjectDictByViolation(obj).then(response => {
|
|
|
+
|
|
|
+ laboratorySubRelInfoGetListByDeptId({deptIds:[val],subName:''}).then(response => {
|
|
|
this.$set(this,'dialogSubListData',response.data);
|
|
|
this.$set(this,'dialogSubList',response.data);
|
|
|
for(let i=0;i<self.deptSelectList.length;i++){
|
|
@@ -440,13 +438,25 @@
|
|
|
this.$set(this.addDialogForm,'subId','');
|
|
|
this.$set(this.addDialogForm,'subName','');
|
|
|
});
|
|
|
+
|
|
|
+ // getSubjectDictByViolation(obj).then(response => {
|
|
|
+ // this.$set(this,'dialogSubListData',response.data);
|
|
|
+ // this.$set(this,'dialogSubList',response.data);
|
|
|
+ // for(let i=0;i<self.deptSelectList.length;i++){
|
|
|
+ // if(val == self.deptSelectList[i].deptId){
|
|
|
+ // self.$set(self.addDialogForm,'deptName',self.deptSelectList[i].deptName);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // this.$set(this.addDialogForm,'subId','');
|
|
|
+ // this.$set(this.addDialogForm,'subName','');
|
|
|
+ // });
|
|
|
},
|
|
|
//实验室选中
|
|
|
dialogSubChange(val){
|
|
|
let self = this;
|
|
|
for(let i=0;i<self.dialogSubList.length;i++){
|
|
|
- if(val == self.dialogSubList[i].id){
|
|
|
- self.$set(self.addDialogForm,'subName',self.dialogSubList[i].name);
|
|
|
+ if(val == self.dialogSubList[i].subId){
|
|
|
+ self.$set(self.addDialogForm,'subName',self.dialogSubList[i].subName);
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -455,7 +465,7 @@
|
|
|
let self = this;
|
|
|
let list = [];
|
|
|
for(let i=0;i<self.dialogSubListData.length;i++){
|
|
|
- if(self.dialogSubListData[i].name.indexOf(val) != -1){
|
|
|
+ if(self.dialogSubListData[i].subName.indexOf(val) != -1){
|
|
|
list.push(self.dialogSubListData[i]);
|
|
|
}
|
|
|
}
|
|
@@ -463,8 +473,8 @@
|
|
|
},
|
|
|
//获取学院列表
|
|
|
listDepartments(){
|
|
|
- listDepartments().then(response => {
|
|
|
- this.deptSelectList = response.data;
|
|
|
+ getDeptDropList({deptName:"",level:2,deptType:1}).then(response => {
|
|
|
+ this.$set(this, 'deptSelectList', response.data)
|
|
|
});
|
|
|
},
|
|
|
}
|