diff --git a/escheduler-ui/.env b/escheduler-ui/.env
index 58ed53fa30..d58671abd7 100644
--- a/escheduler-ui/.env
+++ b/escheduler-ui/.env
@@ -1,7 +1,7 @@
# 后端接口地址
-#API_BASE = http://192.168.221.188:12345
+API_BASE = http://192.168.221.188:12345
-API_BASE = http://192.168.220.154:12345
+#API_BASE = http://192.168.220.154:12345
# 本地开发如需ip访问项目把"#"号去掉
#DEV_HOST = 192.168.xx.xx
diff --git a/escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue b/escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue
index 310cc22727..e8e99bb535 100644
--- a/escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue
+++ b/escheduler-ui/src/js/conf/home/pages/projects/pages/definition/pages/list/_source/list.vue
@@ -32,7 +32,7 @@
- |
+ |
{{parseInt(pageNo === 1 ? ($index + 1) : (($index + 1) + (pageSize * (pageNo - 1))))}}
|
@@ -79,6 +79,7 @@
type="error"
shape="circle"
size="xsmall"
+ :disabled="item.releaseState === 'OFFLINE'"
data-toggle="tooltip"
:title="$t('delete')"
v-ps="['GENERAL_USER']">
diff --git a/escheduler-ui/src/js/conf/home/pages/projects/pages/definition/timing/_source/list.vue b/escheduler-ui/src/js/conf/home/pages/projects/pages/definition/timing/_source/list.vue
index 22a9dee15f..4f4692ef59 100644
--- a/escheduler-ui/src/js/conf/home/pages/projects/pages/definition/timing/_source/list.vue
+++ b/escheduler-ui/src/js/conf/home/pages/projects/pages/definition/timing/_source/list.vue
@@ -35,7 +35,7 @@
{{$t('Update Time')}}
|
-
+ |
{{$t('Operation')}}
|
@@ -98,6 +98,28 @@
@click="_offline(item)"
v-if="item.releaseState === 'ONLINE'">
+
+ {{$t('Delete?')}}
+
+ {{$t('Cancel')}}
+ {{$t('Confirm')}}
+
+
+
+
+
+
@@ -135,7 +157,28 @@
props: {
},
methods: {
- ...mapActions('dag', ['getScheduleList', 'scheduleOffline', 'scheduleOnline', 'getReceiver']),
+ ...mapActions('dag', ['getScheduleList', 'scheduleOffline', 'scheduleOnline', 'getReceiver','deleteTiming']),
+ /**
+ * delete
+ */
+ _delete (item, i) {
+ this.deleteTiming({
+ scheduleId: item.id
+ }).then(res => {
+ this.$refs[`poptip-delete-${i}`][0].doClose()
+ this.$message.success(res.msg)
+ this.$router.push({ name: 'projects-definition-list' })
+ }).catch(e => {
+ this.$refs[`poptip-delete-${i}`][0].doClose()
+ this.$message.error(e.msg || '')
+ })
+ },
+ /**
+ * Close the delete layer
+ */
+ _closeDelete (i) {
+ this.$refs[`poptip-delete-${i}`][0].doClose()
+ },
/**
* return state
*/
diff --git a/escheduler-ui/src/js/conf/home/store/dag/actions.js b/escheduler-ui/src/js/conf/home/store/dag/actions.js
index 5e34925f9c..e41e4be760 100644
--- a/escheduler-ui/src/js/conf/home/store/dag/actions.js
+++ b/escheduler-ui/src/js/conf/home/store/dag/actions.js
@@ -589,5 +589,17 @@ export default {
reject(e)
})
})
+ },
+ /**
+ * remove timing
+ */
+ deleteTiming({ state }, payload){
+ return new Promise((resolve, reject) => {
+ io.get(`projects/${state.projectName}/schedule/delete`, payload, res => {
+ resolve(res)
+ }).catch(e => {
+ reject(e)
+ })
+ })
}
}