|
|
@@ -84,9 +84,16 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
type: 'invoke',
|
|
|
- width: 120,
|
|
|
+ width: 160,
|
|
|
render: [
|
|
|
{ label: '查看', on: this.onView },
|
|
|
+ {
|
|
|
+ label: '编辑',
|
|
|
+ render ({ status }) {
|
|
|
+ return status === State.REJECTED
|
|
|
+ },
|
|
|
+ on: this.onEdit
|
|
|
+ },
|
|
|
{
|
|
|
label: '提交',
|
|
|
render ({ status }) {
|
|
|
@@ -182,13 +189,13 @@ export default {
|
|
|
onEdit ({ target: { type, detail } }) {
|
|
|
switch (type) {
|
|
|
case PublishType.CALENDAR:
|
|
|
- this.viewSchedule(detail)
|
|
|
+ this.editSchedule(detail, 'schedule-design')
|
|
|
break
|
|
|
case PublishType.EVENT:
|
|
|
if (detail.target.type === EventTarget.RECUR) {
|
|
|
- this.viewSchedule(detail.target.id)
|
|
|
+ this.editSchedule(detail.target.id, 'recur-design')
|
|
|
} else {
|
|
|
- this.viewProgram(detail.target.id)
|
|
|
+ this.editProgram(detail.target.id)
|
|
|
}
|
|
|
break
|
|
|
default:
|
|
|
@@ -198,9 +205,18 @@ export default {
|
|
|
viewSchedule (id) {
|
|
|
this.$refs.scheduleDialog.show(id)
|
|
|
},
|
|
|
+ editSchedule (id, redirect) {
|
|
|
+ this.$router.push({
|
|
|
+ name: redirect,
|
|
|
+ params: { id: `${id}` }
|
|
|
+ })
|
|
|
+ },
|
|
|
viewProgram (id) {
|
|
|
this.$viewProgram(id)
|
|
|
},
|
|
|
+ editProgram (id) {
|
|
|
+ this.$viewProgram(id, 'design')
|
|
|
+ },
|
|
|
restart (item) {
|
|
|
calendarPublishRestart(item.workflowId, item.name).then(() => {
|
|
|
this.$refs.table.onPagination()
|