pull/1/head
张同海 2 years ago
parent 42fb9fe27a
commit 36ce4799d2

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

@ -165,14 +165,25 @@
<a-modal :maskClosable="false" :width="950" :visible="addVisible" @ok="addSubmit" @cancel="addCancel">
<a-radio-group class="group-label-box" v-model="carrierRadio">
<div class="group-label">
<a-radio :style="radioStyle" :value="item.code" v-for="item in carrierData" :key="item.code">
<!-- <img class="radio-logo" :src="`@/assets/logo/${item.code}.png`" /> -->
<p v-if="RecentlyCarrierData.length"></p>
<div class="group-label" v-if="RecentlyCarrierData.length">
<a-radio :style="radioStyle" :value="item.code" v-for="item in RecentlyCarrierData" :key="item.code">
<img class="radio-logo" :src="require(`@/assets/logo/${item.code}.png`)" />
{{ item.code }}
<!-- {{ item.code }} -->
{{ item.cnName }}
</a-radio>
</div>
<div v-for="e in Object.keys(RcarrierData)" :key="e">
<p>{{ e }}</p>
<div class="group-label">
<a-radio :style="radioStyle" :value="item.code" v-for="item in RcarrierData[e]" :key="item.code">
<img class="radio-logo" :src="require(`@/assets/logo/${item.code}.png`)" />
<!-- {{ item.code }} -->
{{ item.cnName }}
</a-radio>
</div>
</div>
</a-radio-group>
</a-modal>
@ -538,7 +549,9 @@ export default {
WebVessel: '',
portDischargeData: [],
destinationData: [],
carrierData: []
carrierData: [],
RcarrierData: [],
RecentlyCarrierData: []
}
},
created() {
@ -671,9 +684,42 @@ export default {
},
// - start
getCarrier() {
const Rdata = data => {
let RData = {}
for (var i = 0; i < 26; i++) {
RData[String.fromCharCode(65 + i)] = []
data.forEach(item => {
if (String.fromCharCode(65 + i) == item.enName[0].toUpperCase()) {
RData[String.fromCharCode(65 + i)].push(item)
}
})
}
let Obj = {
'A-D': ['A', 'B', 'C', 'D'],
'E-L': ['E', 'F', 'G', 'H', 'I', 'J', 'K', 'L'],
'M-R': ['M', 'N', 'O', 'P', 'Q', 'R'],
'S-U': ['S', 'T', 'U'],
'V-Z': ['V', 'W', 'X', 'Y', 'Z']
}
let Data = {
'A-D': [],
'E-L': [],
'M-R': [],
'S-U': [],
'V-Z': []
}
Object.keys(Obj).forEach(e => {
Obj[e].forEach(item => {
Data[e].push(...RData[item])
})
})
this.RcarrierData = Data
}
GetCarrierlist()
.then(res => {
if (res.code === 200) {
this.carrierData = res.data
Rdata(res.data)
DjyUserConfigGet({ type: 'booking_memory' })
.then(e => {
console.log(e)
@ -686,13 +732,11 @@ export default {
}
})
})
this.carrierData = data
} else {
this.carrierData = res.data
this.RecentlyCarrierData = data
}
})
.catch(() => {
this.carrierData = res.data
Rdata(res.data)
})
}
})
@ -1071,7 +1115,7 @@ export default {
let data = []
data.push(this.carrierRadio)
this.carrierData.forEach(item => {
if (item.code != this.carrierRadio) {
if (item.code != this.carrierRadio && data.length < 10) {
data.push(item.code)
}
})

Loading…
Cancel
Save