|
|
|
@ -46,37 +46,42 @@
|
|
|
|
|
const refInfoModal = ref()
|
|
|
|
|
const [registerModal, { openModal }] = useModal()
|
|
|
|
|
const [registerInfoModal, { openModal: openInfoModal }] = useModal()
|
|
|
|
|
const firstQuery = ref(false)
|
|
|
|
|
const [registerTable, { reload, getDataSource }] = useTable({
|
|
|
|
|
title: '集装箱信息列表',
|
|
|
|
|
api: async (p) => {
|
|
|
|
|
const res: API.DataResult = await ApiList(p)
|
|
|
|
|
let type = true
|
|
|
|
|
JSON.parse(p.queryCondition).forEach((e) => {
|
|
|
|
|
if (e.FieldName == 'isOnlineId') {
|
|
|
|
|
type = false
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
if (type) {
|
|
|
|
|
let MessageArr: any = []
|
|
|
|
|
res.data.forEach((item) => {
|
|
|
|
|
if (item.isOnlineId == 0) {
|
|
|
|
|
MessageArr.push(item.cntrno)
|
|
|
|
|
if (firstQuery.value) {
|
|
|
|
|
let type = true
|
|
|
|
|
JSON.parse(p.queryCondition).forEach((e) => {
|
|
|
|
|
if (e.FieldName == 'isOnlineId') {
|
|
|
|
|
type = false
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
if (MessageArr.length) {
|
|
|
|
|
// let txt = `有${MessageArr.length}个待上线:`
|
|
|
|
|
let txt = `有${MessageArr.length}个待上线.`
|
|
|
|
|
// for (let i = 0; i < 5; i++) {
|
|
|
|
|
// if (MessageArr[i]) {
|
|
|
|
|
// txt = i == 0 ? `${txt} ${MessageArr[i]}` : `${txt},\n${MessageArr[i]}`
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
notification.warning({
|
|
|
|
|
// message: MessageArr.length > 5 ? `${txt}...` : txt,
|
|
|
|
|
message: txt,
|
|
|
|
|
duration: 6000,
|
|
|
|
|
if (type) {
|
|
|
|
|
let MessageArr: any = []
|
|
|
|
|
res.data.forEach((item) => {
|
|
|
|
|
if (item.isOnlineId == 0) {
|
|
|
|
|
MessageArr.push(item.cntrno)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
if (MessageArr.length) {
|
|
|
|
|
// let txt = `有${MessageArr.length}个待上线:`
|
|
|
|
|
let txt = `有${MessageArr.length}个待上线.`
|
|
|
|
|
// for (let i = 0; i < 5; i++) {
|
|
|
|
|
// if (MessageArr[i]) {
|
|
|
|
|
// txt = i == 0 ? `${txt} ${MessageArr[i]}` : `${txt},\n${MessageArr[i]}`
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
notification.warning({
|
|
|
|
|
// message: MessageArr.length > 5 ? `${txt}...` : txt,
|
|
|
|
|
message: txt,
|
|
|
|
|
duration: 6000,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
firstQuery.value = true
|
|
|
|
|
}
|
|
|
|
|
res.data.forEach((item, index) => {
|
|
|
|
|
item.index = index + 1
|
|
|
|
|