|
@@ -24,9 +24,12 @@
|
|
|
<view class="lab-info-c">
|
|
|
<view class="lab-info-c-t">
|
|
|
<view class="lab-info-c-t-l">{{newData.subName}}</view>
|
|
|
- <view class="lab-info-c-t-r">
|
|
|
- <text>{{newData.levelName}}</text>
|
|
|
- <text>{{newData.typeName}}</text>
|
|
|
+ <view class="lab-info-c-t-r"
|
|
|
+ :style="'border:1rpx solid '+newData.levelColor+';background:'+newData.levelColorTow+';'">
|
|
|
+ <text
|
|
|
+ :style="'border-right:1rpx solid '+newData.levelColor+';color:'+newData.levelColor+';'">{{newData.levelName?newData.levelName:''}}</text>
|
|
|
+ <text
|
|
|
+ :style="'color:'+newData.levelColor+';'">{{newData.typeName?newData.typeName:''}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="lab-info-c-b">
|
|
@@ -97,13 +100,14 @@
|
|
|
<view class="null-box" @click="dialogClose()"></view>
|
|
|
<view class="shade_n">
|
|
|
<view class="title">
|
|
|
- <view>检查批次</view>
|
|
|
+ <view>{{dialogTtile}}</view>
|
|
|
<img src="@/pages_safetyCheck/images/icon_06.png">
|
|
|
</view>
|
|
|
<view class="batch">
|
|
|
- <view class="batch-li" @click="batchClick(item)" v-for="(item,index) in shadeList">
|
|
|
+ <view class="batch-li" @click="batchClick(item)" v-for="(item,index) in batchList">
|
|
|
<view class="batch-li-l">
|
|
|
- <text>{{item.planTitle}}</text>
|
|
|
+ <text v-if="dialogStatus==0">{{item.planTitle}}</text>
|
|
|
+ <text v-if="dialogStatus==1">{{item.checkName}}</text>
|
|
|
</view>
|
|
|
<view class="batch-li-r">
|
|
|
<img src="@/pages_safetyCheck/images/icon_wd_gd@1x.png">
|
|
@@ -129,7 +133,9 @@
|
|
|
pageRestrictVerify
|
|
|
} from '@/utils/index'
|
|
|
import {
|
|
|
- securityAppCheckPlanTitleList,
|
|
|
+ securityAppCheckPlanAppTitleList,
|
|
|
+ securityAppCheckManageList,
|
|
|
+ securityAppCheckSetOptionList,
|
|
|
} from '@/pages_safetyCheck/api/index.js'
|
|
|
import {
|
|
|
iotControl
|
|
@@ -190,13 +196,19 @@
|
|
|
// 空调弹窗
|
|
|
airConditioningData: null,
|
|
|
saoCodeType: false,
|
|
|
- dialogVisible: true,
|
|
|
- shadeList: [],
|
|
|
+ dialogVisible: false,
|
|
|
+ dialogTtile: '',
|
|
|
+ dialogStatus: 0, //0计划 1批次 2实验室
|
|
|
+ batchData: {},
|
|
|
+ batchList: [],
|
|
|
queryParams: {
|
|
|
page: 1,
|
|
|
pageSize: 100,
|
|
|
checkCategory: '', //1校院巡查 2学院自查
|
|
|
+ subId:'',
|
|
|
},
|
|
|
+ checkPlanSetVoList:null,
|
|
|
+ form:{},
|
|
|
|
|
|
}
|
|
|
},
|
|
@@ -216,6 +228,9 @@
|
|
|
newData.labInfoBrandModels[i].showType = true;
|
|
|
}
|
|
|
}
|
|
|
+ if(newData.levelColor){
|
|
|
+ newData.levelColorTow = this.hexToRgb(newData.levelColor, 0.2)
|
|
|
+ }
|
|
|
this.$nextTick(() => {
|
|
|
this.$set(this, 'newData', newData);
|
|
|
this.$set(this, 'subjectData', newData);
|
|
@@ -227,24 +242,91 @@
|
|
|
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.securityAppCheckPlanTitleList();
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
+ dialogClose(){
|
|
|
+ this.dialogVisible=false;
|
|
|
+ },
|
|
|
+ //十六进制颜色值和RGB格式转换
|
|
|
+ hexToRgb(hex, opacity = 1) {
|
|
|
+ // 去除#号
|
|
|
+ var color = hex.replace("#", "");
|
|
|
+ // 分割成红、绿、蓝三部分的16进制字符串
|
|
|
+ var red = parseInt(color.substring(0, 2), 16);
|
|
|
+ var green = parseInt(color.substring(2, 4), 16);
|
|
|
+ var blue = parseInt(color.substring(4, 6), 16);
|
|
|
+ return `RGB(${red}, ${green}, ${blue},${opacity})`;
|
|
|
+ },
|
|
|
+ batchClick(row) {
|
|
|
+ let self=this;
|
|
|
+ if (this.dialogStatus == 0) { //计划点击
|
|
|
+ if (row.checkPlanSetVoList.length ==1) {
|
|
|
+ //如果只有1个检查批次不弹窗
|
|
|
+ this.$set(this, 'batchData', {
|
|
|
+ planId: row.planId,
|
|
|
+ planTitle: row.planTitle,
|
|
|
+ checkCategory: row.checkCategory,
|
|
|
+ checkTypeName: row.checkTypeName,
|
|
|
+ crossCheck: row.crossCheck,
|
|
|
+ checkPlanSetVoList: row.checkPlanSetVoList[0]
|
|
|
+ });
|
|
|
+ let planSetId = row.checkPlanSetVoList[0].planSetId
|
|
|
+ self.checkPlanSetVoList=row.checkPlanSetVoList[0];
|
|
|
+ self.securityAppCheckManageList(planSetId)
|
|
|
+ } else {
|
|
|
+ this.$set(this, 'batchData', {
|
|
|
+ planId: row.planId,
|
|
|
+ planTitle: row.planTitle,
|
|
|
+ checkCategory: row.checkCategory,
|
|
|
+ checkTypeName: row.checkTypeName,
|
|
|
+ crossCheck: row.crossCheck,
|
|
|
+ });
|
|
|
+ this.$set(this, 'batchList', row.checkPlanSetVoList);
|
|
|
+ this.dialogStatus = 1;
|
|
|
+ this.dialogTtile = '批次';
|
|
|
+ this.dialogVisible = true;
|
|
|
+
|
|
|
+ }
|
|
|
+ } else if (this.dialogStatus == 1) { //批次点击
|
|
|
+ this.dialogStatus = 2;
|
|
|
+ this.dialogTtile = '实验室';
|
|
|
+ let planSetId = row.planSetId
|
|
|
+ console.log(row)
|
|
|
+ self.checkPlanSetVoList=row;
|
|
|
+ this.securityAppCheckManageList(planSetId)
|
|
|
+ }
|
|
|
+ },
|
|
|
//查询计划
|
|
|
- async securityAppCheckPlanTitleList() {
|
|
|
+ async securityAppCheckPlanAppTitleList() {
|
|
|
+ console.log(this.newData.subId)
|
|
|
+ this.queryParams.subId=this.newData.subId;
|
|
|
+ this.queryParams.checkStatus=1;
|
|
|
let self = this;
|
|
|
const {
|
|
|
data
|
|
|
- } = await securityAppCheckPlanTitleList(this.queryParams);
|
|
|
- if (data.code == 200) {
|
|
|
- //this.shadeList = data.data.records;
|
|
|
- if (data.data.record[0]) { //一个计划
|
|
|
- let planSetId = data.data.record[0]
|
|
|
- if (data.data.record[0].checkPlanSetVoList[0]) { //一个批次
|
|
|
- let planSetId = data.data.record[0].checkPlanSetVoList[0].planSetId
|
|
|
+ } = await securityAppCheckPlanAppTitleList(this.queryParams);
|
|
|
+ if (data.code == 200 && data.data.records[0]) {
|
|
|
+ if (data.data.records.length == 1) { //一个计划
|
|
|
+ let planSetId = data.data.records[0]
|
|
|
+ if (data.data.records[0].checkPlanSetVoList[0]) { //一个批次
|
|
|
+ let planSetId = data.data.records[0].checkPlanSetVoList[0].planSetId
|
|
|
+ self.checkPlanSetVoList=data.data.records[0].checkPlanSetVoList[0];
|
|
|
self.securityAppCheckManageList(planSetId)
|
|
|
}
|
|
|
+ } else { //多个计划
|
|
|
+ this.batchList = data.data.records;
|
|
|
+ this.dialogVisible = true;
|
|
|
+ this.dialogTtile = '计划标题';
|
|
|
}
|
|
|
+ }else{
|
|
|
+ uni.showToast({
|
|
|
+ title: '该实验室暂无检查计划!',
|
|
|
+ icon: "none",
|
|
|
+ mask: true,
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ return
|
|
|
}
|
|
|
},
|
|
|
//检查任务-在此结果里对比实验室Id判断是否有实验室
|
|
@@ -254,53 +336,56 @@
|
|
|
page: 1,
|
|
|
pageSize: 20,
|
|
|
planSetId: planSetId,
|
|
|
+ subId:self.newData.subId,
|
|
|
}
|
|
|
const {
|
|
|
data
|
|
|
- } = await securityAppCheckManageList(this.queryParams);
|
|
|
+ } = await securityAppCheckManageList(obj);
|
|
|
if (data.code == 200) {
|
|
|
//this.shadeList = data.data.records;
|
|
|
- data.data.records.forEach(function(item, index) {
|
|
|
- if (self.newData.subId == item.subId) {
|
|
|
- let manageId = item.manageId
|
|
|
- self.securityAppCheckSetOptionList(manageId)
|
|
|
- } else {
|
|
|
- uni.showToast({
|
|
|
- title: '该实验室暂无检查计划!',
|
|
|
- icon: "none",
|
|
|
- mask: true,
|
|
|
- duration: 2000
|
|
|
- });
|
|
|
- return
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
+ if(data.data.records[0]){
|
|
|
+ let manageId = data.data.records[0].manageId;
|
|
|
+ self.securityAppCheckSetOptionList(data.data.records[0]);
|
|
|
+ }else {
|
|
|
+ self.dialogVisible = false;
|
|
|
+ uni.showToast({
|
|
|
+ title: '该实验室暂无检查计划!',
|
|
|
+ icon: "none",
|
|
|
+ mask: true,
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
},
|
|
|
//查询检查项
|
|
|
- async securityAppCheckSetOptionList(manageId) {
|
|
|
+ async securityAppCheckSetOptionList(item) {
|
|
|
let self = this;
|
|
|
+ let upData=item;
|
|
|
let obj = {
|
|
|
page: 1,
|
|
|
pageSize: 20,
|
|
|
checkStatus: '0',
|
|
|
- manageId: manageId,
|
|
|
+ manageId: upData.manageId,
|
|
|
}
|
|
|
const {
|
|
|
data
|
|
|
- } = await securityAppCheckManageList(this.queryParams);
|
|
|
+ } = await securityAppCheckSetOptionList(obj);
|
|
|
if (data.code == 200) {
|
|
|
if (data.data.records[0]) {
|
|
|
- let infoData = row;
|
|
|
+ let infoData = {};
|
|
|
infoData.pageType = 0;
|
|
|
infoData.itemsStatus = 0;
|
|
|
+ infoData.subName = upData.subName;
|
|
|
+ infoData.checkPlanSetVoList = self.checkPlanSetVoList;
|
|
|
+ infoData.roomNum = upData.roomNum;
|
|
|
infoData.subId = data.data.records[0].subId;
|
|
|
infoData.manageId = data.data.records[0].manageId;
|
|
|
infoData.setOptionId = data.data.records[0].setOptionId;
|
|
|
infoData.hazardCheckPro = data.data.records[0].hazardCheckPro;
|
|
|
uni.redirectTo({
|
|
|
- url: '/pages_safetyCheck/views/inspectManage/inspectAdd?infoData=' +
|
|
|
+ url: '/pages_safetyCheck/views/inspectManage/conductInspections?infoData=' +
|
|
|
encodeURIComponent(
|
|
|
JSON
|
|
|
.stringify(infoData))
|
|
@@ -380,13 +465,28 @@
|
|
|
}
|
|
|
if (type == 'securityCheck') {
|
|
|
//安全检查
|
|
|
- uni.navigateTo({
|
|
|
+ this.securityAppCheckPlanAppTitleList();
|
|
|
+ /* uni.navigateTo({
|
|
|
url: "/pages_safetyCheck/views/safetyCheck",
|
|
|
- });
|
|
|
+ }); */
|
|
|
} else if (type == 'snapshot') {
|
|
|
- //随手拍
|
|
|
- uni.navigateTo({
|
|
|
- url: "/pages_safetyCheck/views/snapshotManage/snapshotList",
|
|
|
+ console.log(this.newData)
|
|
|
+ this.$set(this.form, "subId", this.newData.subId)
|
|
|
+ this.$set(this.form, "subName", this.newData.subName)
|
|
|
+ this.$set(this.form, "subRoom", this.newData.roomNum)
|
|
|
+ this.$set(this.form, "deptId", this.newData.deptId)
|
|
|
+ this.$set(this.form, "deptName", this.newData.deptName)
|
|
|
+ this.$set(this.form, "buildId", this.newData.buildId)
|
|
|
+ this.$set(this.form, "buildName", this.newData.buildName)
|
|
|
+ this.$set(this.form, "floorId", this.newData.floorId)
|
|
|
+ this.$set(this.form, "floorName", this.newData.floorName)
|
|
|
+ this.$set(this.form, "typeId", this.newData.typeId)
|
|
|
+ this.$set(this.form, "classTypeNames", this.newData.typeName)
|
|
|
+ this.$set(this.form, "levelId", this.newData.levelId)
|
|
|
+ this.$set(this.form, "classLevelName", this.newData.levelName)
|
|
|
+ uni.redirectTo({
|
|
|
+ url: '/pages_safetyCheck/views/snapshotManage/snapshotList?form=' +
|
|
|
+ encodeURIComponent(JSON.stringify(this.form))
|
|
|
});
|
|
|
}
|
|
|
},
|
|
@@ -515,8 +615,8 @@
|
|
|
}
|
|
|
|
|
|
.lab-info-c {
|
|
|
+ width: 500rpx;
|
|
|
margin: 24rpx 30rpx 0 20rpx;
|
|
|
- flex: 1;
|
|
|
|
|
|
.lab-info-c-t {
|
|
|
display: flex;
|