Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
a7d111c31f
|
@ -85,7 +85,7 @@ const store = useDailyStore()
|
|||
const daily = computed(() => store.getdailyinspection)
|
||||
const base64_1 = computed(() => store.get_base64_1)
|
||||
const base64_2 = computed(() => store.get_base64_2)
|
||||
|
||||
const currentCkProjectId = ref('')
|
||||
const submitData = ref<Item[]>([])
|
||||
// watch(
|
||||
// daily,
|
||||
|
@ -206,11 +206,13 @@ const ckProjectListByType = async function (type) {
|
|||
const res = await api.get<CkProjectListByType[]>(`/assessmentCriteria/ckProjectListByType`, { type })
|
||||
selectorType.value = res.data
|
||||
}
|
||||
|
||||
const onChangeType = function (e: any) {
|
||||
let index = Number(e.detail.value)
|
||||
selectorCheckedType.value = selectorType.value?.[index].label as string
|
||||
let ckProjectId = selectorType.value?.[index].value
|
||||
assessmentCriteriaRulesByCkProjectId(ckProjectId)
|
||||
currentCkProjectId.value = selectorType.value?.[index].value as string
|
||||
// let ckProjectId = selectorType.value?.[index].value
|
||||
assessmentCriteriaRulesByCkProjectId(currentCkProjectId.value)
|
||||
_form.ckProjectId = selectorType.value?.[index].value as string
|
||||
}
|
||||
|
||||
|
@ -282,20 +284,19 @@ const onSubmit = async function () {
|
|||
ckStandardId: item.selectedID, //已选择的雪花ID
|
||||
})
|
||||
}
|
||||
if (item.hasOwnProperty('selectedGroup')) {
|
||||
item.selectedGroup.forEach((selectedItem) => {
|
||||
// console.log(selectedItem)
|
||||
// console.log(ele)
|
||||
if (ele.ckItemId != 'null' && selectedItem != 'null') {
|
||||
assessmentRecordDetails.value.push({
|
||||
ckGroupId: element.snowFlakeId, //选项的雪花Id
|
||||
ckItemId: ele.ckItemId, //已选择的ID
|
||||
ckStandardId: selectedItem, //已选择的雪花ID
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
if (item.hasOwnProperty('selectedGroup')) {
|
||||
item.selectedGroup.forEach((selectedItem) => {
|
||||
console.log(selectedItem)
|
||||
if (selectedItem != 'null') {
|
||||
assessmentRecordDetails.value.push({
|
||||
ckGroupId: element.snowFlakeId, //选项的雪花Id
|
||||
ckItemId: item.snowFlakeId, //已选择的ID
|
||||
ckStandardId: selectedItem, //已选择的雪花ID
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -309,6 +310,8 @@ const onSubmit = async function () {
|
|||
const result = await api.post('/assessmentCriteria/submitAssessmentRecord', assessmentRecordParams)
|
||||
console.log('🚀 ~ onSubmit ~ result:', result)
|
||||
Taro.hideLoading()
|
||||
store.dailyinspectionList([]) //清空数据
|
||||
assessmentCriteriaRulesByCkProjectId(currentCkProjectId.value) //重新获取数据
|
||||
if (result.code === 200) {
|
||||
Taro.showToast({
|
||||
title: result.message,
|
||||
|
|
Loading…
Reference in New Issue