修试优化

This commit is contained in:
bb_pan 2025-08-27 19:37:59 +08:00
parent a180e1e5a0
commit d2e8fb8097
2 changed files with 12 additions and 4 deletions

View File

@ -296,9 +296,11 @@ const isExpanded = ref(false)
onLoad((options) => { onLoad((options) => {
console.log(options) console.log(options)
console.log('🚀 ~ options:', options.itemId)
queryParams.value = JSON.parse(options.queryParams) queryParams.value = JSON.parse(options.queryParams)
rowIndex.value = options.rowIndex console.log('🚀 ~ queryParams.value:', queryParams.value)
console.log(queryParams.value) rowIndex.value = queryParams.value.repairDeviceList.findIndex((v) => v.id == options.itemId)
console.log('🚀 ~ rowIndex.value:', rowIndex.value)
getScrapReasonListData() getScrapReasonListData()
}) })
onShow(() => { onShow(() => {
@ -763,10 +765,15 @@ const saveCode = () => {
} }
} }
} }
const isSubmit = ref(false)
// //
const saveCodeApi = async () => { const saveCodeApi = async () => {
if (isSubmit.value) return
isSubmit.value = true
// //
rowData.value = queryParams.value rowData.value = JSON.parse(JSON.stringify(queryParams.value))
console.log('🚀 ~ saveCodeApi ~ rowData.value:', rowData.value)
// //
rowData.value.repairDeviceList[rowIndex.value].repairList = [ rowData.value.repairDeviceList[rowIndex.value].repairList = [
{ {
@ -821,6 +828,7 @@ const saveCodeApi = async () => {
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}).finally(() => { }).finally(() => {
isSubmit.value = false
uni.hideLoading() uni.hideLoading()
}) })
} }

View File

@ -179,7 +179,7 @@ const goOperate = (item,index) => {
if(item.status==0){ if(item.status==0){
const codingUrl = '/pages/repair/repairManage/code-operate' // const codingUrl = '/pages/repair/repairManage/code-operate' //
uni.navigateTo({ uni.navigateTo({
url: `${codingUrl}?queryParams=${JSON.stringify(queryParams.value)}&rowIndex=${index}`, url: `${codingUrl}?queryParams=${JSON.stringify(queryParams.value)}&itemId=${item.id}`,
}) })
} }
} }