对接编辑接口

This commit is contained in:
wangchengming 2025-07-16 20:06:27 +08:00
parent dde0d4c5c6
commit 409655349b

View File

@ -258,24 +258,31 @@ const { ruleForm, rules } = toRefs(data)
//
const getDetailInfo = (id) => {
showTableData.value = []
cachShowTableData.value = []
getBusSafetyReview(id).then(res => {
if (res.code == 200) {
ruleForm.value = res.data
escUserName.value = res.data.escUserName
escWorkNo.value = res.data.escWorkNo
// docUploadList.value = JSON.parse(res.data.fileContent)
escWorkNo.value = res.data.workNo
escUserId.value = res.data.escUserId
res.data.reviewProblemList.forEach(item => {
item.editFlag = false
showTableData.value.push(item)
cachShowTableData.value.push(item)
});
}
})
}
// ESC
const handleChoseDependency = (val) => {
if (val) {
const curDependency = busDependencyData.value.find(item => item.id == val)
escUserId.value = curDependency.escUserId,
const curDependency = busDependencyData.value.find(item => item.id == val)
escUserId.value = curDependency.escUserId
escUserName.value = curDependency.escUserName
escWorkNo.value = curDependency.escWorkNo
buildingNo.value = curDependency.buildingNo
factoryArea.value = curDependency.factoryArea
// buildingNo.value = curDependency.buildingNo
// factoryArea.value = curDependency.factoryArea
}
}
//
@ -291,7 +298,7 @@ const getBusDependencyData = () => {
pageIndex: 1,
pageSize: 100,
}).then(response => {
if (response.code == 200) {
if (response.code == 200) {
busDependencyData.value = response.data.list.filter(item => item.buildingNo !== '-')
}
})
@ -320,7 +327,7 @@ const filterDisabledDept = (deptList) => {
const handleAddProblem = () => {
if (showTableData.value.length < ruleForm.value.openItemCount) {
const itemProblem = {
safetyReviewId: null,
safetyReviewId: ruleForm.id ? ruleForm.safetyReviewId : null,
remark: null,
level: null,
chargeUserId: escUserId.value,
@ -377,7 +384,7 @@ const handleCancel = () => {
}
const handleSubmit = () => {
proxy.$refs["ruleFormRef"].validate(valid => {
if (valid) {
if (valid) {
if (showTableData.value.length == 0 && ruleForm.value.openItemCount > 0) {
proxy.$modal.msgWarning("请填报问题")
return false