|
|
@@ -754,8 +754,7 @@ const handleRefresh = async () => {
|
|
|
}
|
|
|
|
|
|
const handleSuspendAll = async (confId) => {
|
|
|
- try {
|
|
|
- await ElMessageBox.confirm(
|
|
|
+ ElMessageBox.confirm(
|
|
|
`确定要暂停配置"${confDetail.value.name}"的全部计划吗?`,
|
|
|
'提示',
|
|
|
{
|
|
|
@@ -763,31 +762,27 @@ const handleSuspendAll = async (confId) => {
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}
|
|
|
- )
|
|
|
- const res = await suspendByConfId(confId)
|
|
|
- if (res.success) {
|
|
|
- ElMessage.success(res.msg || '暂停中。。。')
|
|
|
- handleRefresh()
|
|
|
- } else {
|
|
|
- ElMessage.error(res.msg || '暂停中。。。')
|
|
|
- }
|
|
|
- } catch (error) {
|
|
|
- console.error('全部暂停失败:', error)
|
|
|
- ElMessage.error('全部暂停失败')
|
|
|
- }
|
|
|
+ ).then(async () => {
|
|
|
+ const res = await suspendByConfId(confId)
|
|
|
+ if (res.success) {
|
|
|
+ ElMessage.success(res.msg || '暂停中。。。')
|
|
|
+ handleRefresh()
|
|
|
+ } else {
|
|
|
+ ElMessage.error(res.msg || '暂停中。。。')
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
-const handleDeleteAll = async (confId) => {
|
|
|
- try {
|
|
|
- await ElMessageBox.confirm(
|
|
|
- `确定要删除配置"${confDetail.value.name}"的全部计划吗?`,
|
|
|
- '提示',
|
|
|
- {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }
|
|
|
- )
|
|
|
+const handleDeleteAll = (confId) => {
|
|
|
+ ElMessageBox.confirm(
|
|
|
+ `确定要删除配置"${confDetail.value.name}"的全部计划吗?`,
|
|
|
+ '提示',
|
|
|
+ {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }
|
|
|
+ ).then(async () => {
|
|
|
const res = await deleteByConfId(confId)
|
|
|
if (res.success) {
|
|
|
ElMessage.success(res.msg || '删除中。。。')
|
|
|
@@ -795,23 +790,19 @@ const handleDeleteAll = async (confId) => {
|
|
|
} else {
|
|
|
ElMessage.error(res.msg || '删除中。。。')
|
|
|
}
|
|
|
- } catch (error) {
|
|
|
- console.error('全部删除失败:', error)
|
|
|
- ElMessage.error('全部删除失败')
|
|
|
- }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
-const handleSuspendPlans = async (confId) => {
|
|
|
- try {
|
|
|
- await ElMessageBox.confirm(
|
|
|
- `确定要暂停配置"${confDetail.value.name}"的选中的计划吗?`,
|
|
|
- '提示',
|
|
|
- {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }
|
|
|
- )
|
|
|
+const handleSuspendPlans = (confId) => {
|
|
|
+ ElMessageBox.confirm(
|
|
|
+ `确定要暂停配置"${confDetail.value.name}"的选中的计划吗?`,
|
|
|
+ '提示',
|
|
|
+ {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }
|
|
|
+ ).then(async () => {
|
|
|
if (selectedRows.value.length < 1) {
|
|
|
return
|
|
|
}
|
|
|
@@ -822,23 +813,19 @@ const handleSuspendPlans = async (confId) => {
|
|
|
} else {
|
|
|
ElMessage.error(res.msg || '暂停中。。。')
|
|
|
}
|
|
|
- } catch (error) {
|
|
|
- console.error('暂停失败:', error)
|
|
|
- ElMessage.error('暂停失败')
|
|
|
- }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
-const handleDeletePlans = async (confId) => {
|
|
|
- try {
|
|
|
- await ElMessageBox.confirm(
|
|
|
- `确定要删除配置"${confDetail.value.name}"的选中的计划吗?`,
|
|
|
- '提示',
|
|
|
- {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }
|
|
|
- )
|
|
|
+const handleDeletePlans = (confId) => {
|
|
|
+ ElMessageBox.confirm(
|
|
|
+ `确定要删除配置"${confDetail.value.name}"的选中的计划吗?`,
|
|
|
+ '提示',
|
|
|
+ {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }
|
|
|
+ ).then(async () => {
|
|
|
if (selectedRows.value.length < 1) {
|
|
|
return
|
|
|
}
|
|
|
@@ -849,23 +836,19 @@ const handleDeletePlans = async (confId) => {
|
|
|
} else {
|
|
|
ElMessage.error(res.msg || '删除中。。。')
|
|
|
}
|
|
|
- } catch (error) {
|
|
|
- console.error('删除失败:', error)
|
|
|
- ElMessage.error('删除失败')
|
|
|
- }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
-const handleSystemStatusSync = async (confId) => {
|
|
|
- try {
|
|
|
- await ElMessageBox.confirm(
|
|
|
- `确定要同步"${confDetail.value.name}"的全部计划的广告平台状态吗?`,
|
|
|
- '提示',
|
|
|
- {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }
|
|
|
- )
|
|
|
+const handleSystemStatusSync = (confId) => {
|
|
|
+ ElMessageBox.confirm(
|
|
|
+ `确定要同步"${confDetail.value.name}"的全部计划的广告平台状态吗?`,
|
|
|
+ '提示',
|
|
|
+ {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }
|
|
|
+ ).then(async () => {
|
|
|
const res = await syncSystemStatus(confId)
|
|
|
if (res.success) {
|
|
|
ElMessage.success(res.msg || '同步平台状态中。。。')
|
|
|
@@ -873,10 +856,7 @@ const handleSystemStatusSync = async (confId) => {
|
|
|
} else {
|
|
|
ElMessage.error(res.msg || '同步平台状态失败')
|
|
|
}
|
|
|
- } catch (error) {
|
|
|
- console.error('同步平台状态失败:', error)
|
|
|
- ElMessage.error('同步平台状态失败')
|
|
|
- }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
// 初始化
|