12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076 |
- <!-- 隐患项 -->
- <template>
- <view class="hiddenDangerItems">
- <view class="header">
- <view class="lotName" :class="pageType != 0?'lotNameOne':''" v-if="lotName">{{lotName}}</view>
- <view class="line"></view>
- <view class="tabTitle_tow" :style="pageType==0?'width:320rpx;':'width:520rpx;'">
- <view class="tabTitle_tow_li" @tap="tabClickTow(item.value)" :key="index"
- v-for="(item,index) in tabTextTow">
- <view :class="{on:curTabTow==item.value}" class="tabTitle_tow_text">{{item.label}}</view>
- <view :class="{on:curTabTow==item.value}" class="tabTitle_tow_across"></view>
- </view>
- </view>
- <!-- <view class="line"></view> -->
- <!-- <view class="search">
- <view class="search-r search-r-margin" @click="checkItemModuleButton('open')">
- <img :src="imagesUrl('commonality/icon_aqjc_ss.png')">
- 搜索检查项
- </view>
- </view> -->
- <view class="line"></view>
- </view>
- <scroll-view scroll-y style="overflow-y: scroll;flex:1;" @scrolltolower="scrollGet" class="info-max-box">
- <view class="list">
- <view class="total"
- :class="curTabTow == 0?'total-color-1':(curTabTow == 2?'total-color-3':(curTabTow == 1?'total-color-2':''))"
- v-if="pageType == 0">
- {{curTabTow == 0?'待检查共'+total+'项':(curTabTow == 1?'已检查共'+total+'项':'')}}
- </view>
- <view class="total"
- :class="curTabTow == 0?'total-color-1':(curTabTow == 1?'total-color-2':(curTabTow == 2?'total-color-3':''))"
- v-if="pageType == 1">
- {{curTabTow == 0?'待复查共'+total+'项':(curTabTow == 1?'复查完毕共'+total+'项':(curTabTow == 2?'退回整改共'+total+'项':''))}}
- </view>
- <view class="total"
- :class="curTabTow == 2?'total-color-1':(curTabTow == 0?'total-color-2':(curTabTow == 4?'total-color-3':''))"
- v-if="pageType == 2">
- {{curTabTow == 2?'待整改共'+total+'项':(curTabTow == 1?'已整改共'+total+'项':(curTabTow == 4?'暂无法整改共'+total+'项':''))}}
- </view>
- <view class="list-li" v-for="(item,index) in dataList" :key="index">
- <view class="list-li-t" @click="itemsClick(item)">
- <view v-if="pageType == 0">
- <img v-if="item.checkFlag==null" :src="imagesUrl('safetyCheck/icon_zg_zh@1x.png')">
- <img v-if="item.checkFlag==false" :src="imagesUrl('safetyCheck/icon_xz_zg@1x.png')">
- <img v-if="item.checkFlag==true" :src="imagesUrl('safetyCheck/icon_xz_fc@1x.png')">
- </view>
- <view v-if="pageType == 1">
- <img v-if="curTabTow==0" :src="imagesUrl('safetyCheck/icon_zg_zh@1x.png')">
- <img v-if="curTabTow==1" :src="imagesUrl('safetyCheck/icon_xz_fc@1x.png')">
- <img v-if="curTabTow==2" :src="imagesUrl('safetyCheck/icon_xz_zg@1x.png')">
- </view>
- <view v-if="pageType == 2">
- <img v-if="curTabTow==2" :src="imagesUrl('safetyCheck/icon_zg_zh@1x.png')">
- <img v-if="curTabTow==1" :src="imagesUrl('safetyCheck/icon_xz_zg@1x.png')">
- <img v-if="curTabTow==4" :src="imagesUrl('safetyCheck/icon_xz_fc@1x.png')">
- </view>
- <view>{{item.hazardCheckCode}}{{item.hazardCheckName}}</view>
- </view>
- <view v-if="pageType == 1 && item.hazardNum" class="list-li-b" @click="hiddenDangerClick(item)">
- 此检查项在当前实验室累计出现<text>{{item.hazardNum}}</text>次隐患
- </view>
- <view v-if="pageType == 2 && item.dangerNum" class="list-li-b" @click="hiddenDangerClick(item)">
- 此检查项在当前实验室累计出现<text>{{item.dangerNum}}</text>次隐患
- </view>
- </view>
- </view>
- <view class="get-data-p" v-if="!getDataType">
- <img class="get-data-img" :src="imagesUrl('safetyCheck/icon_aqjc_sl.png')">
- <view class="get-data-text">上拉加载</view>
- </view>
- <view class="get-data-null-p" v-if="getDataType">- 没有更多数据 -</view>
-
- </scroll-view>
- <checkItemModule :propsData="propsData" v-if="checkItemModuleType"></checkItemModule>
- <!-- <view class="sub-btn" @click="submitBtn(1)" v-if="pageType==0 && inspectRemporary">开展检查</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 && optionData.manageStatus !=2"
- :src="imagesUrl('safetyCheck/icon_aqjc_jiancha.png')" />
- </view>
- </view>
- </template>
- <script>
- import {
- config
- } from '@/api/request/config.js'
- import {
- securityAppCheckSetOptionList,
- securityAppCheckDangerReviewList,
- securityAppCheckDangerGetCheckDangerSubId,
- securityAppCheckSetOptionFinishCheck,
- securityAppCheckDangerGetCheckDangerSubList,
- securityAppCheckDangerReviewSubList,
- securityAppCheckManageList,
- securityAppCheckPlanSetGetOptionList,
- securityCheckOptionSelAllList,
- } from '@/pages_safetyCheck/api/index.js'
- import {
- checkItemModule
- } from '@/pages_safetyCheck/component/checkItemModule.vue'
- export default {
- name: "hiddenDangerItems",
- components: {
- checkItemModule
- },
- data() {
- return {
- baseUrl: config.base_url,
- pageType: 1,
- tabTextTow: [],
- curTabTow: null,
- form: {
- imgDtoList: [],
- },
- lotName: null,
- optionData: {
- },
- dialogVisible: false,
- // 查询参数
- queryParams: {
- page: 1,
- pageSize: 20,
- },
- //符合/不符合
- checkFlag: null,
- total: 0,
- dataList: [],
- getDataType: false,
- searchIndex: 0,
- //检查项组件数据
- checkItemModuleType: false,
- propsData: {},
- inspectRemporary: false, //待检查
- inspectRemporaryList: [], //待检查
- optionData: {},
- checkPlanList:[],
- }
- },
- onLoad(option) {
- let optionData = JSON.parse(decodeURIComponent(option.infoData));
- uni.setNavigationBarTitle({
- title: optionData.subName + '(' + (optionData.pageType == 0 ? (optionData.roomNum ? optionData
- .roomNum : '-') : (optionData
- .subRoom ? optionData
- .subRoom : '-')) + ')'
- })
- this.$set(this, 'pageType', optionData.pageType);
- this.$set(this, 'lotName',
- optionData.pageType == 0 ? optionData.checkPlanSetVoList.checkName :
- (optionData.checkPlanSetVoList.overdueUnrectify ? '整改期限' + optionData.checkPlanSetVoList.rectifyDeadline +'(逾期未完成整改关闭实验室)' : '整改期限' + optionData.checkPlanSetVoList.rectifyDeadline));
- this.$set(this, 'tabTextTow',
- optionData.pageType == 0 ? (optionData.manageStatus == 2 ? [{
- value: '1',
- label: '已检查'
- }] : [
- // {
- // value: '0',
- // label: '待检查'
- // },
- {
- value: '1',
- label: '已检查'
- }]) : (
- optionData.pageType == 1 ? [{
- value: '0',
- label: '待复查'
- }, {
- value: '1',
- label: '复查完毕'
- }, {
- value: '2',
- label: '退回整改'
- }] : (
- optionData.pageType == 2 ? [{
- value: '2',
- label: '待整改'
- }, {
- value: '1',
- label: '已整改'
- }, {
- value: '4',
- label: '暂无法整改'
- }] : []
- )))
- if (optionData.pageType == 0) {
- if (optionData.manageStatus == 2) {
- this.$set(this, 'curTabTow', '1');
- }else{
- this.$set(this, 'curTabTow',
- optionData.pageType == 0 ? (optionData.curTabTow == 1 ? '1' : '1') : (
- optionData.pageType == 1 ? '0' : (
- optionData.pageType == 2 ? '2' : '')));
- }
- } else {
- this.$set(this, 'curTabTow',
- optionData.pageType == 0 ? (optionData.curTabTow == 1 ? '1' : '0') : (
- optionData.pageType == 1 ? '0' : (
- optionData.pageType == 2 ? '2' : '')));
- }
- this.$set(this, 'optionData', optionData);
- this.$nextTick(() => {
- this.getList()
- })
- },
- onShow() {
- },
- mounted() {
- if (this.optionData.pageType == 0) {
- this.securityCheckOptionSelAllList();
- if (this.optionData.manageStatus == 2) {
- this.securityAppCheckSetOptionList(this.optionData, 1)
- } else {
- this.securityAppCheckSetOptionList(this.optionData, 0)
- }
- }
- },
- methods: {
- //滚动事件
- scrollGet() {
- let self = this;
- if (self.total / self.queryParams.pageSize <= self.queryParams.page) {
- this.$set(this, 'getDataType', true);
- } else {
- this.queryParams.page += 1;
- this.$nextTick(() => {
- this.getList();
- })
- }
- },
- //顶部tab点击
- tabClickTow(value) {
- if(this.curTabTow != value){
- this.$set(this, 'checkFlag', null);
- this.$set(this.queryParams, 'page', 1);
- this.$set(this, 'curTabTow', value);
- this.$set(this, 'total', 0);
- this.$set(this, 'dataList', []);
- this.$nextTick(() => {
- this.getList();
- })
- }
- },
- dialogOpen() {
- this.dialogVisible = true;
- },
- dialogClose() {
- this.dialogVisible = false;
- },
- //符合/不符合
- checkFlagChange(type) {
- if (this.checkFlag == type) {
- this.$set(this, 'checkFlag', null);
- } else {
- this.$set(this, 'checkFlag', type);
- }
- this.$set(this.queryParams, 'page', 1);
- this.getList()
- },
- checkItemModuleButton(type, item) {
- if (type == 'open') {
- let obj = {
- infoType: this.pageType,
- checkType: this.curTabTow,
- }
- if (this.pageType == 0) {
- //检查
- obj.manageId = this.optionData.manageId
- // obj.planSetId = this.optionData.planSetId
- if (this.optionData.manageStatus == 2) {
- obj.checkType = 1
- }
- } else if (this.pageType != 0) {
- //复查/整改
- obj.planId = this.optionData.checkPlanSetVoList.planId;
- obj.planSetId = this.optionData.checkPlanSetVoList.planSetId;
- obj.subId = this.optionData.subId;
- }
- this.$set(this, 'propsData', obj);
- this.$set(this, 'checkItemModuleType', true);
- } else if (type == 'out') {
- this.$set(this, 'checkItemModuleType', false);
- this.$set(this, 'propsData', {});
- } else if (type == 'submit') {
- this.itemsClick(item);
- }
- },
- /******调用摄像头******/
- 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.securityAppCheckSetOptionListTow(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;
- infoData.manageId = this.optionData.manageId;
- 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.tabIndexTow;
- infoData.checkPlanSetVoList = this.optionData.checkPlanSetVoList;
- infoData.manageId = this.optionData.manageId;
- uni.navigateTo({
- url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' +
- encodeURIComponent(
- JSON.stringify(infoData))
- });
- } else {
- //未找到数据提示
- uni.showToast({
- title: '未找到该实验室与本计划批次关联的数据',
- icon: "none",
- mask: true,
- duration: 2000
- });
- }
- }
- }
- },
- //检查项选中
- itemsClick(row) {
- let infoData = this.optionData;
- infoData.pageType = this.pageType;
- infoData.checkDraftVo = row.checkDraftVo;
- infoData.itemsStatus = this.curTabTow;
- infoData.setOptionId = row.setOptionId;
- infoData.hazardCheckPro = row.hazardCheckPro;
- infoData.manageId = this.optionData.manageId;
- /* infoData.checkCategory = this.optionData.checkCategory;
- infoData.checkPlanSetVoList = this.optionData.checkPlanSetVoList; */
- if (this.pageType == 0 && this.curTabTow == 0) {
- //待检查
- uni.redirectTo({
- url: '/pages_safetyCheck/views/inspectManage/conductInspections?infoData=' +
- encodeURIComponent(
- JSON
- .stringify(infoData))
- });
- }
- if (this.pageType == 0 && this.curTabTow == 1) {
- //已检查
- uni.redirectTo({
- url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' +
- encodeURIComponent(JSON
- .stringify(infoData))
- });
- } else if (this.pageType == 1 && this.curTabTow == 0) {
- //待复查
- uni.redirectTo({
- url: '/pages_safetyCheck/views/itemsManage/hiddenDangerRectification?infoData=' +
- encodeURIComponent(JSON
- .stringify(infoData))
- });
- } else if (this.pageType == 1 && this.curTabTow == 1) {
- //复查完毕
- uni.redirectTo({
- url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' +
- encodeURIComponent(JSON
- .stringify(infoData))
- });
- } else if (this.pageType == 1 && this.curTabTow == 2) {
- //退回整改
- uni.redirectTo({
- url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' +
- encodeURIComponent(JSON
- .stringify(infoData))
- });
- } else if (this.pageType == 2 && this.curTabTow == 2) {
- //待整改
- uni.redirectTo({
- url: '/pages_safetyCheck/views/itemsManage/hiddenDangerRectification?infoData=' +
- encodeURIComponent(JSON
- .stringify(infoData))
- });
- } else if (this.pageType == 2 && this.curTabTow == 1) {
- //已完成
- uni.redirectTo({
- url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' +
- encodeURIComponent(JSON
- .stringify(infoData))
- });
- } else if (this.pageType == 2 && this.curTabTow == 4) {
- //暂无法整改
- uni.redirectTo({
- url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' +
- encodeURIComponent(JSON
- .stringify(infoData))
- });
- }
- },
- hiddenDangerClick(row) {
- let infoData = this.optionData;
- infoData.hazardCheckPro = row.hazardCheckPro;
- infoData.pageType = this.pageType;
- infoData.itemsStatus = this.curTabTow;
- infoData.hiddenDangerRecordStatus = true; //判断是否跳转隐患列表
- uni.redirectTo({
- url: '/pages_safetyCheck/views/inspectManage/hiddenDangerRecord?infoData=' +
- encodeURIComponent(JSON.stringify(infoData))
- });
- },
- //
- async getList() {
- let self = this;
- let obj = JSON.parse(JSON.stringify(this.queryParams))
- if (this.pageType == 0) {
- //检查任务
- obj.manageId = this.optionData.manageId;
- obj.checkFlag = this.checkFlag;
- if (this.optionData.pageType == 0) {
- if (this.optionData.manageStatus == 2) {
- obj.checkStatus = 1
- } else {
- obj.checkStatus = this.curTabTow;
- }
- }
- const {
- data
- } = await securityAppCheckSetOptionList(obj);
- if (data.code == 200) {
- if (self.queryParams.page == 1) {
- this.dataList = data.data.records;
- this.total = data.data.total;
- if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
- this.$set(this, 'getDataType', true);
- }
- } else {
- this.dataList = [...this.dataList, ...data.data.records]
- this.total = data.data.total;
- if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
- this.$set(this, 'getDataType', true);
- }
- }
- }
- } else if (this.pageType == 1) {
- //复查验证
- obj.planId = this.optionData.checkPlanSetVoList.planId;
- obj.planSetId = this.optionData.checkPlanSetVoList.planSetId;
- obj.subId = this.optionData.subId;
- obj.appReviewStatus = this.curTabTow;
- obj.pageFlag = true;
- const {
- data
- } = await securityAppCheckDangerReviewList(obj);
- if (data.code == 200) {
- if (self.queryParams.page == 1) {
- this.dataList = data.data.records;
- this.total = data.data.total;
- if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
- this.$set(this, 'getDataType', true);
- }
- } else {
- this.dataList = [...this.dataList, ...data.data.records]
- this.total = data.data.total;
- if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
- this.$set(this, 'getDataType', true);
- }
- }
- }
- } else if (this.pageType == 2) {
- //隐患整改
- obj.planId = this.optionData.checkPlanSetVoList.planId;
- obj.planSetId = this.optionData.checkPlanSetVoList.planSetId;
- obj.subId = this.optionData.subId;
- obj.rectifyStatus = this.curTabTow;
- obj.pageFlag = true;
- const {
- data
- } = await securityAppCheckDangerGetCheckDangerSubId(obj);
- if (data.code == 200) {
- if (self.queryParams.page == 1) {
- this.dataList = data.data.records;
- this.total = data.data.total;
- if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
- this.$set(this, 'getDataType', true);
- }
- } else {
- this.dataList = [...this.dataList, ...data.data.records]
- this.total = data.data.total;
- if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
- this.$set(this, 'getDataType', true);
- }
- }
- }
- }
- },
- //查询当前实验室检查项
- 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]) {
- self.inspectRemporary = true;
- this.inspectRemporaryList = JSON.parse(JSON.stringify(data.data.records))
- }
- }
- },
- //查询扫码进入的实验室检查项
- async securityAppCheckSetOptionListTow(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 submitBtn(status) {
- if (status == 1) {
- //开展检查
- let infoData = this.checkPlanList[0];
- 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))
- });
- }
- },
- //基础检查项检查
- 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>
- .hiddenDangerItems {
- height: 100%;
- display flex;
- flex-direction: column;
- overflow: hidden;
- box-sizing: border-box;
- #totalColor-A {
- color: #0183FA;
- background: rgba(1, 131, 250, 0.2);
- }
- #totalColor-B {
- color: #16B531;
- background: rgba(22, 181, 49, 0.2);
- }
- #totalColor-C {
- color: #FF8C00;
- background: rgba(255, 140, 0, 0.2);
- }
- .header {
- width: 100%;
- height: 174rpx;
- overflow: hidden;
- background: #fff;
- .lotName {
- height: 70rpx;
- line-height: 70rpx;
- font-size: 28rpx;
- background: rgba(1, 131, 250, 0.2);
- color: #0183FA;
- text-align: center;
- }
- .lotNameOne {
- background: #F7E0C4;
- color: #FF8C00;
- }
- .tabTitle_tow {
- width: 320rpx;
- height: 80rpx;
- display flex;
- justify-content: flex-start;
- align-items: center;
- .tabTitle_tow_li {
- flex: 1;
- position: relative;
- text-align center;
- .tabTitle_tow_text {
- display: inline-block;
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #333333;
- line-height: 46rpx;
- position: relative;
- &.on {
- color: #0183FA;
- }
- }
- .tabTitle_tow_across {
- width: 50rpx;
- height: 4rpx;
- background: #0183FA;
- border-radius: 2rpx;
- margin:0 auto 0;
- display none;
- &.on {
- display block;
- }
- }
- }
- }
- .line {
- width: 100%;
- height: 13rpx;
- background: #F5F5F5;
- }
- .search {
- width: 750rpx;
- height: 80rpx;
- background: #FFFFFF;
- border-radius: 0rpx 0rpx 0rpx 0rpx;
- display: flex;
- justify-content: flex-start;
- align-items: center;
- .search-l {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- margin: 0 20rpx 0 30rpx;
- .search-A {
- border-radius: 50rpx 50rpx 50rpx 50rpx;
- border: 1rpx solid #E0E0E0;
- width: 100rpx;
- height: 60rpx;
- background: #E0E0E0;
- font-weight: normal;
- font-size: 24rpx;
- color: #333333;
- line-height: 60rpx;
- text-align: center;
- margin-right: 10rpx;
- }
- .search-B {
- border-radius: 50rpx 50rpx 50rpx 50rpx;
- border: 1rpx solid #0183FA;
- width: 100rpx;
- height: 60rpx;
- background: #0183FA;
- font-weight: normal;
- font-size: 24rpx;
- color: #FFFFFF;
- line-height: 60rpx;
- text-align: center;
- margin-right: 10rpx;
- }
- }
- .search-r-margin {
- width: 700rpx !important;
- margin: 0 auto;
- }
- .search-r {
- width: 440rpx;
- height: 60rpx;
- background: #FFFFFF;
- border-radius: 50rpx 50rpx 50rpx 50rpx;
- border: 1rpx solid #E0E0E0;
- font-size: 24rpx;
- color: #999999;
- line-height: 60rpx;
- text-align: left;
- display: flex;
- justify-content: flex-start;
- align-items: center;
- padding: 0 20rpx;
- box-sizing: border-box;
- >img {
- width: 30rpx;
- height: 30rpx;
- margin-right: 20rpx;
- }
- }
- }
- }
- .list {
- width: 750rpx;
- background: #FFFFFF;
- padding-bottom: 20rpx;
- box-sizing: border-box;
- .total {
- display: inline-block;
- height: 50rpx;
- background: rgba(1, 131, 250, 0.2);
- border-radius: 0rpx 0rpx 20rpx 0rpx;
- font-size: 24rpx;
- color: #0183FA;
- line-height: 50rpx;
- text-align: left;
- padding: 0rpx 22rpx;
- box-sizing: border-box;
- margin-bottom: 20rpx;
- }
- .total-color-1 {
- background: rgba(1, 131, 250, 0.2);
- color: #0183FA;
- }
- .total-color-2 {
- background: rgba(22, 181, 49, 0.2);
- color: #16B531;
- }
- .total-color-3 {
- background: #F7E0C4;
- color: #FF8C00;
- }
- .list-li {
- margin: 0 30rpx;
- .list-li-t {
- width: 690rpx;
- background: #F5F5F5;
- border-radius: 10rpx 10rpx 10rpx 10rpx;
- display: flex;
- justify-content: flex-start;
- padding: 12rpx 20rpx 14rpx 14rpx;
- box-sizing: border-box;
- margin: 20rpx 0;
- >view:nth-of-type(1) {
- >img {
- width: 24rpx;
- height: 24rpx;
- margin-right: 30rpx;
- }
- }
- >view:nth-of-type(2) {
- flex: 1;
- font-size: 28rpx;
- color: #3D3D3D;
- line-height: 40rpx;
- text-align: left;
- }
- }
- .list-li-b {
- font-size: 28rpx;
- color: #3D3D3D;
- line-height: 40rpx;
- text-align: right;
- >text {
- color: #FF0000;
- }
- }
- }
- }
- .get-data-p {
- height: 100rpx;
- text-align: center;
- .get-data-img {
- width: 30rpx;
- height: 30rpx;
- margin: 0 auto;
- margin-top: 15rpx;
- }
- .get-data-text {
- text-align: center;
- }
- }
- .get-data-null-p {
- height: 100rpx;
- line-height: 100rpx;
- text-align: center;
- }
- .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;
- width: 690rpx;
- height: 100rpx;
- background: #0183FA;
- border-radius: 50rpx 50rpx 50rpx 50rpx;
- font-size: 30rpx;
- color: #FFFFFF;
- line-height: 100rpx;
- text-align: center;
- }
- }
- </style>
|