|
@@ -117,10 +117,10 @@
|
|
|
</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"
|
|
|
+ <!-- <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"
|
|
|
style="margin-left: 60rpx;" :src="imagesUrl('safetyCheck/icon_aqjc_bianji.png')" />
|
|
|
- <img @click="submitBtn(2)" v-if="pageType==0 && newData.checkSetProgress !=100" style="margin-left: 60rpx;"
|
|
|
+ <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"
|
|
@@ -153,6 +153,8 @@
|
|
|
securityAppCheckDangerReviewSubList,
|
|
|
securityAppCheckDangerGetCheckDangerSubList,
|
|
|
securityAppCheckManageList,
|
|
|
+ securityAppCheckPlanSetGetOptionList,
|
|
|
+ securityCheckOptionSelAllList,
|
|
|
} from '@/pages_safetyCheck/api/index.js'
|
|
|
export default {
|
|
|
name: "snapshotDetail",
|
|
@@ -176,13 +178,11 @@
|
|
|
optionData: null,
|
|
|
lotName: null,
|
|
|
hiddenDangerRecordStatus: null, //判断是否是从隐患列表页面跳转过来
|
|
|
-
|
|
|
+ checkPlanList:[],
|
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
let optionData = JSON.parse(decodeURIComponent(option.infoData));
|
|
|
- console.log('详情', optionData)
|
|
|
-
|
|
|
this.$set(this, 'pageType', optionData.pageType);
|
|
|
this.$set(this, 'itemsStatus', optionData.itemsStatus);
|
|
|
this.$set(this, 'setOptionId', optionData.setOptionId);
|
|
@@ -205,6 +205,7 @@
|
|
|
},
|
|
|
mounted() {
|
|
|
if (this.pageType == 0) {
|
|
|
+ this.securityCheckOptionSelAllList();
|
|
|
this.securityAppCheckPlanCheckInfo();
|
|
|
} else if (this.pageType == 1 || this.pageType == 2) {
|
|
|
//复查-整改
|
|
@@ -520,7 +521,28 @@
|
|
|
} else if (status == 2) {
|
|
|
//继续检查
|
|
|
if (this.pageType == 0) {
|
|
|
- this.securityAppCheckSetOptionList(this.optionData, 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({
|
|
@@ -562,6 +584,109 @@
|
|
|
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>
|