|
|
@ -1,9 +1,8 @@ |
|
|
|
|
|
|
|
// subpages/safetyinspection/pages/safetyinspection/safetyinspection.js
|
|
|
|
import { $wuxActionSheet } from '../../../../components/dist/index' |
|
|
|
const App = getApp() |
|
|
|
import { |
|
|
|
showRecord,addRecord,inspectionStaff |
|
|
|
showRecord,addRecord,inspectionStaff,securityCheckk |
|
|
|
} from "../../../../utils/api" |
|
|
|
|
|
|
|
const config = require('../../../../utils/config') |
|
|
@ -50,6 +49,7 @@ Page({ |
|
|
|
|
|
|
|
this.showRecordData() |
|
|
|
this.toOinspectionStaff() |
|
|
|
this.securityCheckk() |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
@ -91,6 +91,19 @@ Page({ |
|
|
|
*/ |
|
|
|
onShareAppMessage() { |
|
|
|
}, |
|
|
|
securityCheckk(){ |
|
|
|
securityCheckk({ |
|
|
|
pageNo: this.data.pageNo, |
|
|
|
pageSize: this.data.pageSize, |
|
|
|
}).then(({ |
|
|
|
data |
|
|
|
}) => { |
|
|
|
console.log(data) |
|
|
|
this.setData({ |
|
|
|
companyList: data.list, |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
onChange(event) { |
|
|
|
console.log(event.detail); |
|
|
|
this.data.checkboxOptions.forEach((item,index)=>{ |
|
|
@ -173,7 +186,17 @@ Page({ |
|
|
|
this.setData({ showPopup: true }); // 点击按钮显示弹出层
|
|
|
|
}, |
|
|
|
onClose() { |
|
|
|
this.setData({ showPopup: false }); // 关闭弹出层
|
|
|
|
let names = [] |
|
|
|
this.data.arr.forEach(item=>{ |
|
|
|
if(this.data.selectedOptions.findIndex(itemC=>itemC === item.staffId) != -1){ |
|
|
|
names.push(item.name) |
|
|
|
} |
|
|
|
}) |
|
|
|
this.setData({ |
|
|
|
showPopup: false, |
|
|
|
selectedNames: names, |
|
|
|
checkPersonsIdList:this.data.selectedOptions |
|
|
|
}); // 关闭弹出层
|
|
|
|
}, |
|
|
|
onChange1(event) { |
|
|
|
console.log(event) |
|
|
@ -276,7 +299,8 @@ handelClickSave(){ |
|
|
|
reviewTime:`${this.data.reviewTime} ${hours}:${minutes}:${seconds}`, |
|
|
|
hiddenDangeList:this.data.checkboxOptions.concat(this.data.addHiddenDangeList), |
|
|
|
attachmentUrls:this.data.uploadImageList.map(item=>({fileName:item.originFileName,attachmentUrl:item.ossUrl.url})), |
|
|
|
remark:this.data.remark |
|
|
|
remark:this.data.remark, |
|
|
|
address:"" |
|
|
|
} |
|
|
|
console.log(this.data.checkboxOptions.concat(this.data.addHiddenDangeList)) |
|
|
|
addRecord(form).then(res => { |
|
|
|