异步组件传值问题

szh-new
lijingjia 3 months ago
parent b56611a4e0
commit 8424ae72ff

@ -186,7 +186,7 @@
const operationArea = defineAsyncComponent(() => import("./modules/operationArea.vue"))
import basicInfo from './modules/basicInfo.vue'
import mailingInfo from './modules/mailingInfo.vue'
import noteInfo from './modules/noteInfo.vue'
const noteInfo = defineAsyncComponent(() => import("./modules/noteInfo.vue"))
const cargoInfo = defineAsyncComponent(() => import("./modules/cargoInfo.vue"))
const goodsTable = defineAsyncComponent(() => import("./modules/goodsTable.vue"))
const ediMore = defineAsyncComponent(() => import("./modules/ediMore.vue"))

@ -407,6 +407,7 @@
const source = ref(route.query.source || 'edit')
onMounted(() => {
const nval = props.details
console.log(nval)
if (nval.id) {
setFieldsValue1({ marks: nval.marks, description: nval.description })
setFieldsValue2(nval)

@ -252,7 +252,7 @@
const route = useRoute()
const props = defineProps({
details: { type: Object, default: {} },
isLockBooking: { type: Boolean, default: false },
isLockBooking: { type: Boolean, default: false }
})
//
const source = 'edit'
@ -1259,7 +1259,6 @@
},
])
function init(data, hot) {
console.log(data)
const { ctnInfo } = data
if (ctnInfo && ctnInfo.length > 0) {
totalPkgs.value = 0
@ -1618,32 +1617,17 @@
}
})
watch(
list.value,
() => props.details,
(val) => {
let a = 0
let b = 0
val.forEach((item) => {
if (item.selected) {
a += 1
} else {
b += 1
}
})
if (a == 0) {
allCheck.value = false
}
if (b == 0) {
allCheck.value = true
}
if (a != 0 && b != 0) {
someCheck.value = true
} else {
someCheck.value = false
//
if (val.ctnInfo && val.ctnInfo.length) {
const hot = hotmain.value.hotInstance
init(val, hot)
}
},
{
deep: true,
},
}
)
//
const settings = {

@ -80,6 +80,7 @@
})
}
})
setFieldsValue(props.details)
// if (source.value != 'edit') {
// noteFormSchema.forEach(item => {
// item.dynamicDisabled = true

Loading…
Cancel
Save