| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066 |
- <!-- 检查详情 -->
- <template>
- <view class="snapshotDetail">
- <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
- <view class="list">
- <view class="list-li srearch">
- <view class="srearch-l">{{newData.subName?newData.subName:'实验室名称'}}</view>
- </view>
- <view class="list-li" style="margin-bottom: 20rpx;border:none;">
- <view>
- {{newData.roomNum?newData.roomNum:''}}房间&{{newData.buildName?newData.buildName:'楼栋'}}&{{newData.deptName?newData.deptName:'学院单位'}}
- </view>
- </view>
- <view v-if="newData.checkCollapse">
- <view class="list-li">
- <view>现场照片</view>
- </view>
- <view v-if="pageType==0" class="photo" @click="lockImg(newData.photoList)">
- <img v-for="(item,index) in newData.photoList" :src="baseUrl+item.fileUrl">
- </view>
- <view class="list-li" style="border-bottom: none;">
- <view> {{newData.hazardCheckCode?newData.hazardCheckCode:''}}
- {{newData.hazardCheckName?newData.hazardCheckName:'检查项'}}
- </view>
- </view>
- <view class="hazardCheckNum" @click="hiddenDangerClick()">
- <img class="hazardCheckNum-l" :src="imagesUrl('safetyCheck/icon_aqjc_yinhuan.png')">
- <view class="hazardCheckNum-r">{{'已连续出现'+hazardCheckNum+'次隐患'}} </view>
- </view>
- <view class="list-li">
- <view>隐患描述</view>
- <view></view>
- </view>
- <view class="hidden" v-if="!newData.checkFlag">
- <view class="hidden-content">{{newData.hazardDescribe}}</view>
- </view>
- <view v-if="pageType==1 || pageType==2" class="photo" @click="lockImg(newData.yhDtoList)">
- <img v-for="(item,index) in newData.yhDtoList" :src="baseUrl+item.fileUrl">
- </view>
- <!-- <view class="list-li">
- <view>检查人:</view>
- <view>{{newData.checkUserName}}</view>
- </view> -->
- <view class="list-li">
- <view>检查时间</view>
- <view>{{newData.checkTime}}</view>
- </view>
- </view>
- <view v-if="pageType==1 || pageType==2" v-for="(item,index) in newData.checkRectifyVoList" :key="index">
- <view class="list-li" v-if="item.rectifyTime" @click="rectifyCollapse(item)">
- <view>隐患整改</view>
- <view :id="item.rectifyResult?'fontColor-B':(item.rectifyResult?'fontColor-C':'')">
- {{item.rectifyResult?'已整改':(item.rectifyResult?'暂无法整改':'')}}
- <img v-if="!item.rectifyCollapse" :src="imagesUrl('commonality/icon_06.png')">
- <img v-if="item.rectifyCollapse" :src="imagesUrl('commonality/icon_06_1.png')">
- </view>
- </view>
- <view v-if="item.rectifyCollapse && item.rectifyTime">
- <view v-if="item.rectifyMeasure" class="hidden">
- <view class="hidden-content">{{item.rectifyMeasure}}</view>
- </view>
- <view class="photo" @click="lockImg(item.rectifyUploadList)">
- <img v-for="(item2,index2) in item.rectifyUploadList" :src="baseUrl+item2.fileUrl">
- </view>
- <view class="list-li">
- <view>整改者:</view>
- <view>{{item.rectifyName}}</view>
- </view>
- <view class="list-li">
- <view>整改时间</view>
- <view>{{item.rectifyTime}}</view>
- </view>
- </view>
- <!----复查相关暂时注释----开始---->
- <!-- <view class="list-li" v-if="item.reviewTime" @click="reviewCollapse(item)">
- <view>复查验证</view>
- <view :id="item.examineResult?'fontColor-B':'fontColor-C'">
- {{item.examineResult?'复查完毕':'退回整改'}}
- <img v-if="!item.reviewCollapse" :src="imagesUrl('commonality/icon_06.png')">
- <img v-if="item.reviewCollapse" :src="imagesUrl('commonality/icon_06_1.png')">
- </view>
- </view>
- <view v-if="item.reviewCollapse && item.reviewTime">
- <view v-if="item.examineOpinion" class="hidden">
- <view class="hidden">
- <view class="hidden-content">{{item.examineOpinion}}</view>
- </view>
- </view>
- <view class="photo" v-if="item.examineUploadList[0]" @click="lockImg(item.examineUploadList)">
- <img v-for="(item3,index3) in item.examineUploadList" :src="baseUrl+item3.fileUrl">
- </view>
- <view class="list-li">
- <view>复查时间</view>
- <view>{{item.reviewTime}}</view>
- </view>
- </view> -->
- <!----复查相关暂时注释----结束---->
- </view>
- <view class="voice" v-if="newData.voiceList[0] && !newData.rectifyStatus">
- <view class="voice_t">
- <view class="voice_t_t" v-if="!newData.voiceList[0]"><text>语音备注:</text><text></text></view>
- <view class="voice_t_b" v-if="newData.voiceList[0]">语音备注:({{newData.voiceList.length}})
- </view>
- </view>
- <view class="voice_b" v-if="newData.voiceList[0]"
- v-for="(voiceItem,voiceIndex) in newData.voiceList" :key="voiceIndex">
- <view class="voice_b_l" @tap="voicePlay(voiceItem.fileUrl)">
- <img class="add-button" :src="imagesUrl('safetyCheck/icon_yybz_yy.png')" />
- {{voiceItem.fileLength}}″
- </view>
- </view>
- </view>
- </view>
- </scroll-view>
- <view class="subBtn">
- <!-- 检查 -->
- <!-- <img @click="saoCode()" v-if="pageType==0" :src="imagesUrl('safetyCheck/icon_aqjc_saoma.png')"> -->
- <img @click="submitBtn(1)" v-if="pageType==0 && newData.checkSetProgress !=100 && !hiddenDangerRecordStatus && optionData.manageStatus !=2"
- :src="imagesUrl('safetyCheck/icon_aqjc_bianji.png')" />
- <img @click="submitBtn(2)" v-if="pageType==0 && newData.checkSetProgress !=100 && optionData.manageStatus !=2" style="margin-left: 60rpx;"
- :src="imagesUrl('safetyCheck/icon_aqjc_jiancha.png')" />
- <!-- 整改 -->
- <img @click="submitBtn(1)" v-if="pageType==2 && !hiddenDangerRecordStatus && !newData.finishRectify"
- :src="imagesUrl('safetyCheck/icon_aqjc_bianji.png')" />
- <img @click="submitBtn(2)" v-if="pageType==2 && !hiddenDangerRecordStatus && !newData.finishRectify"
- :src="imagesUrl('safetyCheck/icon_aqjc_zhenggai.png')" />
- <!-- 复查 -->
- <img @click="submitBtn(2)" v-if="pageType==1 && !hiddenDangerRecordStatus"
- :src="imagesUrl('safetyCheck/icon_aqjc_fucha.png')" />
- </view>
- <view v-if="pageType==0" class="inspectRecord" @click="inspectRecordClick()">检查记录</view>
-
- </view>
- </template>
- <script>
- const myaudio = uni.createInnerAudioContext();
- import {
- config
- } from '@/api/request/config.js'
- import {
- parseTime
- } from '@/component/public.js'
- import {
- securityAppCheckPlanCheckInfo,
- securityAppCheckPhotoGetCheckNumBySub,
- securityAppCheckDangerGetCheckProDetail,
- securityAppCheckSetOptionList,
- securityAppCheckDangerReviewSubList,
- securityAppCheckDangerGetCheckDangerSubList,
- securityAppCheckManageList,
- securityAppCheckPlanSetGetOptionList,
- securityCheckOptionSelAllList,
- } from '@/pages_safetyCheck/api/index.js'
- export default {
- name: "snapshotDetail",
- components: {
- },
- data() {
- return {
- baseUrl: config.base_url,
- inspectionItems: 0, //0有检查项 1无检查项
- newData: {
- voiceList:[],
- },
- setOptionId: '',
- manageId: '',
- subId: '',
- hazardCheckPro: '',
- hazardCheckNum: 0,
- pageType: 0, //0检查 1复查 2整改
- itemsStatus: '',
- optionData: null,
- lotName: null,
- hiddenDangerRecordStatus: null, //判断是否是从隐患列表页面跳转过来
- checkPlanList:[],
- }
- },
- onLoad(option) {
- let optionData = JSON.parse(decodeURIComponent(option.infoData));
- this.$set(this, 'pageType', optionData.pageType);
- this.$set(this, 'itemsStatus', optionData.itemsStatus);
- this.$set(this, 'setOptionId', optionData.setOptionId);
- this.$set(this, 'manageId', optionData.manageId);
- this.$set(this, 'subId', optionData.subId);
- this.$set(this, 'hazardCheckPro', optionData.hazardCheckPro);
- this.$set(this, 'hiddenDangerRecordStatus', optionData.hiddenDangerRecordStatus);
- this.$set(this, 'optionData', optionData);
- this.$set(this, 'lotName',
- optionData.pageType == 0 ? optionData.checkPlanSetVoList.checkName : (
- optionData.checkPlanSetVoList.overdueUnrectify ? '整改期限' + optionData.checkPlanSetVoList
- .rectifyDeadline +
- '(逾期未完成整改关闭实验室)' : '整改期限' + optionData.checkPlanSetVoList.rectifyDeadline));
- },
- onShow() {
- },
- mounted() {
- if (this.pageType == 0) {
- this.securityCheckOptionSelAllList();
- this.securityAppCheckPlanCheckInfo();
- } else if (this.pageType == 1 || this.pageType == 2) {
- //复查-整改
- this.securityAppCheckDangerGetCheckProDetail();
- }
- this.securityAppCheckPhotoGetCheckNumBySub();
- },
- methods: {
- //滚动事件
- scrollGet() {},
- //检查记录
- inspectRecordClick() {
- let infoData = this.optionData;
- infoData.curTabTow = 1; //已检查
- uni.navigateTo({
- url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' +
- encodeURIComponent(JSON
- .stringify(infoData))
- });
- },
- /******调用摄像头******/
- saoCode() {
- let self = this;
- uni.scanCode({
- onlyFromCamera: true,
- success: function(res) {
- let list = res.result.split("?")[1].split("&");
- let codeData = {};
- list.forEach((item) => {
- codeData[item.split("=")[0]] = item.split("=")[1];
- })
- if (codeData.code) {
- self.saoList(codeData.subId);
- } else {
- uni.showToast({
- title: '请扫描正确的二维码',
- icon: "none",
- mask: true,
- duration: 2000
- });
- }
- }
- });
- },
- //扫一扫查询数据
- async saoList(subId) {
- let obj = {
- planSetId: this.optionData.checkPlanSetVoList.planSetId,
- subId: subId,
- }
- if (this.pageType == 0) {
- //检查计划
- const {
- data
- } = await securityAppCheckManageList(obj);
- if (data.code == 200) {
- if (data.data.records[0]) {
- this.securityAppCheckSetOptionList(data.data.records[0], 0)
- //跳转检查项列表页面
- /* let infoData = data.data.records[0];
- infoData.pageType = this.tabIndexTow;
- infoData.checkPlanSetVoList = this.optionData.checkPlanSetVoList;
- uni.navigateTo({
- url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' +
- encodeURIComponent(
- JSON.stringify(infoData))
- }); */
- } else {
- //未找到数据提示
- uni.showToast({
- title: '未找到该实验室与本计划批次关联的数据',
- icon: "none",
- mask: true,
- duration: 2000
- });
- }
- }
- } else if (this.pageType == 1) {
- //复查计划
- obj.planId = this.optionData.checkPlanSetVoList.planId;
- obj.userId = uni.getStorageSync('userId');
- const {
- data
- } = await securityAppCheckDangerReviewSubList(obj);
- if (data.code == 200) {
- if (data.data[0] && data.data[0].stayExamineCheckNum != 0) {
- //跳转检查项列表页面
- let infoData = data.data[0];
- infoData.pageType = this.pageType;
- infoData.checkPlanSetVoList = this.optionData.checkPlanSetVoList;
- uni.navigateTo({
- url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' +
- encodeURIComponent(
- JSON.stringify(infoData))
- });
- } else {
- //未找到数据提示
- uni.showToast({
- title: '未找到该实验室与本计划批次关联的数据',
- icon: "none",
- mask: true,
- duration: 2000
- });
- }
- }
- } else if (this.pageType == 2) {
- //整改计划
- obj.planId = this.optionData.checkPlanSetVoList.planId;
- obj.userId = uni.getStorageSync('userId');
- const {
- data
- } = await securityAppCheckDangerGetCheckDangerSubList(obj);
- if (data.code == 200) {
- if (data.data[0]) {
- //跳转检查项列表页面
- let infoData = data.data[0];
- infoData.pageType = this.pageType;
- infoData.checkPlanSetVoList = this.optionData.checkPlanSetVoList;
- uni.navigateTo({
- url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' +
- encodeURIComponent(
- JSON.stringify(infoData))
- });
- } else {
- //未找到数据提示
- uni.showToast({
- title: '未找到该实验室与本计划批次关联的数据',
- icon: "none",
- mask: true,
- duration: 2000
- });
- }
- }
- }
- },
- //获取检查提交详情
- async securityAppCheckPlanCheckInfo() {
- let obj = {
- setOptionId: this.setOptionId,
- manageId: this.manageId,
- }
- const {
- data
- } = await securityAppCheckPlanCheckInfo(obj);
- if (data.code == 200) {
- uni.setNavigationBarTitle({
- title: data.data.subName + '(' + (this.pageType == 0 ? data.data.roomNum ? data.data
- .roomNum : '-' : data.data
- .subRoom ? data.data.subRoom : '-') + ')'
- })
- data.data.checkCollapse = true;
- data.data.inspectDot = false;
- this.$set(this, 'newData', data.data);
- this.$set(this.newData, 'checkTime', parseTime(data.data.checkTime, "{y}-{m}-{d}"));
- this.$set(this.newData, 'voiceList', data.data.voiceList ? data.data.voiceList : []);
- }
- },
- //整改详情
- async securityAppCheckDangerGetCheckProDetail() {
- let obj = {
- planId: this.optionData.checkPlanSetVoList.planId,
- planSetId: this.optionData.checkPlanSetVoList.planSetId,
- checkCategory: this.optionData.checkCategory,
- hazardCheckPro: this.optionData.hazardCheckPro,
- setOptionId: this.optionData.setOptionId?this.optionData.setOptionId:'',
- subId: this.optionData.subId,
- }
- const {
- data
- } = await securityAppCheckDangerGetCheckProDetail(obj);
- if (data.code == 200) {
- uni.setNavigationBarTitle({
- title: data.data.subName + '(' + data.data.roomNum + ')'
- })
- data.data.checkCollapse = true;
- // data.data.checkCollapse = false;
- data.data.inspectDot = false;
- data.data.checkTime = parseTime(data.data.checkTime, "{y}-{m}-{d}");
- data.data.checkRectifyVoList.forEach(function(item, index) {
- item.rectifyTime = parseTime(item.rectifyTime, "{y}-{m}-{d}");
- item.reviewTime = parseTime(item.reviewTime, "{y}-{m}-{d}");
- item.rectifyCollapse = false;
- item.reviewCollapse = false;
- if (index == data.data.checkRectifyVoList.length - 1) {
- item.rectifyCollapse = true;
- item.reviewCollapse = true;
- }
- })
- this.$set(this, 'newData', data.data);
- this.$set(this.newData, 'voiceList', data.data.voiceList ? data.data.voiceList : []);
- }
- },
- async securityAppCheckSetOptionList(item, checkStatus) {
- let self = this;
- let upData = item;
- let obj = {
- page: 1,
- pageSize: 20,
- checkStatus: checkStatus,
- manageId: upData.manageId,
- }
- this.inspectRemporaryList = [];
- const {
- data
- } = await securityAppCheckSetOptionList(obj);
- if (data.code == 200 && checkStatus == 0) { //先查询待检查数据
- if (data.data.records[0]) {
- let infoData = self.optionData;
- infoData.pageType = 0;
- infoData.subName = upData.subName;
- 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;
- infoData.checkCategory = data.data.records[0].checkCategory;
- uni.navigateTo({
- url: '/pages_safetyCheck/views/inspectManage/conductInspections?infoData=' +
- encodeURIComponent(
- JSON
- .stringify(infoData))
- });
- } else {
- uni.showToast({
- title: '该实验室暂无检查工作!',
- icon: "none",
- mask: true,
- duration: 2000
- });
- }
- }
- },
- //语音备忘播放
- async voicePlay(item) {
- myaudio.src = config.base_url + item;
- myaudio.play();
- },
- //获取检查项在当前实验室出现的次数
- async securityAppCheckPhotoGetCheckNumBySub() {
- let obj = {
- subId: this.subId,
- hazardCheckPro: this.hazardCheckPro,
- }
- const {
- data
- } = await securityAppCheckPhotoGetCheckNumBySub(obj);
- if (data.code == 200) {
- this.$set(this, 'hazardCheckNum', data.data);
- }
- },
- hiddenDangerClick(row) {
- if (!this.hiddenDangerRecordStatus) {
- let infoData = this.optionData;
- infoData.subName = this.newData.subName;
- infoData.roomNum = this.newData.roomNum;
- infoData.hiddenDangerRecordStatus = true; //判断是否跳转隐患列表
- uni.navigateTo({
- url: '/pages_safetyCheck/views/inspectManage/hiddenDangerRecord?infoData=' +
- encodeURIComponent(JSON.stringify(infoData))
- });
- }
- },
- //检查-按钮
- submitBtn(status) {
- if (status == 1) {
- //编辑
- if (this.pageType == 0) {
- //检查
- let infoData = this.optionData;
- infoData.hazardCheckPro = this.newData.hazardCheckPro;
- infoData.hazardCheckCode = this.newData.hazardCheckCode;
- infoData.hazardCheckName = this.newData.hazardCheckName;
- infoData.hazardCheckPro2 = this.newData.hazardCheckPro2;
- infoData.hazardCheckCode2 = this.newData.hazardCheckCode2;
- infoData.hazardCheckName2 = this.newData.hazardCheckName2;
- infoData.hazardCheckPro1 = this.newData.hazardCheckPro1;
- infoData.hazardCheckCode1 = this.newData.hazardCheckCode1;
- infoData.hazardCheckName1 = this.newData.hazardCheckName1;
- infoData.hazardCheckPoint = this.newData.hazardCheckPoint;
- infoData.editStatus = true;
- uni.redirectTo({
- url: '/pages_safetyCheck/views/inspectManage/conductInspections?infoData=' +
- encodeURIComponent(
- JSON
- .stringify(infoData))
- });
- } else if (this.pageType == 1) {
- //复核
- let infoData = this.optionData
- infoData.editStatus = true;
- uni.redirectTo({
- url: '/pages_safetyCheck/views/itemsManage/hiddenDangerRectification?infoData=' +
- encodeURIComponent(
- JSON
- .stringify(infoData))
- });
- } else if (this.pageType == 2) {
- //整改
- let infoData = this.optionData
- infoData.editStatus = true;
- uni.redirectTo({
- url: '/pages_safetyCheck/views/itemsManage/hiddenDangerRectification?infoData=' +
- encodeURIComponent(
- JSON
- .stringify(infoData))
- });
- }
- } else if (status == 2) {
- //继续检查
- if (this.pageType == 0) {
- //开展检查
- let infoData = this.checkPlanList[0];
- console.log('infoData',infoData)
- console.log('optionData',this.optionData)
- infoData.manageId = this.optionData.manageId;
- infoData.manageStatus = this.optionData.manageStatus;
- infoData.planSetId = this.optionData.planSetId;
- infoData.hazardCheckPro = this.checkPlanList[0].hazardCheckPro;
- infoData.pageType = this.pageType;
- infoData.itemsStatus = this.curTabTow;
- infoData.checkCategory = this.optionData.checkCategory;
- infoData.checkPlanSetVoList = this.optionData.checkPlanSetVoList;
- infoData.subId = this.optionData.subId;
- infoData.subName = this.optionData.subName;
- infoData.roomNum = this.optionData.roomNum;
- infoData.subRoom = this.optionData.subRoom;
- uni.redirectTo({
- url: '/pages_safetyCheck/views/inspectManage/conductInspections?infoData=' +
- encodeURIComponent(
- JSON
- .stringify(infoData))
- });
- } else {
- let infoData = this.optionData;
- uni.redirectTo({
- url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' +
- encodeURIComponent(JSON
- .stringify(infoData))
- });
- }
- }
- },
- //图片预览
- lockImg(list) {
- if (!list[0]) {
- return
- }
- let urlList = [];
- for (let i = 0; i < list.length; i++) {
- urlList.push(config.base_url + list[i].fileUrl)
- }
- wx.previewImage({
- urls: urlList, //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
- current: '', // 当前显示图片的http链接,默认是第一个
- success: function(res) {},
- fail: function(res) {},
- complete: function(res) {},
- })
- },
- //折叠展开
- inspectDot() {
- this.newData.inspectDot = !this.newData.inspectDot
- },
- checkCollapse(row) {
- this.newData.checkCollapse = !this.newData.checkCollapse
- },
- rectifyCollapse(row) {
- row.rectifyCollapse = !row.rectifyCollapse
- },
- reviewCollapse(row) {
- row.reviewCollapse = !row.reviewCollapse
- },
- //基础检查项检查
- async securityCheckOptionSelAllList() {
- let self = this;
- const {
- data
- } = await securityCheckOptionSelAllList({});
- if (data.code == 200) {
- let maxList = this.getCascaderData(JSON.parse(JSON.stringify(data.data)), 2)
- this.$nextTick(() => {
- this.securityAppCheckPlanSetGetOptionList(maxList);
- })
- }
- },
- //查询批次下-检查项
- async securityAppCheckPlanSetGetOptionList(maxList){
- let self = this;
- const {
- data
- } = await securityAppCheckPlanSetGetOptionList({
- planSetId:this.optionData.planSetId,
- searchValue: this.searchValue
- });
- if (data.code == 200) {
- if (data.data[0]) {
- let minList = JSON.parse(JSON.stringify(data.data))
- this.newCascadeData(maxList, minList);
- }
- }
- },
- newCascadeData(maxList, minList) {
- let list = [];
- for (let i = 0; i < maxList.length; i++) {
- for (let o = 0; o < maxList[i].children.length; o++) {
- for (let x = 0; x < minList.length; x++) {
- if (maxList[i].children[o].id == minList[x].parentId) {
- // //三级
- minList[x].level = 3;
- minList[x].hazardCheckPro = minList[x].id
- minList[x].hazardCheckCode = minList[x].code
- minList[x].hazardCheckName = minList[x].name
- minList[x].hazardCheckPro2 = maxList[i].children[o].id
- minList[x].hazardCheckCode2 = maxList[i].children[o].code
- minList[x].hazardCheckName2 = maxList[i].children[o].name
- minList[x].hazardCheckPro1 = maxList[i].id
- minList[x].hazardCheckCode1 = maxList[i].code
- minList[x].hazardCheckName1 = maxList[i].name
- minList[x].hazardCheckPoint = minList[x].mainPoint.split('#')[0]
- list.push(minList[x])
- }
- }
- }
- }
- this.$set(this, 'checkPlanList', JSON.parse(JSON.stringify(list)));
- },
- getCascaderData(list, type) {
- let self = this
- for (let i = 0; i < list.length; i++) {
- if (list[i].level == type) {
- delete list[i].children
- } else if (list[i].children) {
- if (list[i].children[0]) {
- list[i].children = self.getCascaderData(list[i].children, type)
- } else {
- list.splice(i, 1)
- i--
- }
- } else {
- list.splice(i, 1)
- i--
- }
- }
- for (let i = 0; i < list.length; i++) {
- if (list[i].level == type) {
- delete list[i].children
- } else if (list[i].children) {
- if (list[i].children[0]) {
- list[i].children = self.getCascaderData(list[i].children, type)
- } else {
- list.splice(i, 1)
- i--
- }
- } else {
- list.splice(i, 1)
- i--
- }
- }
- for (let i = 0; i < list.length; i++) {
- if (list[i].level == type) {
- delete list[i].children
- } else if (list[i].children) {
- if (list[i].children[0]) {
- list[i].children = self.getCascaderData(list[i].children, type)
- } else {
- list.splice(i, 1)
- i--
- }
- } else {
- list.splice(i, 1)
- i--
- }
- }
- return list
- },
- }
- }
- </script>
- <style lang="stylus" scoped>
- .snapshotDetail {
- height: 100%;
- display flex;
- box-sizing: border-box;
- padding-bottom: 160rpx;
- box-sizing: border-box;
- .tip {
- width: 750rpx;
- height: 80rpx;
- background: rgba(1, 131, 250, 0.2);
- border-radius: 0rpx 0rpx 0rpx 0rpx;
- font-size: 30rpx;
- color: #0183FA;
- line-height: 80rpx;
- text-align: center;
- }
- .tip-tow {
- width: 750rpx;
- height: 80rpx;
- background: rgba(255, 140, 0, 0.2);
- border-radius: 0rpx 0rpx 0rpx 0rpx;
- font-size: 30rpx;
- color: #FF8C00;
- line-height: 80rpx;
- text-align: center;
- }
- .list {
- width: 750rpx;
- .list-li {
- display: flex;
- justify-content: space-between;
- align-items: center;
- border-bottom: 1rpx solid #E0E0E0;
- background: #FFFFFF;
- padding: 0 30rpx;
- box-sizing: border-box;
- >view:nth-of-type(1) {
- font-size: 30rpx;
- color: #333333;
- line-height: 100rpx;
- text-align: left;
- }
- >view:nth-of-type(2) {
- font-size: 28rpx;
- color: #666666;
- line-height: 100rpx;
- text-align: left;
- display: flex;
- justify-content: space-between;
- align-items: center;
- >img {
- width: 24rpx;
- height: 12rpx;
- margin-left: 10rpx;
- }
- }
- }
- .file-li {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0 30rpx;
- box-sizing: border-box;
- >img:nth-of-type(1) {
- width: 30rpx;
- height: 30rpx;
- }
- >view {
- flex: 1;
- font-size: 28rpx;
- color: #333333;
- line-height: 80rpx;
- text-align: left;
- margin: 0 92rpx 0 16rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- >img:nth-of-type(2) {
- width: 30rpx;
- height: 30rpx;
- }
- }
- .hidden {
- width: 750rpx;
- background: #fff;
- overflow: hidden;
- border-bottom: 2rpx solid #E0E0E0;
- .hidden-content {
- border-radius: 20rpx 20rpx 20rpx 20rpx;
- width: 690rpx;
- min-height: 180rpx;
- background: #F5F5F5;
- margin: 40rpx 30rpx;
- padding: 20rpx;
- box-sizing: border-box;
- font-size: 28rpx;
- color: #666666;
- line-height: 44rpx;
- text-align: left;
- }
- }
- .photo {
- display: flex;
- justify-content: flex-start;
- flex-wrap: wrap;
- padding: 20rpx 30rpx 0;
- box-sizing: border-box;
- background: #fff;
- border-bottom: 2rpx solid #E0E0E0;
- >img {
- width: 150rpx;
- height: 150rpx;
- border-radius: 10rpx 10rpx 10rpx 10rpx;
- margin: 0 10rpx 10rpx 0;
- }
- >img:nth-of-type(4) {
- margin-right: 0;
- }
- }
- /* .list-li:last-of-type {
- border: none;
- } */
- .hazardCheckNum {
- border-bottom: 2rpx solid #E0E0E0;
- padding: 30rpx 40rpx 34rpx 40rpx;
- box-sizing: border-box;
- background: #fff;
- display: flex;
- justify-content: flex-end;
- align-items: center;
- .hazardCheckNum-l {
- width: 30rpx;
- height: 30rpx;
- margin-right: 18rpx;
- }
- .hazardCheckNum-r {
- font-size: 28rpx;
- color: #FF5900;
- line-height: 40rpx;
- text-align: left;
- }
- }
- }
- .srearch {
- display: flex;
- justify-content: space-between;
- align-items: center;
- .srearch-l {
- font-size: 30rpx;
- color: #333333;
- line-height: 100rpx;
- text-align: left;
- }
- .srearch-r {
- width: 30rpx;
- height: 30rpx;
- margin-right: 0rpx;
- }
- }
- }
- /* 语音备注 */
- .voice {
- width: 750rpx;
- min-height: 100rpx;
- background: #FFFFFF;
- border-radius: 20rpx 20rpx 20rpx 20rpx;
- overflow: hidden;
- .voice_t {
- height: 100rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0 30rpx;
- box-sizing: border-box;
- border-bottom: 2rpx solid #E0E0E0;
- margin-bottom: 40rpx;
- .voice_t_t {
- width: 100%;
- display: flex;
- justify-content: space-between;
- >text:nth-of-type(1) {
- font-size: 30rpx;
- color: #333333;
- line-height: 100rpx;
- }
- >text:nth-of-type(2) {
- font-size: 28rpx;
- color: #999999;
- line-height: 100rpx;
- }
- }
- .voice_t_b {
- width: 100%;
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 100rpx;
- text-align: left;
- }
- }
- .voice_b {
- display flex;
- justify-content flex-start;
- align-items center;
- margin-bottom: 20rpx;
- padding: 0 30rpx;
- box-sizing: border-box;
- .voice_b_l {
- width: 400rpx;
- height: 40rpx;
- background: #0183FA;
- border-radius: 10rpx;
- display flex;
- justify-content flex-start;
- align-items center;
- font-size: 24rpx;
- color: #FFFFFF;
- line-height: 30rpx;
- text-align: left;
- >img {
- width: 20rpx;
- height: 20rpx;
- margin-left: 16rpx;
- margin-right: 20rpx;
- }
- }
- .voice_b_r {
- width: 28rpx;
- height: 28rpx;
- margin-left: 20rpx;
- }
- }
- .voice-btn {
- width: 150rpx;
- height: 150rpx;
- position: fixed;
- right: 24rpx;
- bottom: 176rpx;
- >img {
- width: 150rpx;
- height: 150rpx;
- position: absolute;
- }
- >text {
- font-size: 24rpx;
- color: #999999;
- line-height: 30rpx;
- text-align: center;
- position: absolute;
- top: 84rpx;
- left: 26rpx;
- }
- }
- }
- .subBtn {
- display: flex;
- justify-content: center;
- position: fixed;
- bottom: 30rpx;
- width: 750rpx;
- padding: 0 46rpx;
- box-sizing: border-box;
- >img {
- width: 160rpx;
- height: 160rpx;
- }
- }
- .sub-btn {
- display: flex;
- justify-content: center;
- position: fixed;
- left: 30rpx;
- bottom: 30rpx;
- >view:nth-of-type(1) {
- width: 345rpx;
- height: 100rpx;
- background: #FF8C00;
- border-radius: 50rpx 0rpx 0rpx 50rpx;
- font-size: 30rpx;
- color: #FFFFFF;
- line-height: 100rpx;
- text-align: center;
- }
- >view:nth-of-type(2) {
- width: 345rpx;
- height: 100rpx;
- background: #0183FA;
- border-radius: 0rpx 50rpx 50rpx 0rpx;
- font-size: 30rpx;
- color: #FFFFFF;
- line-height: 100rpx;
- text-align: center;
- }
- }
- .sub-btn-tow {
- width: 686rpx;
- height: 100rpx;
- background: #0183FA;
- border-radius: 50rpx 50rpx 50rpx 50rpx;
- position: fixed;
- left: 30rpx;
- bottom: 30rpx;
- font-weight: 400;
- font-size: 30rpx;
- color: #FFFFFF;
- line-height: 100rpx;
- text-align: center;
- }
- .inspectRecord {
- position: fixed;
- top: 118rpx;
- right: 0;
- z-index: 200;
- width: 160rpx;
- height: 60rpx;
- background: #0183FA;
- border-radius: 50rpx 0rpx 0rpx 50rpx;
- font-size: 30rpx;
- color: #FFFFFF;
- line-height: 60rpx;
- text-align: center;
- }
- </style>
|