|
|
@@ -44,6 +44,8 @@ const IsTwoActive = ref(true)
|
|
|
const IsThreeActive = ref(true)
|
|
|
const IsFourActive = ref(true)
|
|
|
const UnableSaveVisible = ref(false)
|
|
|
+const SaveVisibleError = ref(false)
|
|
|
+const SaveVisibleDetected = ref(false)
|
|
|
const SaveedVisible = ref(false)
|
|
|
const DelayedDeparturedList = ref()
|
|
|
const DelayedAirdList = ref()
|
|
|
@@ -85,9 +87,11 @@ onMounted(() => {
|
|
|
Initdata()
|
|
|
})
|
|
|
// 初始赋值
|
|
|
+const editTableidtwo = ref('')
|
|
|
const Initdata = () => {
|
|
|
if (sessionStorage.getItem('editTableid') != null) {
|
|
|
const editTableid = sessionStorage.getItem('editTableid')
|
|
|
+ editTableidtwo.value = sessionStorage.getItem('editTableid')
|
|
|
const editTablerules_type = sessionStorage.getItem('editTablerules_type')
|
|
|
$api
|
|
|
.EditMonitoringTable({
|
|
|
@@ -529,19 +533,50 @@ const missingmessage = ref('')
|
|
|
const SaveSuceessful = () => {
|
|
|
$api
|
|
|
.MonitoringSave({
|
|
|
- ...savesubscribeobj
|
|
|
+ ...savesubscribeobj,
|
|
|
+ is_similar_rule: false,
|
|
|
+ id: editTableidtwo.value
|
|
|
})
|
|
|
.then((res: any) => {
|
|
|
if (res.code === 200) {
|
|
|
- SaveedVisible.value = true
|
|
|
- setTimeout(() => {
|
|
|
- SaveedVisible.value = false
|
|
|
- sessionStorage.setItem('activeTab', 'Monitoring Settings')
|
|
|
- router.push({
|
|
|
- path: '/SystemSettings',
|
|
|
- query: {}
|
|
|
- })
|
|
|
- }, 3000)
|
|
|
+ console.log(res.data)
|
|
|
+ if(res.data.msg == 'Update Successful') {
|
|
|
+ SaveedVisible.value = true
|
|
|
+ setTimeout(() => {
|
|
|
+ SaveedVisible.value = false
|
|
|
+ sessionStorage.setItem('activeTab', 'Monitoring Settings')
|
|
|
+ router.push({
|
|
|
+ path: '/SystemSettings',
|
|
|
+ query: {}
|
|
|
+ })
|
|
|
+ }, 3000)
|
|
|
+ } else if(res.data.msg == 'Similar Rule Detected') {
|
|
|
+ SaveVisibleDetected.value = true
|
|
|
+ } else if(res.data.msg == 'Unable to Save')
|
|
|
+ SaveVisibleError.value = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+const HandelSaveVisibleDetected = () => {
|
|
|
+ SaveVisibleDetected.value = false
|
|
|
+ $api
|
|
|
+ .MonitoringSave({
|
|
|
+ ...savesubscribeobj,
|
|
|
+ is_similar_rule: true,
|
|
|
+ id: editTableidtwo.value
|
|
|
+ })
|
|
|
+ .then((res: any) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ SaveedVisible.value = true
|
|
|
+ setTimeout(() => {
|
|
|
+ SaveedVisible.value = false
|
|
|
+ sessionStorage.setItem('activeTab', 'Monitoring Settings')
|
|
|
+ router.push({
|
|
|
+ path: '/SystemSettings',
|
|
|
+ query: {}
|
|
|
+ })
|
|
|
+ }, 3000)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
@@ -718,7 +753,7 @@ defineExpose({
|
|
|
<el-collapse-item name="ShipmentRange">
|
|
|
<template #title>
|
|
|
<div class="Rules_Title">
|
|
|
- <span class="iconfont_icon">
|
|
|
+ <span class="iconfont_icon icon_dark">
|
|
|
<svg class="iconfont" aria-hidden="true">
|
|
|
<use
|
|
|
:xlink:href="IsFourActive ? '#icon-icon_dropdown_b' : '#icon-icon_up_b'"
|
|
|
@@ -768,7 +803,7 @@ defineExpose({
|
|
|
<el-collapse-item name="SelectMilestone">
|
|
|
<template #title>
|
|
|
<div class="Rules_Title">
|
|
|
- <span class="iconfont_icon">
|
|
|
+ <span class="iconfont_icon icon_dark">
|
|
|
<svg class="iconfont" aria-hidden="true">
|
|
|
<use
|
|
|
:xlink:href="IsFirstActive ? '#icon-icon_dropdown_b' : '#icon-icon_up_b'"
|
|
|
@@ -804,7 +839,7 @@ defineExpose({
|
|
|
<el-collapse-item name="SelectMilestone">
|
|
|
<template #title>
|
|
|
<div class="Rules_Title">
|
|
|
- <span class="iconfont_icon">
|
|
|
+ <span class="iconfont_icon icon_dark">
|
|
|
<svg class="iconfont" aria-hidden="true">
|
|
|
<use
|
|
|
:xlink:href="IsFirstActive ? '#icon-icon_dropdown_b' : '#icon-icon_up_b'"
|
|
|
@@ -832,7 +867,7 @@ defineExpose({
|
|
|
<el-collapse-item name="SelectMilestone">
|
|
|
<template #title>
|
|
|
<div class="Rules_Title">
|
|
|
- <span class="iconfont_icon">
|
|
|
+ <span class="iconfont_icon icon_dark">
|
|
|
<svg class="iconfont" aria-hidden="true">
|
|
|
<use
|
|
|
:xlink:href="IsFirstActive ? '#icon-icon_dropdown_b' : '#icon-icon_up_b'"
|
|
|
@@ -868,7 +903,7 @@ defineExpose({
|
|
|
<el-collapse-item name="SelectMilestone">
|
|
|
<template #title>
|
|
|
<div class="Rules_Title">
|
|
|
- <span class="iconfont_icon">
|
|
|
+ <span class="iconfont_icon icon_dark">
|
|
|
<svg class="iconfont" aria-hidden="true">
|
|
|
<use
|
|
|
:xlink:href="IsFirstActive ? '#icon-icon_dropdown_b' : '#icon-icon_up_b'"
|
|
|
@@ -904,7 +939,7 @@ defineExpose({
|
|
|
<el-collapse-item name="NotificationFrequency">
|
|
|
<template #title>
|
|
|
<div class="Rules_Title">
|
|
|
- <span class="iconfont_icon">
|
|
|
+ <span class="iconfont_icon icon_dark">
|
|
|
<svg class="iconfont" aria-hidden="true">
|
|
|
<use
|
|
|
:xlink:href="IsTwoActive ? '#icon-icon_dropdown_b' : '#icon-icon_up_b'"
|
|
|
@@ -948,7 +983,7 @@ defineExpose({
|
|
|
<el-collapse-item name="NotificationMethod">
|
|
|
<template #title>
|
|
|
<div class="Rules_Title">
|
|
|
- <span class="iconfont_icon">
|
|
|
+ <span class="iconfont_icon icon_dark">
|
|
|
<svg class="iconfont" aria-hidden="true">
|
|
|
<use
|
|
|
:xlink:href="IsThreeActive ? '#icon-icon_dropdown_b' : '#icon-icon_up_b'"
|
|
|
@@ -1123,6 +1158,65 @@ defineExpose({
|
|
|
<div style="text-align: center"><el-image :src="submitsucessful" /></div>
|
|
|
<div style="text-align: center; margin-top: 20px">Saved successfully</div>
|
|
|
</el-dialog>
|
|
|
+ <!-- 保存失败 -->
|
|
|
+ <el-dialog v-model="SaveVisibleError" width="480">
|
|
|
+ <div>Duplicate Rule Error.</div>
|
|
|
+ <div>This rule exactly matches an existing rule.</div>
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button
|
|
|
+ class="el-button--danger"
|
|
|
+ @click="SaveVisibleError = false"
|
|
|
+ style="width: 100px"
|
|
|
+ >
|
|
|
+ OK
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #header>
|
|
|
+ <div class="cancel_header">
|
|
|
+ <span class="iconfont_icon iconfont_warning">
|
|
|
+ <svg class="iconfont icon_danger" aria-hidden="true">
|
|
|
+ <use xlink:href="#icon-icon_fail_fill_b"></use>
|
|
|
+ </svg>
|
|
|
+ </span>
|
|
|
+ Unable to Save
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- 三项重合提示 -->
|
|
|
+ <el-dialog v-model="SaveVisibleDetected" width="480">
|
|
|
+ <div>A similar configuration rule already exists.</div>
|
|
|
+ <div>Would you like to proceed with creating this rule?</div>
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button
|
|
|
+ class="el-button--default"
|
|
|
+ @click="SaveVisibleDetected = false"
|
|
|
+ style="width: 100px"
|
|
|
+ >
|
|
|
+ Cancel
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ class="el-button--warning"
|
|
|
+ @click="HandelSaveVisibleDetected"
|
|
|
+ style="width: 100px"
|
|
|
+ >
|
|
|
+ Save
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #header>
|
|
|
+ <div class="cancel_header">
|
|
|
+ <span class="iconfont_icon iconfont_warning">
|
|
|
+ <svg class="iconfont icon_warning" aria-hidden="true">
|
|
|
+ <use xlink:href="#icon-icon_tipsfilled_b"></use>
|
|
|
+ </svg>
|
|
|
+ </span>
|
|
|
+ Similar Rule Detected
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
</template>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
@@ -1172,7 +1266,7 @@ defineExpose({
|
|
|
padding: 0 !important;
|
|
|
}
|
|
|
:deep(.el-collapse-item__header):hover {
|
|
|
- background-color: #fff !important;
|
|
|
+ background-color: var(--color-system-color-bg) !important;
|
|
|
border: none !important;
|
|
|
}
|
|
|
:deep(.el-collapse-item__arrow) {
|
|
|
@@ -1198,26 +1292,26 @@ defineExpose({
|
|
|
transform: rotate(0);
|
|
|
}
|
|
|
:deep(.Ocean_collapse .el-collapse-item__header) {
|
|
|
- background-color: #fff !important;
|
|
|
+ background-color: var(--color-system-color-bg) !important;
|
|
|
padding: 0 8px !important;
|
|
|
height: 40px !important;
|
|
|
}
|
|
|
:deep(.Ocean_collapse .el-collapse-item) {
|
|
|
- background-color: var(--color-dialog-header-bg);
|
|
|
+ background-color: var(--color-system-color-bg);
|
|
|
border-radius: 12px;
|
|
|
}
|
|
|
:deep(.Ocean_collapse .el-collapse-item__wrap) {
|
|
|
padding: 0 8px !important;
|
|
|
}
|
|
|
:deep(.Ocean_collapse .el-collapse-item__header.is-active) {
|
|
|
- background-color: var(--color-dialog-header-bg) !important;
|
|
|
+ background-color: var(--color-system-color-bg) !important;
|
|
|
}
|
|
|
:deep(.el-checkbox__input.is-checked + .el-checkbox__label) {
|
|
|
color: var(--color-neutral-1);
|
|
|
}
|
|
|
.Rules_buttom {
|
|
|
padding: 8px;
|
|
|
- border-top: 1px solid var(--color-border-1);
|
|
|
+ border-top: 1px solid var(--color-system-border-1);
|
|
|
}
|
|
|
.rules_button {
|
|
|
width: 100px;
|
|
|
@@ -1241,7 +1335,7 @@ defineExpose({
|
|
|
align-items: center;
|
|
|
}
|
|
|
:deep(header.el-dialog__header) {
|
|
|
- background-color: #fff;
|
|
|
+ background-color: var(--color-system-body-bg);
|
|
|
}
|
|
|
:deep(footer.el-dialog__footer) {
|
|
|
border-top: none;
|
|
|
@@ -1249,24 +1343,4 @@ defineExpose({
|
|
|
:deep(.el-collapse) {
|
|
|
margin-right: 8px;
|
|
|
}
|
|
|
-
|
|
|
-:deep(.el-radio-group) {
|
|
|
- display: block;
|
|
|
-}
|
|
|
-:deep(.el-radio) {
|
|
|
- display: flex;
|
|
|
- min-height: 32px;
|
|
|
- border: 1px solid var(--color-select-border);
|
|
|
- margin-bottom: 4px;
|
|
|
- border-radius: 6px;
|
|
|
- padding: 0 8px;
|
|
|
- margin-right: 0;
|
|
|
- height: fit-content;
|
|
|
- line-height: 32px;
|
|
|
- align-items: start;
|
|
|
- align-items: start;
|
|
|
-}
|
|
|
-:deep(.el-radio__input.is-checked + .el-radio__label) {
|
|
|
- color: var(--color-neutral-1);
|
|
|
-}
|
|
|
</style>
|