|
|
|
@ -276,12 +276,12 @@ function init() {
|
|
|
|
|
if (query.id) { |
|
|
|
|
// 修改:如果有 id 则设置为 'update' |
|
|
|
|
formType.value = 'update' |
|
|
|
|
EnterprisesApi.getEnterprises(query.id).then((res) => { |
|
|
|
|
EnterprisesApi.getEnterprises(query.id).then((res) => { |
|
|
|
|
selectedUser.value=res.inviterName; |
|
|
|
|
// formData.value.startUserSelectAssignees=res.userId; |
|
|
|
|
formData.value = res |
|
|
|
|
}) |
|
|
|
|
}else{ formType.value = 'create'} |
|
|
|
|
}else{formType.value = 'create'} |
|
|
|
|
} |
|
|
|
|
// 控制地图弹窗显示隐藏 |
|
|
|
|
const showMap = ref(false) |
|
|
|
@ -367,8 +367,13 @@ const handleSearch = () => {
|
|
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
|
init() |
|
|
|
|
getQualificationList() |
|
|
|
|
getInspectionslList() |
|
|
|
|
//判断是添加删除 |
|
|
|
|
if(query.id){ |
|
|
|
|
getQualificationList() |
|
|
|
|
getInspectionslList() |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
getEnterpriseUserList() |
|
|
|
|
//getInspectionsLogList() |
|
|
|
|
const openMapAndInit = async () => { |
|
|
|
@ -505,7 +510,12 @@ const getInspectionslList = async () => {
|
|
|
|
|
loading.value = true |
|
|
|
|
try { |
|
|
|
|
const data = await EnterpriseInspectionsApi.getEnterpriseInspectionsPage({"enterpriseId":query.id}) |
|
|
|
|
inspectionslist.value = data.list |
|
|
|
|
if(!data.list || data.list.length === 0){ |
|
|
|
|
console.log("No data or data is null"); |
|
|
|
|
} else { |
|
|
|
|
inspectionslist.value = data.list; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} finally { |
|
|
|
|
loading.value = false |
|
|
|
|
} |
|
|
|
@ -517,7 +527,11 @@ const getInspectionsLogList = async (insprctionsId) => {
|
|
|
|
|
loading.value = true |
|
|
|
|
try { |
|
|
|
|
const data = await EnterpriseInspectionsApi.inspectionsLogList({"inspectionsId":insprctionsId}) |
|
|
|
|
inspectionsLogList.value = data |
|
|
|
|
if(!data.list || data.list.length === 0){ |
|
|
|
|
console.log("No data or data is null"); |
|
|
|
|
} else { |
|
|
|
|
inspectionsLogList.value = data.list; |
|
|
|
|
} |
|
|
|
|
} finally { |
|
|
|
|
loading.value = false |
|
|
|
|
} |
|
|
|
|