1 line
8.9 KiB
JavaScript
1 line
8.9 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-56d06063","chunk-2d0aa660"],{"0ce6":function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-card",{attrs:{bordered:!1}},[a("div",{staticClass:"table-page-search-wrapper"},[a("a-form",{attrs:{layout:"inline"}},[a("a-row",{attrs:{gutter:48}},[a("a-col",{attrs:{md:8,sm:24}},[a("a-form-item",{attrs:{label:"组名称"}},[a("a-select",{attrs:{placeholder:"请输入组名称"},on:{change:function(e){return t.handleChange(e)}},model:{value:t.queryParam.groupName,callback:function(e){t.$set(t.queryParam,"groupName",e)},expression:"queryParam.groupName"}},t._l(t.groupNameList,(function(e){return a("a-select-option",{key:e,attrs:{value:e}},[t._v(t._s(e))])})),1)],1)],1),a("a-col",{attrs:{md:8,sm:24}},[a("a-form-item",{attrs:{label:"任务名称"}},[a("a-select",{attrs:{"show-search":"",placeholder:"请输入任务名称","default-active-first-option":!1,"show-arrow":!0,"filter-option":!1,"not-found-content":null},on:{search:t.handleSearch,change:t.handleChange},model:{value:t.queryParam.workflowId,callback:function(e){t.$set(t.queryParam,"workflowId",e)},expression:"queryParam.workflowId"}},t._l(t.workflowNameList,(function(e,o){return a("a-select-option",{key:o,attrs:{value:e.id}},[t._v(" "+t._s(e.workflowName)+" ")])})),1)],1)],1),a("a-col",{attrs:{md:8,sm:24}},[a("a-form-item",{attrs:{label:"状态"}},[a("a-select",{attrs:{placeholder:"请选择状态",allowClear:""},model:{value:t.queryParam.taskBatchStatus,callback:function(e){t.$set(t.queryParam,"taskBatchStatus",e)},expression:"queryParam.taskBatchStatus"}},t._l(t.taskBatchStatus,(function(e,o){return a("a-select-option",{key:o,attrs:{value:o}},[t._v(" "+t._s(e.name))])})),1)],1)],1),t.advanced?void 0:t._e(),a("a-col",{attrs:{md:t.advanced?24:8,sm:24}},[a("span",{staticClass:"table-page-search-submitButtons",style:t.advanced&&{float:"right",overflow:"hidden"}||{}},[a("a-button",{attrs:{type:"primary"},on:{click:function(e){return t.$refs.table.refresh(!0)}}},[t._v("查询")]),a("a-button",{staticStyle:{"margin-left":"8px"},on:{click:function(){return t.queryParam={}}}},[t._v("重置")]),a("a",{staticStyle:{"margin-left":"8px"},on:{click:t.toggleAdvanced}},[t._v(" "+t._s(t.advanced?"收起":"展开")+" "),a("a-icon",{attrs:{type:t.advanced?"up":"down"}})],1)],1)])],2)],1)],1),a("div",{staticClass:"table-operator"}),a("s-table",{ref:"table",attrs:{size:"default",rowKey:function(t){return t.id},columns:t.columns,data:t.loadData,alert:t.options.alert,rowSelection:t.options.rowSelection,scroll:{x:1500}},scopedSlots:t._u([{key:"serial",fn:function(e){return a("span",{},[t._v(" "+t._s(e.id)+" ")])}},{key:"taskBatchStatus",fn:function(e){return a("span",{},[a("a-tag",{attrs:{color:t.taskBatchStatus[e].color}},[t._v(" "+t._s(t.taskBatchStatus[e].name)+" ")])],1)}},{key:"operationReason",fn:function(e){return a("span",{},[t._v(" "+t._s(t.operationReason[e].name)+" ")])}},{key:"action",fn:function(e,o){return a("span",{},[[a("a",{on:{click:function(e){return t.handleInfo(o)}}},[t._v("详情")]),a("a-divider",{attrs:{type:"vertical"}}),a("a-popconfirm",{attrs:{title:"是否停止?","ok-text":"停止","cancel-text":"取消"},on:{confirm:function(e){return t.handleStop(o)}}},[1===o.taskBatchStatus||2===o.taskBatchStatus?a("a",{attrs:{href:"javascript:;"}},[t._v("停止")]):t._e()])]],2)}}])})],1)},r=[],n=a("4b43"),s=a("1258"),c=a("2af9"),i=a("3b7a"),l=a("0fea"),u=a("119c"),d=a("38b7"),f={name:"WorkflowBatchList",components:{JobBatchInfo:u["default"],Drawer:c["c"],AInput:s["a"],ATextarea:n["a"],STable:c["i"]},data:function(){var t=this;return{currentComponet:"List",record:"",mdl:{},visible:!1,advanced:!1,queryParam:{workflowId:null},taskBatchStatus:d.taskBatchStatus,operationReason:d.operationReason,columns:[{title:"ID",scopedSlots:{customRender:"serial"},fixed:"left"},{title:"组名称",dataIndex:"groupName",ellipsis:!0,width:"15%"},{title:"任务名称",dataIndex:"workflowName",ellipsis:!0,width:"15%"},{title:"开始执行时间",dataIndex:"executionAt",width:"15%"},{title:"状态",dataIndex:"taskBatchStatus",scopedSlots:{customRender:"taskBatchStatus"},width:"5%"},{title:"操作原因",dataIndex:"operationReason",scopedSlots:{customRender:"operationReason"},width:"15%"},{title:"创建时间",dataIndex:"createDt",sorter:!0,width:"15%"},{title:"操作",fixed:"right",dataIndex:"action",width:"180px",scopedSlots:{customRender:"action"}}],loadData:function(e){return Object(i["x"])(Object.assign(e,t.queryParam)).then((function(t){return t}))},selectedRowKeys:[],selectedRows:[],options:{alert:{show:!0,clear:function(){t.selectedRowKeys=[]}},rowSelection:{selectedRowKeys:this.selectedRowKeys,onChange:this.onSelectChange}},optionAlertShow:!1,groupNameList:[],workflowNameList:[],openDrawer:!1,currentShowRecord:null}},created:function(){var t=this;Object(l["j"])().then((function(e){t.groupNameList=e.data}));var e=this.$route.query.workflowId;Object(i["z"])({workflowId:e}).then((function(a){t.workflowNameList=a.data,e&&(t.queryParam["workflowId"]=t.workflowNameList[0].id,t.$refs.table.refresh(!0))}))},methods:{handleSearch:function(t){var e=this;Object(i["z"])({keywords:t}).then((function(t){e.workflowNameList=t.data}))},handleChange:function(t){},toggleAdvanced:function(){this.advanced=!this.advanced},handleInfo:function(t){t=t||this.currentShowRecord,this.$router.push({path:"/job/workflow/batch/detail",query:{id:t.id}})},handleOk:function(t){},handleStop:function(t){var e=this;Object(i["p"])(t.id).then((function(t){var a=t.status;0===a?e.$message.error("停止失败"):(e.$refs.table.refresh(!0),e.$message.success("停止成功"))}))},refreshTable:function(t){this.$refs.table.refresh(!0)},onSelectChange:function(t,e){this.selectedRowKeys=t,this.selectedRows=e},handlerOpenDrawer:function(t){var e=this;this.currentShowRecord=t,this.openDrawer=!0,setTimeout((function(){e.$refs.jobBatchInfoRef.jobBatchDetail(t.id)}),200)},onClose:function(){this.openDrawer=!1,this.currentShowRecord=null}}},h=f,p=a("f7c6"),m=Object(p["a"])(h,o,r,!1,null,null,null);e["default"]=m.exports},"119c":function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=this,a=e.$createElement,o=e._self._c||a;return o("div",[e.showHeader?o("page-header-wrapper",{staticStyle:{margin:"-24px -1px 0"},on:{back:function(){return e.$router.replace("/job/batch/list")}}},[o("div")]):e._e(),null!==e.jobBatchInfo?o("a-card",{attrs:{bordered:!1}},[o("a-descriptions",{attrs:{title:"",column:e.column,bordered:""}},[o("a-descriptions-item",{attrs:{label:"组名称"}},[e._v(" "+e._s(e.jobBatchInfo.groupName)+" ")]),o("a-descriptions-item",{attrs:{label:"任务名称"}},[e._v(" "+e._s(e.jobBatchInfo.jobName)+" ")]),o("a-descriptions-item",{attrs:{label:"状态"}},[o("a-tag",{attrs:{color:e.taskBatchStatus[e.jobBatchInfo.taskBatchStatus].color}},[e._v(" "+e._s(e.taskBatchStatus[e.jobBatchInfo.taskBatchStatus].name)+" ")])],1),o("a-descriptions-item",{attrs:{label:"执行器类型"}},[o("a-tag",{attrs:{color:e.executorType[e.jobBatchInfo.executorType].color}},[e._v(" "+e._s(e.executorType[e.jobBatchInfo.executorType].name)+" ")])],1),o("a-descriptions-item",{attrs:{label:"操作原因"}},[o("a-tag",{attrs:{color:e.operationReason[e.jobBatchInfo.operationReason].color}},[e._v(" "+e._s(e.operationReason[e.jobBatchInfo.operationReason].name)+" ")])],1),o("a-descriptions-item",{attrs:{label:"开始执行时间"}},[e._v(" "+e._s(e.jobBatchInfo.executionAt)+" ")]),o("a-descriptions-item",{attrs:{label:"执行器名称",span:"4"}},[e._v(" "+e._s(e.jobBatchInfo.executorInfo)+" ")]),o("a-descriptions-item",{attrs:{label:"创建时间"}},[e._v(" "+e._s(e.jobBatchInfo.createDt)+" ")])],1)],1):e._e(),o("div",{staticStyle:{margin:"20px 0","border-left":"#f5222d 5px solid","font-size":"medium","font-weight":"bold"}},[o("span",{staticStyle:{"padding-left":"18px"}},[e._v("任务项列表")]),o("span",{staticStyle:{"padding-left":"18px"}},[o("a-icon",{attrs:{type:"sync"},on:{click:function(){return t.$refs.JobTaskListRef.refreshTable(t.queryParam)}}})],1)]),o("JobTaskList",{ref:"JobTaskListRef"})],1)},r=[],n=(a("d6a4"),a("3b7a")),s=a("1635"),c=a.n(s),i=a("38b7"),l=a.n(i),u=a("36e8"),d={name:"JobInfo",components:{JobTaskList:u["default"]},props:{showHeader:{type:Boolean,default:!0},column:{type:Number,default:3}},data:function(){return{jobBatchInfo:null,taskBatchStatus:l.a.taskBatchStatus,operationReason:l.a.operationReason,taskType:l.a.taskType,triggerType:l.a.triggerType,blockStrategy:l.a.blockStrategy,executorType:l.a.executorType,queryParam:{}}},created:function(){var t=this.$route.query.id,e=this.$route.query.groupName;t&&e?this.jobBatchDetail(t):this.showHeader&&this.$router.push({path:"/404"})},methods:{parseDate:function(t){return c()(t).format("YYYY-MM-DD HH:mm:ss")},jobBatchDetail:function(t){var e=this;Object(n["g"])(t).then((function(a){e.jobBatchInfo=a.data,e.queryParam={groupName:e.jobBatchInfo.groupName,taskBatchId:t,startId:0,fromIndex:0},e.$refs.JobTaskListRef.refreshTable(e.queryParam)}))}}},f=d,h=a("f7c6"),p=Object(h["a"])(f,o,r,!1,null,"14ced32a",null);e["default"]=p.exports}}]); |