前台上架-预览bug修复
This commit is contained in:
parent
ef980d77c3
commit
531aa7aafb
|
@ -474,15 +474,40 @@
|
|||
}
|
||||
// 预览
|
||||
const preview = () => {
|
||||
dataFrom.value.infoList = dataFrom.value.infoList.filter(
|
||||
(item) => item.attrValue !== ''
|
||||
)
|
||||
console.log('预览==============>', dataFrom.value)
|
||||
window.sessionStorage.setItem('preview', JSON.stringify(dataFrom.value))
|
||||
const newpage = router.resolve({
|
||||
path: '/details',
|
||||
})
|
||||
window.open(newpage.href, '_blank')
|
||||
notFilled.value = []
|
||||
console.log(dataFrom.value, 'dataFrom.value.name')
|
||||
if (
|
||||
dataFrom.value.infoList.filter((val) => val.attrType === '使用方式')[0] &&
|
||||
dataFrom.value.infoList.filter((val) => val.attrType === '使用方式')[0]
|
||||
.attrValue == '调用接口'
|
||||
) {
|
||||
if (
|
||||
!dataFrom.value.infoList.filter(
|
||||
(val) => val.attrType === '服务接口'
|
||||
)[0] ||
|
||||
!dataFrom.value.infoList.filter((val) => val.attrType === '服务接口')[0]
|
||||
.attrValue
|
||||
) {
|
||||
notFilled.value.push('服务接口')
|
||||
}
|
||||
if (!dataFrom.value.apiMethodType) {
|
||||
notFilled.value.push('接口请求方式')
|
||||
}
|
||||
}
|
||||
if (notFilled.value.length > 0) {
|
||||
message.warning('请填写必填字段')
|
||||
console.log(notFilled.value)
|
||||
} else {
|
||||
dataFrom.value.infoList = dataFrom.value.infoList.filter(
|
||||
(item) => item.attrValue !== ''
|
||||
)
|
||||
console.log('预览==============>', dataFrom.value)
|
||||
window.sessionStorage.setItem('preview', JSON.stringify(dataFrom.value))
|
||||
const newpage = router.resolve({
|
||||
path: '/details',
|
||||
})
|
||||
window.open(newpage.href, '_blank')
|
||||
}
|
||||
}
|
||||
const submit = () => {
|
||||
notFilled.value = []
|
||||
|
|
|
@ -435,15 +435,31 @@
|
|||
}
|
||||
// 预览
|
||||
const preview = () => {
|
||||
dataFrom.value.infoList = dataFrom.value.infoList.filter(
|
||||
(item) => item.attrValue !== ''
|
||||
)
|
||||
console.log('预览==============>', dataFrom.value)
|
||||
window.sessionStorage.setItem('preview', JSON.stringify(dataFrom.value))
|
||||
const newpage = router.resolve({
|
||||
path: '/details',
|
||||
})
|
||||
window.open(newpage.href, '_blank')
|
||||
notFilled.value = []
|
||||
console.log(dataFrom.value, 'dataFrom.value.name')
|
||||
if (
|
||||
!dataFrom.value.infoList.filter(
|
||||
(val) => val.attrType === '组件地址'
|
||||
)[0] ||
|
||||
!dataFrom.value.infoList.filter((val) => val.attrType === '组件地址')[0]
|
||||
.attrValue
|
||||
) {
|
||||
notFilled.value.push('组件地址')
|
||||
}
|
||||
if (notFilled.value.length > 0) {
|
||||
message.warning('请填写必填字段')
|
||||
console.log(notFilled.value)
|
||||
} else {
|
||||
dataFrom.value.infoList = dataFrom.value.infoList.filter(
|
||||
(item) => item.attrValue !== ''
|
||||
)
|
||||
console.log('预览==============>', dataFrom.value)
|
||||
window.sessionStorage.setItem('preview', JSON.stringify(dataFrom.value))
|
||||
const newpage = router.resolve({
|
||||
path: '/details',
|
||||
})
|
||||
window.open(newpage.href, '_blank')
|
||||
}
|
||||
}
|
||||
const submit = () => {
|
||||
notFilled.value = []
|
||||
|
|
|
@ -434,15 +434,31 @@
|
|||
}
|
||||
// 预览
|
||||
const preview = () => {
|
||||
dataFrom.value.infoList = dataFrom.value.infoList.filter(
|
||||
(item) => item.attrValue !== ''
|
||||
)
|
||||
console.log('预览==============>', dataFrom.value)
|
||||
window.sessionStorage.setItem('preview', JSON.stringify(dataFrom.value))
|
||||
const newpage = router.resolve({
|
||||
path: '/details',
|
||||
})
|
||||
window.open(newpage.href, '_blank')
|
||||
notFilled.value = []
|
||||
console.log(dataFrom.value, 'dataFrom.value.name')
|
||||
if (
|
||||
!dataFrom.value.infoList.filter(
|
||||
(val) => val.attrType === '组件地址'
|
||||
)[0] ||
|
||||
!dataFrom.value.infoList.filter((val) => val.attrType === '组件地址')[0]
|
||||
.attrValue
|
||||
) {
|
||||
notFilled.value.push('组件地址')
|
||||
}
|
||||
if (notFilled.value.length > 0) {
|
||||
message.warning('请填写必填字段')
|
||||
console.log(notFilled.value)
|
||||
} else {
|
||||
dataFrom.value.infoList = dataFrom.value.infoList.filter(
|
||||
(item) => item.attrValue !== ''
|
||||
)
|
||||
console.log('预览==============>', dataFrom.value)
|
||||
window.sessionStorage.setItem('preview', JSON.stringify(dataFrom.value))
|
||||
const newpage = router.resolve({
|
||||
path: '/details',
|
||||
})
|
||||
window.open(newpage.href, '_blank')
|
||||
}
|
||||
}
|
||||
// 特殊字段处理
|
||||
const refPutOnTheShelf = ref(null)
|
||||
|
|
|
@ -334,15 +334,31 @@
|
|||
}
|
||||
// 预览
|
||||
const preview = () => {
|
||||
dataFrom.value.infoList = dataFrom.value.infoList.filter(
|
||||
(item) => item.attrValue !== ''
|
||||
)
|
||||
console.log('预览==============>', dataFrom.value)
|
||||
window.sessionStorage.setItem('preview', JSON.stringify(dataFrom.value))
|
||||
const newpage = router.resolve({
|
||||
path: '/details',
|
||||
})
|
||||
window.open(newpage.href, '_blank')
|
||||
notFilled.value = []
|
||||
console.log(dataFrom.value, 'dataFrom.value.name')
|
||||
if (
|
||||
!dataFrom.value.infoList.filter(
|
||||
(val) => val.attrType === '服务地址'
|
||||
)[0] ||
|
||||
!dataFrom.value.infoList.filter((val) => val.attrType === '服务地址')[0]
|
||||
.attrValue
|
||||
) {
|
||||
notFilled.value.push('服务地址')
|
||||
}
|
||||
if (notFilled.value.length > 0) {
|
||||
message.warning('请填写必填字段')
|
||||
console.log(notFilled.value)
|
||||
} else {
|
||||
dataFrom.value.infoList = dataFrom.value.infoList.filter(
|
||||
(item) => item.attrValue !== ''
|
||||
)
|
||||
console.log('预览==============>', dataFrom.value)
|
||||
window.sessionStorage.setItem('preview', JSON.stringify(dataFrom.value))
|
||||
const newpage = router.resolve({
|
||||
path: '/details',
|
||||
})
|
||||
window.open(newpage.href, '_blank')
|
||||
}
|
||||
}
|
||||
// 特殊字段处理
|
||||
const refPutOnTheShelf = ref(null)
|
||||
|
|
|
@ -111,7 +111,8 @@
|
|||
item.attrType === '技术文档' ||
|
||||
item.attrType === '服务商' ||
|
||||
item.attrType === '服务商联系人' ||
|
||||
item.attrType === '服务商联系电话'
|
||||
item.attrType === '服务商联系电话' ||
|
||||
item.attrType === '服务接口'
|
||||
) {
|
||||
list.value.push('使用方式')
|
||||
}
|
||||
|
@ -164,7 +165,8 @@
|
|||
item.attrType === '技术文档' ||
|
||||
item.attrType === '服务商' ||
|
||||
item.attrType === '服务商联系人' ||
|
||||
item.attrType === '服务商联系电话'
|
||||
item.attrType === '服务商联系电话' ||
|
||||
item.attrType === '服务接口'
|
||||
) {
|
||||
list.value.push('使用方式')
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue