|
@@ -1,11 +1,12 @@
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
import SelectValue from './SelectValue.vue'
|
|
import SelectValue from './SelectValue.vue'
|
|
|
import { ref } from 'vue'
|
|
import { ref } from 'vue'
|
|
|
|
|
+import { cloneDeep } from 'lodash'
|
|
|
|
|
|
|
|
// 定义类型接口
|
|
// 定义类型接口
|
|
|
interface RuleOption {
|
|
interface RuleOption {
|
|
|
- label: string;
|
|
|
|
|
- value: string;
|
|
|
|
|
|
|
+ label: string
|
|
|
|
|
+ value: string
|
|
|
}
|
|
}
|
|
|
interface PortOption {
|
|
interface PortOption {
|
|
|
value: string
|
|
value: string
|
|
@@ -13,21 +14,20 @@ interface PortOption {
|
|
|
checked: boolean
|
|
checked: boolean
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
interface RuleItem {
|
|
interface RuleItem {
|
|
|
- priority: string;
|
|
|
|
|
- rule_type: string;
|
|
|
|
|
- mode_type: string;
|
|
|
|
|
- ports?: string[];
|
|
|
|
|
- carrier?: string[];
|
|
|
|
|
- PortList?:PortOption[];
|
|
|
|
|
- CarrierList?:PortOption[];
|
|
|
|
|
- recommended_delivery_from: string;
|
|
|
|
|
- recommended_delivery_to: string;
|
|
|
|
|
|
|
+ priority: string
|
|
|
|
|
+ rule_type: string
|
|
|
|
|
+ mode_type: string
|
|
|
|
|
+ ports?: string[]
|
|
|
|
|
+ carrier?: string[]
|
|
|
|
|
+ PortList?: PortOption[]
|
|
|
|
|
+ CarrierList?: PortOption[]
|
|
|
|
|
+ recommended_delivery_from: string
|
|
|
|
|
+ recommended_delivery_to: string
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 定义 RuleItem 中数组字段的类型
|
|
// 定义 RuleItem 中数组字段的类型
|
|
|
-type ArrayFields = 'ports' | 'carrier';
|
|
|
|
|
|
|
+type ArrayFields = 'ports' | 'carrier'
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
|
recommendata: {
|
|
recommendata: {
|
|
@@ -45,9 +45,7 @@ const isAir = ref(false)
|
|
|
const isSea = ref(false)
|
|
const isSea = ref(false)
|
|
|
const RecommendCheckedList = ref<string[]>([])
|
|
const RecommendCheckedList = ref<string[]>([])
|
|
|
// 选项配置
|
|
// 选项配置
|
|
|
-const AirRuleTypeoptions = ref<RuleOption[]>([
|
|
|
|
|
- { label: 'Specific Rule', value: 'Specific Rule' }
|
|
|
|
|
-])
|
|
|
|
|
|
|
+const AirRuleTypeoptions = ref<RuleOption[]>([{ label: 'Specific Rule', value: 'Specific Rule' }])
|
|
|
|
|
|
|
|
const RuleTypeoptions = ref<RuleOption[]>([
|
|
const RuleTypeoptions = ref<RuleOption[]>([
|
|
|
{ label: 'Specific Rule', value: 'Specific Rule' },
|
|
{ label: 'Specific Rule', value: 'Specific Rule' },
|
|
@@ -63,7 +61,7 @@ const AirContentList = ref<RuleItem[]>([
|
|
|
recommended_delivery_from: '',
|
|
recommended_delivery_from: '',
|
|
|
recommended_delivery_to: '',
|
|
recommended_delivery_to: '',
|
|
|
mode_type: 'air',
|
|
mode_type: 'air',
|
|
|
- PortList:[]
|
|
|
|
|
|
|
+ PortList: []
|
|
|
}
|
|
}
|
|
|
])
|
|
])
|
|
|
const SeaContentList = ref<RuleItem[]>([
|
|
const SeaContentList = ref<RuleItem[]>([
|
|
@@ -75,36 +73,39 @@ const SeaContentList = ref<RuleItem[]>([
|
|
|
recommended_delivery_from: '',
|
|
recommended_delivery_from: '',
|
|
|
recommended_delivery_to: '',
|
|
recommended_delivery_to: '',
|
|
|
mode_type: 'sea',
|
|
mode_type: 'sea',
|
|
|
- PortList:[],
|
|
|
|
|
|
|
+ PortList: [],
|
|
|
CarrierList: []
|
|
CarrierList: []
|
|
|
}
|
|
}
|
|
|
])
|
|
])
|
|
|
|
|
|
|
|
-const recommendata = ref(props.recommendata)
|
|
|
|
|
|
|
+const recommendata = ref()
|
|
|
|
|
|
|
|
const initRecommendData = () => {
|
|
const initRecommendData = () => {
|
|
|
- if(recommendata.value) {
|
|
|
|
|
|
|
+ if (recommendata.value) {
|
|
|
Recommendradio.value = recommendata.value.Recommendradio
|
|
Recommendradio.value = recommendata.value.Recommendradio
|
|
|
- if(Recommendradio.value == 2) {
|
|
|
|
|
|
|
+ if (Recommendradio.value == 2) {
|
|
|
isRecommendETA.value = true
|
|
isRecommendETA.value = true
|
|
|
RecommendCheckedList.value = recommendata.value.RecommendCheckedList
|
|
RecommendCheckedList.value = recommendata.value.RecommendCheckedList
|
|
|
- if(RecommendCheckedList.value.includes('Air')) {
|
|
|
|
|
|
|
+ if (RecommendCheckedList.value.includes('Air')) {
|
|
|
isAir.value = true
|
|
isAir.value = true
|
|
|
}
|
|
}
|
|
|
- if(RecommendCheckedList.value.includes('Sea')) {
|
|
|
|
|
|
|
+ if (RecommendCheckedList.value.includes('Sea')) {
|
|
|
isSea.value = true
|
|
isSea.value = true
|
|
|
}
|
|
}
|
|
|
AirContentList.value = recommendata.value.RecommendCheckedAirList
|
|
AirContentList.value = recommendata.value.RecommendCheckedAirList
|
|
|
SeaContentList.value = recommendata.value.RecommendCheckedSeaList
|
|
SeaContentList.value = recommendata.value.RecommendCheckedSeaList
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-watch(() => props.recommendata, (val) => {
|
|
|
|
|
- recommendata.value = val
|
|
|
|
|
- initRecommendData()
|
|
|
|
|
-}, { immediate: true, deep: true })
|
|
|
|
|
-
|
|
|
|
|
|
|
+watch(
|
|
|
|
|
+ () => props.recommendata,
|
|
|
|
|
+ (val) => {
|
|
|
|
|
+ recommendata.value = cloneDeep(val)
|
|
|
|
|
+ initRecommendData()
|
|
|
|
|
+ },
|
|
|
|
|
+ { immediate: true, deep: true }
|
|
|
|
|
+)
|
|
|
|
|
|
|
|
// 创建规则项的工厂函数
|
|
// 创建规则项的工厂函数
|
|
|
function createRuleItem(type: 'Air' | 'Sea', ruleType: string): RuleItem {
|
|
function createRuleItem(type: 'Air' | 'Sea', ruleType: string): RuleItem {
|
|
@@ -112,13 +113,13 @@ function createRuleItem(type: 'Air' | 'Sea', ruleType: string): RuleItem {
|
|
|
priority: 'P1',
|
|
priority: 'P1',
|
|
|
rule_type: ruleType,
|
|
rule_type: ruleType,
|
|
|
recommended_delivery_from: '',
|
|
recommended_delivery_from: '',
|
|
|
- recommended_delivery_to: '',
|
|
|
|
|
|
|
+ recommended_delivery_to: ''
|
|
|
}
|
|
}
|
|
|
if (type === 'Air') {
|
|
if (type === 'Air') {
|
|
|
return {
|
|
return {
|
|
|
...baseItem,
|
|
...baseItem,
|
|
|
ports: ruleType === '*Default Rule' ? ['ALL'] : [],
|
|
ports: ruleType === '*Default Rule' ? ['ALL'] : [],
|
|
|
- mode_type: 'air',
|
|
|
|
|
|
|
+ mode_type: 'air'
|
|
|
// PortList: JSON.parse(JSON.stringify(AirPorList.value))
|
|
// PortList: JSON.parse(JSON.stringify(AirPorList.value))
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -126,7 +127,7 @@ function createRuleItem(type: 'Air' | 'Sea', ruleType: string): RuleItem {
|
|
|
...baseItem,
|
|
...baseItem,
|
|
|
ports: ruleType === '*Default Rule' ? ['ALL'] : [],
|
|
ports: ruleType === '*Default Rule' ? ['ALL'] : [],
|
|
|
carrier: ruleType === '*Default Rule' ? ['ALL'] : [],
|
|
carrier: ruleType === '*Default Rule' ? ['ALL'] : [],
|
|
|
- mode_type: 'sea',
|
|
|
|
|
|
|
+ mode_type: 'sea'
|
|
|
// PortList: JSON.parse(JSON.stringify(SeaPortList.value)),
|
|
// PortList: JSON.parse(JSON.stringify(SeaPortList.value)),
|
|
|
// CarrierList: JSON.parse(JSON.stringify(SeaCarrierList.value))
|
|
// CarrierList: JSON.parse(JSON.stringify(SeaCarrierList.value))
|
|
|
}
|
|
}
|
|
@@ -149,56 +150,68 @@ const CheckChange = (val: string[]) => {
|
|
|
|
|
|
|
|
const handleCheckboxClick = (event: Event) => {
|
|
const handleCheckboxClick = (event: Event) => {
|
|
|
const target = event.target as HTMLElement
|
|
const target = event.target as HTMLElement
|
|
|
- const isCheckboxInput = target.closest('.el-checkbox__inner')
|
|
|
|
|
|
|
+ const isCheckboxInput = target.closest('.el-checkbox__input')
|
|
|
const isCheckboxTitle = target.closest('.titlecheckbox')
|
|
const isCheckboxTitle = target.closest('.titlecheckbox')
|
|
|
if (!isCheckboxInput && !isCheckboxTitle) {
|
|
if (!isCheckboxInput && !isCheckboxTitle) {
|
|
|
event.preventDefault()
|
|
event.preventDefault()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
// 选择booking window
|
|
// 选择booking window
|
|
|
const ChangeFrequency = (val: number) => {
|
|
const ChangeFrequency = (val: number) => {
|
|
|
isRecommendETA.value = val === 2
|
|
isRecommendETA.value = val === 2
|
|
|
- emits('chackchangerecommend', RecommendCheckedList.value, AirContentList.value, SeaContentList.value, Recommendradio.value)
|
|
|
|
|
|
|
+ emits(
|
|
|
|
|
+ 'chackchangerecommend',
|
|
|
|
|
+ RecommendCheckedList.value,
|
|
|
|
|
+ AirContentList.value,
|
|
|
|
|
+ SeaContentList.value,
|
|
|
|
|
+ Recommendradio.value
|
|
|
|
|
+ )
|
|
|
}
|
|
}
|
|
|
// 修复后的 handleInput 函数
|
|
// 修复后的 handleInput 函数
|
|
|
-const handleInput = (val: string, index: number, type: 'recommended_delivery_from' | 'recommended_delivery_to', list: RuleItem[]) => {
|
|
|
|
|
|
|
+const handleInput = (
|
|
|
|
|
+ val: string,
|
|
|
|
|
+ index: number,
|
|
|
|
|
+ type: 'recommended_delivery_from' | 'recommended_delivery_to',
|
|
|
|
|
+ list: RuleItem[]
|
|
|
|
|
+) => {
|
|
|
// 移除非数字字符
|
|
// 移除非数字字符
|
|
|
- const numStr = val.replace(/[^\d]/g, '');
|
|
|
|
|
|
|
+ const numStr = val.replace(/[^\d]/g, '')
|
|
|
// 处理空值情况
|
|
// 处理空值情况
|
|
|
if (numStr === '') {
|
|
if (numStr === '') {
|
|
|
- list[index][type] = '';
|
|
|
|
|
- return;
|
|
|
|
|
|
|
+ list[index][type] = ''
|
|
|
|
|
+ return
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 转换为数字以进行范围检查
|
|
// 转换为数字以进行范围检查
|
|
|
- const num = parseInt(numStr, 10);
|
|
|
|
|
-
|
|
|
|
|
|
|
+ const num = parseInt(numStr, 10)
|
|
|
|
|
+
|
|
|
// 确保最小值为1(但保持为字符串形式)
|
|
// 确保最小值为1(但保持为字符串形式)
|
|
|
if (num < 1) {
|
|
if (num < 1) {
|
|
|
- list[index][type] = '1';
|
|
|
|
|
|
|
+ list[index][type] = '1'
|
|
|
} else {
|
|
} else {
|
|
|
// 保持为字符串形式
|
|
// 保持为字符串形式
|
|
|
- list[index][type] = numStr;
|
|
|
|
|
|
|
+ list[index][type] = numStr
|
|
|
}
|
|
}
|
|
|
-};
|
|
|
|
|
|
|
+}
|
|
|
// 删除数据
|
|
// 删除数据
|
|
|
const handleDelete = (index: number, list: RuleItem[], type: 'Air' | 'Sea') => {
|
|
const handleDelete = (index: number, list: RuleItem[], type: 'Air' | 'Sea') => {
|
|
|
- list.splice(index, 1);
|
|
|
|
|
|
|
+ list.splice(index, 1)
|
|
|
if (list.length === 0) {
|
|
if (list.length === 0) {
|
|
|
if (type === 'Air') {
|
|
if (type === 'Air') {
|
|
|
isAir.value = false
|
|
isAir.value = false
|
|
|
- RecommendCheckedList.value = RecommendCheckedList.value.filter(item => item !== 'Air')
|
|
|
|
|
|
|
+ RecommendCheckedList.value = RecommendCheckedList.value.filter((item) => item !== 'Air')
|
|
|
} else {
|
|
} else {
|
|
|
isSea.value = false
|
|
isSea.value = false
|
|
|
- RecommendCheckedList.value = RecommendCheckedList.value.filter(item => item !== 'Sea')
|
|
|
|
|
|
|
+ RecommendCheckedList.value = RecommendCheckedList.value.filter((item) => item !== 'Sea')
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
updatePriorities()
|
|
updatePriorities()
|
|
|
-};
|
|
|
|
|
|
|
+}
|
|
|
// 添加数据
|
|
// 添加数据
|
|
|
const AddRuleItem = (list: RuleItem[], type: 'Air' | 'Sea') => {
|
|
const AddRuleItem = (list: RuleItem[], type: 'Air' | 'Sea') => {
|
|
|
// 检查是否已存在默认规则
|
|
// 检查是否已存在默认规则
|
|
|
- const hasDefaultRule = list.some(item => item.rule_type === '*Default Rule')
|
|
|
|
|
|
|
+ const hasDefaultRule = list.some((item) => item.rule_type === '*Default Rule')
|
|
|
// 如果已经有默认规则,则创建特定规则
|
|
// 如果已经有默认规则,则创建特定规则
|
|
|
const ruleType = hasDefaultRule ? 'Specific Rule' : '*Default Rule'
|
|
const ruleType = hasDefaultRule ? 'Specific Rule' : '*Default Rule'
|
|
|
list.push(createRuleItem(type, ruleType))
|
|
list.push(createRuleItem(type, ruleType))
|
|
@@ -206,15 +219,21 @@ const AddRuleItem = (list: RuleItem[], type: 'Air' | 'Sea') => {
|
|
|
}
|
|
}
|
|
|
// 根据RuleType的值来修改Priority的值
|
|
// 根据RuleType的值来修改Priority的值
|
|
|
const updatePriorities = () => {
|
|
const updatePriorities = () => {
|
|
|
- emits('chackchangerecommend', RecommendCheckedList.value, AirContentList.value, SeaContentList.value,Recommendradio.value)
|
|
|
|
|
|
|
+ emits(
|
|
|
|
|
+ 'chackchangerecommend',
|
|
|
|
|
+ RecommendCheckedList.value,
|
|
|
|
|
+ AirContentList.value,
|
|
|
|
|
+ SeaContentList.value,
|
|
|
|
|
+ Recommendradio.value
|
|
|
|
|
+ )
|
|
|
updateListPriorities(AirContentList.value, 'Air')
|
|
updateListPriorities(AirContentList.value, 'Air')
|
|
|
updateListPriorities(SeaContentList.value, 'Sea')
|
|
updateListPriorities(SeaContentList.value, 'Sea')
|
|
|
-};
|
|
|
|
|
|
|
+}
|
|
|
// 统一更新列表优先级
|
|
// 统一更新列表优先级
|
|
|
const updateListPriorities = (list: RuleItem[], type: 'Air' | 'Sea') => {
|
|
const updateListPriorities = (list: RuleItem[], type: 'Air' | 'Sea') => {
|
|
|
const length = list.length
|
|
const length = list.length
|
|
|
// 保护默认规则的数据
|
|
// 保护默认规则的数据
|
|
|
- list.forEach(item => {
|
|
|
|
|
|
|
+ list.forEach((item) => {
|
|
|
if (item.rule_type === '*Default Rule') {
|
|
if (item.rule_type === '*Default Rule') {
|
|
|
if (type === 'Air') {
|
|
if (type === 'Air') {
|
|
|
item.ports = ['ALL']
|
|
item.ports = ['ALL']
|
|
@@ -234,40 +253,43 @@ const updateListPriorities = (list: RuleItem[], type: 'Air' | 'Sea') => {
|
|
|
}
|
|
}
|
|
|
// 处理长度为1
|
|
// 处理长度为1
|
|
|
const handleLengthOne = (list: RuleItem[], type: string) => {
|
|
const handleLengthOne = (list: RuleItem[], type: string) => {
|
|
|
- list.forEach(item => item.priority = 'P1')
|
|
|
|
|
-};
|
|
|
|
|
|
|
+ list.forEach((item) => (item.priority = 'P1'))
|
|
|
|
|
+}
|
|
|
// 处理长度为2
|
|
// 处理长度为2
|
|
|
const handleLengthTwo = (list: RuleItem[], type: string) => {
|
|
const handleLengthTwo = (list: RuleItem[], type: string) => {
|
|
|
- const types = new Set(list.map(i => i.rule_type))
|
|
|
|
|
|
|
+ const types = new Set(list.map((i) => i.rule_type))
|
|
|
// 两个都是 *Default Rule
|
|
// 两个都是 *Default Rule
|
|
|
if (types.size === 1 && types.has('*Default Rule')) {
|
|
if (types.size === 1 && types.has('*Default Rule')) {
|
|
|
- list.forEach(item => item.priority = 'P1')
|
|
|
|
|
|
|
+ list.forEach((item) => (item.priority = 'P1'))
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
// 包含 *Default Rule 和其他类型
|
|
// 包含 *Default Rule 和其他类型
|
|
|
if (types.has('*Default Rule')) {
|
|
if (types.has('*Default Rule')) {
|
|
|
- list.forEach(item => {
|
|
|
|
|
|
|
+ list.forEach((item) => {
|
|
|
item.priority = item.rule_type === '*Default Rule' ? 'P2' : 'P1'
|
|
item.priority = item.rule_type === '*Default Rule' ? 'P2' : 'P1'
|
|
|
})
|
|
})
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
// 同时存在 Specific Rule 和 Single Dimension
|
|
// 同时存在 Specific Rule 和 Single Dimension
|
|
|
if (types.has('Specific Rule') && types.has('Single Dimension')) {
|
|
if (types.has('Specific Rule') && types.has('Single Dimension')) {
|
|
|
- list.forEach(item => {
|
|
|
|
|
|
|
+ list.forEach((item) => {
|
|
|
item.priority = item.rule_type === 'Specific Rule' ? 'P1' : 'P2'
|
|
item.priority = item.rule_type === 'Specific Rule' ? 'P1' : 'P2'
|
|
|
})
|
|
})
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
// 其他情况
|
|
// 其他情况
|
|
|
- list.forEach(item => item.priority = 'P1')
|
|
|
|
|
-};
|
|
|
|
|
|
|
+ list.forEach((item) => (item.priority = 'P1'))
|
|
|
|
|
+}
|
|
|
// 处理长度≥3
|
|
// 处理长度≥3
|
|
|
const handleLengthThreePlus = (list: RuleItem[], type: string) => {
|
|
const handleLengthThreePlus = (list: RuleItem[], type: string) => {
|
|
|
// 统计各类型数量
|
|
// 统计各类型数量
|
|
|
- const counts = list.reduce((acc, cur) => {
|
|
|
|
|
- acc[cur.rule_type] = (acc[cur.rule_type] || 0) + 1
|
|
|
|
|
- return acc
|
|
|
|
|
- }, {} as Record<string, number>)
|
|
|
|
|
|
|
+ const counts = list.reduce(
|
|
|
|
|
+ (acc, cur) => {
|
|
|
|
|
+ acc[cur.rule_type] = (acc[cur.rule_type] || 0) + 1
|
|
|
|
|
+ return acc
|
|
|
|
|
+ },
|
|
|
|
|
+ {} as Record<string, number>
|
|
|
|
|
+ )
|
|
|
// 获取所有存在的类型
|
|
// 获取所有存在的类型
|
|
|
const existingTypes = Object.keys(counts)
|
|
const existingTypes = Object.keys(counts)
|
|
|
// 三个不同类型都存在
|
|
// 三个不同类型都存在
|
|
@@ -281,28 +303,30 @@ const handleLengthThreePlus = (list: RuleItem[], type: string) => {
|
|
|
'Single Dimension': 'P2',
|
|
'Single Dimension': 'P2',
|
|
|
'*Default Rule': 'P3'
|
|
'*Default Rule': 'P3'
|
|
|
}
|
|
}
|
|
|
- list.forEach(item => {
|
|
|
|
|
|
|
+ list.forEach((item) => {
|
|
|
item.priority = priorityMap[item.rule_type]
|
|
item.priority = priorityMap[item.rule_type]
|
|
|
})
|
|
})
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
// 全为同一种类型的情况
|
|
// 全为同一种类型的情况
|
|
|
if (existingTypes.length === 1) {
|
|
if (existingTypes.length === 1) {
|
|
|
- list.forEach(item => item.priority = 'P1')
|
|
|
|
|
|
|
+ list.forEach((item) => (item.priority = 'P1'))
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
// 处理 Specific + Default 组合
|
|
// 处理 Specific + Default 组合
|
|
|
- if (existingTypes.length === 2 &&
|
|
|
|
|
- existingTypes.includes('Specific Rule') &&
|
|
|
|
|
- existingTypes.includes('*Default Rule')) {
|
|
|
|
|
- list.forEach(item => {
|
|
|
|
|
|
|
+ if (
|
|
|
|
|
+ existingTypes.length === 2 &&
|
|
|
|
|
+ existingTypes.includes('Specific Rule') &&
|
|
|
|
|
+ existingTypes.includes('*Default Rule')
|
|
|
|
|
+ ) {
|
|
|
|
|
+ list.forEach((item) => {
|
|
|
item.priority = item.rule_type === 'Specific Rule' ? 'P1' : 'P2'
|
|
item.priority = item.rule_type === 'Specific Rule' ? 'P1' : 'P2'
|
|
|
})
|
|
})
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
// 存在两个Default Rule
|
|
// 存在两个Default Rule
|
|
|
if (counts['*Default Rule'] === 2 && existingTypes.length === 2) {
|
|
if (counts['*Default Rule'] === 2 && existingTypes.length === 2) {
|
|
|
- list.forEach(item => {
|
|
|
|
|
|
|
+ list.forEach((item) => {
|
|
|
item.priority = item.rule_type === '*Default Rule' ? 'P2' : 'P1'
|
|
item.priority = item.rule_type === '*Default Rule' ? 'P2' : 'P1'
|
|
|
})
|
|
})
|
|
|
return
|
|
return
|
|
@@ -311,12 +335,12 @@ const handleLengthThreePlus = (list: RuleItem[], type: string) => {
|
|
|
if (counts['Single Dimension'] === 2) {
|
|
if (counts['Single Dimension'] === 2) {
|
|
|
if (existingTypes.includes('*Default Rule')) {
|
|
if (existingTypes.includes('*Default Rule')) {
|
|
|
// 两个Single + 一个Default
|
|
// 两个Single + 一个Default
|
|
|
- list.forEach(item => {
|
|
|
|
|
|
|
+ list.forEach((item) => {
|
|
|
item.priority = item.rule_type === '*Default Rule' ? 'P2' : 'P1'
|
|
item.priority = item.rule_type === '*Default Rule' ? 'P2' : 'P1'
|
|
|
})
|
|
})
|
|
|
} else if (existingTypes.includes('Specific Rule')) {
|
|
} else if (existingTypes.includes('Specific Rule')) {
|
|
|
// 两个Single + 一个Specific
|
|
// 两个Single + 一个Specific
|
|
|
- list.forEach(item => {
|
|
|
|
|
|
|
+ list.forEach((item) => {
|
|
|
item.priority = item.rule_type === 'Specific Rule' ? 'P1' : 'P2'
|
|
item.priority = item.rule_type === 'Specific Rule' ? 'P1' : 'P2'
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
@@ -328,33 +352,39 @@ const handleLengthThreePlus = (list: RuleItem[], type: string) => {
|
|
|
'Single Dimension': 'P2',
|
|
'Single Dimension': 'P2',
|
|
|
'*Default Rule': 'P3'
|
|
'*Default Rule': 'P3'
|
|
|
}
|
|
}
|
|
|
- list.forEach(item => {
|
|
|
|
|
|
|
+ list.forEach((item) => {
|
|
|
item.priority = defaultPriorityMap[item.rule_type] || 'P3'
|
|
item.priority = defaultPriorityMap[item.rule_type] || 'P3'
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
// 修复:改变选项值 - 使用类型保护
|
|
// 修复:改变选项值 - 使用类型保护
|
|
|
-const changeSelectedValue = (val: string[], index: number, field: ArrayFields, list: RuleItem[]) => {
|
|
|
|
|
- const item = list[index] as Record<ArrayFields, string[]>;
|
|
|
|
|
- item[field] = val;
|
|
|
|
|
|
|
+const changeSelectedValue = (
|
|
|
|
|
+ val: string[],
|
|
|
|
|
+ index: number,
|
|
|
|
|
+ field: ArrayFields,
|
|
|
|
|
+ list: RuleItem[]
|
|
|
|
|
+) => {
|
|
|
|
|
+ const item = list[index] as Record<ArrayFields, string[]>
|
|
|
|
|
+ item[field] = val
|
|
|
// 新增逻辑:检查是否从 Single Dimension 变为 Specific Rule
|
|
// 新增逻辑:检查是否从 Single Dimension 变为 Specific Rule
|
|
|
if (item['rule_type'] != '*Default Rule') {
|
|
if (item['rule_type'] != '*Default Rule') {
|
|
|
if (item['mode_type'] === 'air') {
|
|
if (item['mode_type'] === 'air') {
|
|
|
// Air 规则:只检查 ports
|
|
// Air 规则:只检查 ports
|
|
|
if (item.ports && item.ports.length > 0 && !item.ports.includes('ALL')) {
|
|
if (item.ports && item.ports.length > 0 && !item.ports.includes('ALL')) {
|
|
|
- item['rule_type'] = 'Specific Rule';
|
|
|
|
|
- updatePriorities();
|
|
|
|
|
|
|
+ item['rule_type'] = 'Specific Rule'
|
|
|
|
|
+ updatePriorities()
|
|
|
}
|
|
}
|
|
|
} else if (item['mode_type'] === 'sea') {
|
|
} else if (item['mode_type'] === 'sea') {
|
|
|
// Sea 规则:检查 ports 和 carrier
|
|
// Sea 规则:检查 ports 和 carrier
|
|
|
- const portsSelected = item.ports && item.ports.length > 0 && !item.ports.includes('ALL');
|
|
|
|
|
- const carrierSelected = item.carrier && item.carrier.length > 0 && !item.carrier.includes('ALL');
|
|
|
|
|
-
|
|
|
|
|
|
|
+ const portsSelected = item.ports && item.ports.length > 0 && !item.ports.includes('ALL')
|
|
|
|
|
+ const carrierSelected =
|
|
|
|
|
+ item.carrier && item.carrier.length > 0 && !item.carrier.includes('ALL')
|
|
|
|
|
+
|
|
|
if (portsSelected && carrierSelected) {
|
|
if (portsSelected && carrierSelected) {
|
|
|
- item['rule_type'] = 'Specific Rule';
|
|
|
|
|
- updatePriorities();
|
|
|
|
|
|
|
+ item['rule_type'] = 'Specific Rule'
|
|
|
|
|
+ updatePriorities()
|
|
|
} else {
|
|
} else {
|
|
|
- item['rule_type'] = 'Single Dimension';
|
|
|
|
|
- updatePriorities();
|
|
|
|
|
|
|
+ item['rule_type'] = 'Single Dimension'
|
|
|
|
|
+ updatePriorities()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -387,32 +417,53 @@ const changeRuleType = (val: string, index: number, list: RuleItem[]) => {
|
|
|
<el-checkbox-group v-model="RecommendCheckedList" @change="CheckChange">
|
|
<el-checkbox-group v-model="RecommendCheckedList" @change="CheckChange">
|
|
|
<!-- Air 部分 -->
|
|
<!-- Air 部分 -->
|
|
|
<el-checkbox class="delayedType" value="Air" @click="handleCheckboxClick">
|
|
<el-checkbox class="delayedType" value="Air" @click="handleCheckboxClick">
|
|
|
- <div class="titlecheckbox">
|
|
|
|
|
|
|
+ <div class="titlecheckbox clickable-area">
|
|
|
<div>Air</div>
|
|
<div>Air</div>
|
|
|
- <span class="icon_grey font_family" :class="isAir ? 'icon-icon_dropdown_b' : 'icon-icon_up_b'"></span>
|
|
|
|
|
|
|
+ <span
|
|
|
|
|
+ class="icon_grey font_family"
|
|
|
|
|
+ :class="isAir ? 'icon-icon_dropdown_b' : 'icon-icon_up_b'"
|
|
|
|
|
+ ></span>
|
|
|
</div>
|
|
</div>
|
|
|
- <div v-if="isAir" class="radiocheckbox" style="margin-top: 16px">
|
|
|
|
|
|
|
+ <div v-if="isAir" class="radiocheckbox" style="margin-top: 16px; padding-left: 8px">
|
|
|
<div class="AirCoulumn">
|
|
<div class="AirCoulumn">
|
|
|
- <div class="AicoulumnTitile" style="width: 10%;">priority</div>
|
|
|
|
|
- <div class="AicoulumnTitile" style="width: 20%;">Rule Type</div>
|
|
|
|
|
- <div class="AicoulumnTitile" style="width: 40%;">Air Port</div>
|
|
|
|
|
- <div style="display: flex;flex-direction: column;border-right: 1px solid var(--color-system-border);width: 20%;">
|
|
|
|
|
|
|
+ <div class="AicoulumnTitile" style="width: 10%">priority</div>
|
|
|
|
|
+ <div class="AicoulumnTitile" style="width: 20%">Rule Type</div>
|
|
|
|
|
+ <div class="AicoulumnTitile" style="width: 40%">Air Port</div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ style="
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ border-right: 1px solid var(--color-system-border);
|
|
|
|
|
+ width: 20%;
|
|
|
|
|
+ "
|
|
|
|
|
+ >
|
|
|
<div class="AicoulumnTitile2">Recommended Delivery Date</div>
|
|
<div class="AicoulumnTitile2">Recommended Delivery Date</div>
|
|
|
- <div style="display: flex;height: 24px;align-items: center;">
|
|
|
|
|
- <div class="datetitle" style="border-right: 1px solid var(--color-system-border);">From (ETA/ATA + Days)</div>
|
|
|
|
|
|
|
+ <div style="display: flex; height: 24px; align-items: center">
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="datetitle"
|
|
|
|
|
+ style="border-right: 1px solid var(--color-system-border)"
|
|
|
|
|
+ >
|
|
|
|
|
+ From (ETA/ATA + Days)
|
|
|
|
|
+ </div>
|
|
|
<div class="datetitle">To (ETA/ATA + Days)</div>
|
|
<div class="datetitle">To (ETA/ATA + Days)</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="AirCoumlulnAdd" style="width: 10%;" @click="AddRuleItem(AirContentList, 'Air')">+ Add</div>
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="AirCoumlulnAdd"
|
|
|
|
|
+ style="width: 10%"
|
|
|
|
|
+ @click="AddRuleItem(AirContentList, 'Air')"
|
|
|
|
|
+ >
|
|
|
|
|
+ + Add
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="AirContent" v-for="(item, index) in AirContentList" :key="index">
|
|
<div class="AirContent" v-for="(item, index) in AirContentList" :key="index">
|
|
|
- <div class="AirCoumlumn" style="width: 10%;">{{ item.priority }}</div>
|
|
|
|
|
- <div class="AirCoumlumn" style="width: 20%;">
|
|
|
|
|
|
|
+ <div class="AirCoumlumn" style="width: 10%">{{ item.priority }}</div>
|
|
|
|
|
+ <div class="AirCoumlumn" style="width: 20%">
|
|
|
<el-select
|
|
<el-select
|
|
|
v-model="item.rule_type"
|
|
v-model="item.rule_type"
|
|
|
disabled
|
|
disabled
|
|
|
- style="width: 100%;"
|
|
|
|
|
- @change="val => changeRuleType(val, index, AirContentList)"
|
|
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ @change="(val) => changeRuleType(val, index, AirContentList)"
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="opt in AirRuleTypeoptions"
|
|
v-for="opt in AirRuleTypeoptions"
|
|
@@ -422,35 +473,42 @@ const changeRuleType = (val: string, index: number, list: RuleItem[]) => {
|
|
|
/>
|
|
/>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="AirCoumlumn" style="width: 40%;">
|
|
|
|
|
|
|
+ <div class="AirCoumlumn" style="width: 40%">
|
|
|
<SelectValue
|
|
<SelectValue
|
|
|
ref="AirPortRef"
|
|
ref="AirPortRef"
|
|
|
:SelectIndex="index"
|
|
:SelectIndex="index"
|
|
|
:SelectedValue="item.ports"
|
|
:SelectedValue="item.ports"
|
|
|
:typeisDisabled="item.rule_type"
|
|
:typeisDisabled="item.rule_type"
|
|
|
SelectType="air"
|
|
SelectType="air"
|
|
|
- @changeSelectedValue="val => changeSelectedValue(val, index, 'ports', AirContentList)"
|
|
|
|
|
|
|
+ @changeSelectedValue="
|
|
|
|
|
+ (val) => changeSelectedValue(val, index, 'ports', AirContentList)
|
|
|
|
|
+ "
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="AirCoumlumn" style="width: 10%;">
|
|
|
|
|
- <el-input
|
|
|
|
|
- @input="val => handleInput(val, index, 'recommended_delivery_from', AirContentList)"
|
|
|
|
|
- placeholder="Input"
|
|
|
|
|
|
|
+ <div class="AirCoumlumn" style="width: 10%">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ @input="
|
|
|
|
|
+ (val) =>
|
|
|
|
|
+ handleInput(val, index, 'recommended_delivery_from', AirContentList)
|
|
|
|
|
+ "
|
|
|
|
|
+ placeholder="Input"
|
|
|
v-model="item.recommended_delivery_from"
|
|
v-model="item.recommended_delivery_from"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="AirCoumlumn" style="width: 10%;">
|
|
|
|
|
- <el-input
|
|
|
|
|
- @input="val => handleInput(val, index, 'recommended_delivery_to', AirContentList)"
|
|
|
|
|
- placeholder="Input"
|
|
|
|
|
|
|
+ <div class="AirCoumlumn" style="width: 10%">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ @input="
|
|
|
|
|
+ (val) => handleInput(val, index, 'recommended_delivery_to', AirContentList)
|
|
|
|
|
+ "
|
|
|
|
|
+ placeholder="Input"
|
|
|
v-model="item.recommended_delivery_to"
|
|
v-model="item.recommended_delivery_to"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="AirDelete" style="width: 10%;">
|
|
|
|
|
- <el-button
|
|
|
|
|
- v-if="item.rule_type !== '*Default Rule'"
|
|
|
|
|
- @click="handleDelete(index, AirContentList, 'Air')"
|
|
|
|
|
- class="el-button--blue"
|
|
|
|
|
|
|
+ <div class="AirDelete" style="width: 10%">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="item.rule_type !== '*Default Rule'"
|
|
|
|
|
+ @click="handleDelete(index, AirContentList, 'Air')"
|
|
|
|
|
+ class="el-button--blue"
|
|
|
style="height: 24px"
|
|
style="height: 24px"
|
|
|
>
|
|
>
|
|
|
<span class="font_family icon-icon_delete_b"></span>
|
|
<span class="font_family icon-icon_delete_b"></span>
|
|
@@ -461,33 +519,54 @@ const changeRuleType = (val: string, index: number, list: RuleItem[]) => {
|
|
|
</el-checkbox>
|
|
</el-checkbox>
|
|
|
<!-- Sea 部分 -->
|
|
<!-- Sea 部分 -->
|
|
|
<el-checkbox class="delayedType" value="Sea" @click="handleCheckboxClick">
|
|
<el-checkbox class="delayedType" value="Sea" @click="handleCheckboxClick">
|
|
|
- <div class="titlecheckbox">
|
|
|
|
|
|
|
+ <div class="titlecheckbox clickable-area">
|
|
|
<div>Sea</div>
|
|
<div>Sea</div>
|
|
|
- <span class="icon_grey font_family" :class="isSea ? 'icon-icon_dropdown_b' : 'icon-icon_up_b'"></span>
|
|
|
|
|
|
|
+ <span
|
|
|
|
|
+ class="icon_grey font_family"
|
|
|
|
|
+ :class="isSea ? 'icon-icon_dropdown_b' : 'icon-icon_up_b'"
|
|
|
|
|
+ ></span>
|
|
|
</div>
|
|
</div>
|
|
|
- <div v-if="isSea" style="margin-top: 16px">
|
|
|
|
|
|
|
+ <div v-if="isSea" style="margin-top: 16px; padding-left: 8px">
|
|
|
<div class="AirCoulumn">
|
|
<div class="AirCoulumn">
|
|
|
- <div class="AicoulumnTitile" style="width: 10%;">priority</div>
|
|
|
|
|
- <div class="AicoulumnTitile" style="width: 14%;">Rule Type</div>
|
|
|
|
|
- <div class="AicoulumnTitile" style="width: 23%;">Port</div>
|
|
|
|
|
- <div class="AicoulumnTitile" style="width: 23%;">Carrier</div>
|
|
|
|
|
- <div style="display: flex;flex-direction: column;border-right: 1px solid var(--color-system-border);width: 20%;">
|
|
|
|
|
|
|
+ <div class="AicoulumnTitile" style="width: 10%">priority</div>
|
|
|
|
|
+ <div class="AicoulumnTitile" style="width: 14%">Rule Type</div>
|
|
|
|
|
+ <div class="AicoulumnTitile" style="width: 23%">Port</div>
|
|
|
|
|
+ <div class="AicoulumnTitile" style="width: 23%">Carrier</div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ style="
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ border-right: 1px solid var(--color-system-border);
|
|
|
|
|
+ width: 20%;
|
|
|
|
|
+ "
|
|
|
|
|
+ >
|
|
|
<div class="AicoulumnTitile2">Recommended Delivery Date</div>
|
|
<div class="AicoulumnTitile2">Recommended Delivery Date</div>
|
|
|
- <div style="display: flex;height: 24px;align-items: center;">
|
|
|
|
|
- <div class="datetitle" style="border-right: 1px solid var(--color-system-border);">From (ETA/ATA + Days)</div>
|
|
|
|
|
|
|
+ <div style="display: flex; height: 24px; align-items: center">
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="datetitle"
|
|
|
|
|
+ style="border-right: 1px solid var(--color-system-border)"
|
|
|
|
|
+ >
|
|
|
|
|
+ From (ETA/ATA + Days)
|
|
|
|
|
+ </div>
|
|
|
<div class="datetitle">To (ETA/ATA + Days)</div>
|
|
<div class="datetitle">To (ETA/ATA + Days)</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="AirCoumlulnAdd" style="width: 10%;" @click="AddRuleItem(SeaContentList, 'Sea')">+ Add</div>
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="AirCoumlulnAdd"
|
|
|
|
|
+ style="width: 10%"
|
|
|
|
|
+ @click="AddRuleItem(SeaContentList, 'Sea')"
|
|
|
|
|
+ >
|
|
|
|
|
+ + Add
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="AirContent" v-for="(item, index) in SeaContentList" :key="index">
|
|
<div class="AirContent" v-for="(item, index) in SeaContentList" :key="index">
|
|
|
- <div class="AirCoumlumn" style="width: 10%;">{{ item.priority }}</div>
|
|
|
|
|
- <div class="AirCoumlumn" style="width: 14%;">
|
|
|
|
|
|
|
+ <div class="AirCoumlumn" style="width: 10%">{{ item.priority }}</div>
|
|
|
|
|
+ <div class="AirCoumlumn" style="width: 14%">
|
|
|
<el-select
|
|
<el-select
|
|
|
v-model="item.rule_type"
|
|
v-model="item.rule_type"
|
|
|
disabled
|
|
disabled
|
|
|
- style="width: 100%;"
|
|
|
|
|
- @change="val => changeRuleType(val, index, SeaContentList)"
|
|
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ @change="(val) => changeRuleType(val, index, SeaContentList)"
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="opt in RuleTypeoptions"
|
|
v-for="opt in RuleTypeoptions"
|
|
@@ -497,45 +576,54 @@ const changeRuleType = (val: string, index: number, list: RuleItem[]) => {
|
|
|
/>
|
|
/>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="AirCoumlumn" style="width: 23%;">
|
|
|
|
|
|
|
+ <div class="AirCoumlumn" style="width: 23%">
|
|
|
<SelectValue
|
|
<SelectValue
|
|
|
ref="SeaPortRef"
|
|
ref="SeaPortRef"
|
|
|
:SelectIndex="index"
|
|
:SelectIndex="index"
|
|
|
:SelectedValue="item.ports"
|
|
:SelectedValue="item.ports"
|
|
|
:typeisDisabled="item.rule_type"
|
|
:typeisDisabled="item.rule_type"
|
|
|
SelectType="sea"
|
|
SelectType="sea"
|
|
|
- @changeSelectedValue="val => changeSelectedValue(val, index, 'ports', SeaContentList)"
|
|
|
|
|
|
|
+ @changeSelectedValue="
|
|
|
|
|
+ (val) => changeSelectedValue(val, index, 'ports', SeaContentList)
|
|
|
|
|
+ "
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="AirCoumlumn" style="width: 23%;">
|
|
|
|
|
|
|
+ <div class="AirCoumlumn" style="width: 23%">
|
|
|
<SelectValue
|
|
<SelectValue
|
|
|
ref="SeaCarrierRef"
|
|
ref="SeaCarrierRef"
|
|
|
:SelectIndex="index"
|
|
:SelectIndex="index"
|
|
|
:SelectedValue="item.carrier"
|
|
:SelectedValue="item.carrier"
|
|
|
:typeisDisabled="item.rule_type"
|
|
:typeisDisabled="item.rule_type"
|
|
|
SelectType="carrier"
|
|
SelectType="carrier"
|
|
|
- @changeSelectedValue="val => changeSelectedValue(val, index, 'carrier', SeaContentList)"
|
|
|
|
|
|
|
+ @changeSelectedValue="
|
|
|
|
|
+ (val) => changeSelectedValue(val, index, 'carrier', SeaContentList)
|
|
|
|
|
+ "
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="AirCoumlumn" style="width: 10%;">
|
|
|
|
|
- <el-input
|
|
|
|
|
- @input="val => handleInput(val, index, 'recommended_delivery_from', SeaContentList)"
|
|
|
|
|
- placeholder="Input"
|
|
|
|
|
|
|
+ <div class="AirCoumlumn" style="width: 10%">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ @input="
|
|
|
|
|
+ (val) =>
|
|
|
|
|
+ handleInput(val, index, 'recommended_delivery_from', SeaContentList)
|
|
|
|
|
+ "
|
|
|
|
|
+ placeholder="Input"
|
|
|
v-model="item.recommended_delivery_from"
|
|
v-model="item.recommended_delivery_from"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="AirCoumlumn" style="width: 10%;">
|
|
|
|
|
- <el-input
|
|
|
|
|
- @input="val => handleInput(val, index, 'recommended_delivery_to', SeaContentList)"
|
|
|
|
|
- placeholder="Input"
|
|
|
|
|
|
|
+ <div class="AirCoumlumn" style="width: 10%">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ @input="
|
|
|
|
|
+ (val) => handleInput(val, index, 'recommended_delivery_to', SeaContentList)
|
|
|
|
|
+ "
|
|
|
|
|
+ placeholder="Input"
|
|
|
v-model="item.recommended_delivery_to"
|
|
v-model="item.recommended_delivery_to"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="AirDelete" style="width: 10%;">
|
|
|
|
|
- <el-button
|
|
|
|
|
- v-if="item.rule_type !== '*Default Rule'"
|
|
|
|
|
- @click="handleDelete(index, SeaContentList, 'Sea')"
|
|
|
|
|
- class="el-button--blue"
|
|
|
|
|
|
|
+ <div class="AirDelete" style="width: 10%">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="item.rule_type !== '*Default Rule'"
|
|
|
|
|
+ @click="handleDelete(index, SeaContentList, 'Sea')"
|
|
|
|
|
+ class="el-button--blue"
|
|
|
style="height: 24px"
|
|
style="height: 24px"
|
|
|
>
|
|
>
|
|
|
<span class="font_family icon-icon_delete_b"></span>
|
|
<span class="font_family icon-icon_delete_b"></span>
|
|
@@ -571,7 +659,7 @@ const changeRuleType = (val: string, index: number, list: RuleItem[]) => {
|
|
|
:deep(.el-radio__input.is-checked + .el-radio__label) {
|
|
:deep(.el-radio__input.is-checked + .el-radio__label) {
|
|
|
color: var(--color-neutral-1);
|
|
color: var(--color-neutral-1);
|
|
|
}
|
|
}
|
|
|
-:deep( .el-radio__inner) {
|
|
|
|
|
|
|
+:deep(.el-radio__inner) {
|
|
|
border: 1px solid var(--color-system-checkbox-border);
|
|
border: 1px solid var(--color-system-checkbox-border);
|
|
|
}
|
|
}
|
|
|
:deep(.el-radio__inner) {
|
|
:deep(.el-radio__inner) {
|
|
@@ -583,13 +671,17 @@ const changeRuleType = (val: string, index: number, list: RuleItem[]) => {
|
|
|
}
|
|
}
|
|
|
.oceanCheckbox {
|
|
.oceanCheckbox {
|
|
|
margin-bottom: 8px;
|
|
margin-bottom: 8px;
|
|
|
|
|
+ :deep(.el-checkbox__input) {
|
|
|
|
|
+ padding: 4px;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
.delayedType {
|
|
.delayedType {
|
|
|
align-items: start;
|
|
align-items: start;
|
|
|
height: fit-content;
|
|
height: fit-content;
|
|
|
margin-right: 5px;
|
|
margin-right: 5px;
|
|
|
border-radius: 6px;
|
|
border-radius: 6px;
|
|
|
- padding: 13px;
|
|
|
|
|
|
|
+ padding: 8px;
|
|
|
|
|
+ padding-left: 4px;
|
|
|
}
|
|
}
|
|
|
:deep(.el-checkbox) {
|
|
:deep(.el-checkbox) {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
@@ -599,11 +691,14 @@ const changeRuleType = (val: string, index: number, list: RuleItem[]) => {
|
|
|
}
|
|
}
|
|
|
:deep(.el-checkbox__label) {
|
|
:deep(.el-checkbox__label) {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
|
|
+ padding-left: 0px;
|
|
|
}
|
|
}
|
|
|
.titlecheckbox {
|
|
.titlecheckbox {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
|
|
|
+ padding-left: 4px;
|
|
|
|
|
+ padding-top: 4px;
|
|
|
}
|
|
}
|
|
|
.icon_grey {
|
|
.icon_grey {
|
|
|
color: #b8bbbf;
|
|
color: #b8bbbf;
|
|
@@ -674,4 +769,4 @@ const changeRuleType = (val: string, index: number, list: RuleItem[]) => {
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
}
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>
|