chunk-ba3a53fc.d35b6a89.js 13 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ba3a53fc","chunk-69198a96","chunk-2d0df437"],{"077e":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:800,visible:e.visible,confirmLoading:e.confirmLoading,okText:"保存并安排任务",cancelText:"关闭"},on:{ok:e.handleOk,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"任务类名",hasFeedback:""}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["jobClassName",{rules:[{required:!0,message:"请输入任务类名!"}]}],expression:"['jobClassName', {rules: [{ required: true, message: '请输入任务类名!' }]}]"}],attrs:{placeholder:"请输入任务类名"}})],1),t("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"cron表达式"}},[t("j-cron",{directives:[{name:"decorator",rawName:"v-decorator",value:["cronExpression",{initialValue:"* * * * * ? *"}],expression:"['cronExpression', { initialValue: '* * * * * ? *' }]"}],ref:"innerVueCron",on:{change:e.setCorn}})],1),t("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"参数"}},[t("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["parameter",{}],expression:"['parameter', {}]"}],attrs:{placeholder:"请输入参数",rows:5}})],1),t("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"描述"}},[t("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["description",{}],expression:"['description', {}]"}],attrs:{placeholder:"请输入描述",rows:3}})],1),t("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,label:"状态"}},[t("j-dict-select-tag",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:0}],expression:"[ 'status', {'initialValue':0}]"}],attrs:{type:"radioButton","trigger-change":!0,dictCode:"quartz_status"}})],1)],1)],1)],1)},n=[],o=a("0fea"),s=a("1e29"),l=a("88bc"),i=a.n(l),c={name:"QuartzJobModal",components:{JCron:s["default"]},data:function(){return{title:"操作",buttonStyle:"solid",visible:!1,model:{},labelCol:{xs:{span:24},sm:{span:5}},wrapperCol:{xs:{span:24},sm:{span:16}},cron:{label:"",value:""},confirmLoading:!1,form:this.$form.createForm(this),validatorRules:{cron:{rules:[{required:!0,message:"请输入cron表达式!"}]}},url:{add:"/sys/quartzJob/add",edit:"/sys/quartzJob/edit"}}},created:function(){},methods:{add:function(){this.edit({})},edit:function(e){var t=this,a=this;a.form.resetFields(),this.model=Object.assign({},e),this.visible=!0,this.$nextTick((function(){t.form.setFieldsValue(i()(t.model,"jobClassName","cronExpression","parameter","description","status"))}))},close:function(){this.$emit("close"),this.visible=!1},handleOk:function(){var e=this,t=this;this.form.validateFields((function(a,r){if(!a){if("undefined"==typeof r.cronExpression||0==Object.keys(r.cronExpression).length)return e.$message.warning("请输入cron表达式!"),!1;t.confirmLoading=!0;var n="",s="";e.model.id?(n+=e.url.edit,s="put"):(n+=e.url.add,s="post");var l=Object.assign(e.model,r);Object(o["i"])(n,l,s).then((function(e){e.success?(t.$message.success(e.message),t.$emit("ok")):t.$message.warning(e.message)})).finally((function(){t.confirmLoading=!1,t.close()}))}}))},handleCancel:function(){this.close()},setCorn:function(e){var t=this;this.$nextTick((function(){t.model.cronExpression=e})),0==Object.keys(e).length&&this.$message.warning("请输入cron表达式!")},validateCron:function(e,t,a){t?0==Object.keys(t).length&&a("请输入cron表达式!"):a()}}},u=c,d=a("2877"),p=Object(d["a"])(u,r,n,!1,null,"4c0cef96",null);t["default"]=p.exports},"1b81":function(e,t,a){"use strict";a("3a2c")},"3a2c":function(e,t,a){},"7a9d":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"table-page-search-wrapper"},[t("a-form",{attrs:{layout:"inline"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.searchQuery.apply(null,arguments)}}},[t("a-row",{attrs:{gutter:24}},[t("a-col",{attrs:{md:6,sm:10}},[t("a-form-item",{attrs:{label:"任务类名"}},[t("a-input",{attrs:{placeholder:"请输入任务类名"},model:{value:e.queryParam.jobClassName,callback:function(t){e.$set(e.queryParam,"jobClassName",t)},expression:"queryParam.jobClassName"}})],1)],1),t("a-col",{attrs:{md:6,sm:10}},[t("a-form-item",{attrs:{label:"任务状态"}},[t("a-select",{staticStyle:{width:"220px"},attrs:{placeholder:"请选择状态"},model:{value:e.queryParam.status,callback:function(t){e.$set(e.queryParam,"status",t)},expression:"queryParam.status"}},[t("a-select-option",{attrs:{value:""}},[e._v("全部")]),t("a-select-option",{attrs:{value:"0"}},[e._v("正常")]),t("a-select-option",{attrs:{value:"-1"}},[e._v("停止")])],1)],1)],1),t("a-col",{attrs:{md:6,sm:10}},[t("span",{staticClass:"table-page-search-submitButtons",staticStyle:{float:"left",overflow:"hidden"}},[t("a-button",{attrs:{type:"primary",icon:"search"},on:{click:e.searchQuery}},[e._v("查询")]),t("a-button",{staticStyle:{"margin-left":"8px"},attrs:{type:"primary",icon:"reload"},on:{click:e.searchReset}},[e._v("重置")])],1)])],1)],1)],1),t("div",{staticClass:"table-operator"},[t("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:e.handleAdd}},[e._v("新增")]),t("a-button",{attrs:{type:"primary",icon:"download"},on:{click:function(t){return e.handleExportXls("定时任务信息")}}},[e._v("导出")]),t("a-upload",{attrs:{name:"file",showUploadList:!1,multiple:!1,headers:e.tokenHeader,action:e.importExcelUrl},on:{change:e.handleImportExcel}},[t("a-button",{attrs:{type:"primary",icon:"import"}},[e._v("导入")])],1),e.selectedRowKeys.length>0?t("a-dropdown",[t("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[t("a-menu-item",{key:"1",on:{click:e.batchDel}},[t("a-icon",{attrs:{type:"delete"}}),e._v("删除")],1)],1),t("a-button",{staticStyle:{"margin-left":"8px"}},[e._v(" 批量操作 "),t("a-icon",{attrs:{type:"down"}})],1)],1):e._e()],1),t("div",[t("div",{staticClass:"ant-alert ant-alert-info",staticStyle:{"margin-bottom":"16px"}},[t("i",{staticClass:"anticon anticon-info-circle ant-alert-icon"}),e._v(" 已选择 "),t("a",{staticStyle:{"font-weight":"600"}},[e._v(e._s(e.selectedRowKeys.length))]),e._v("项\n "),t("a",{staticStyle:{"margin-left":"24px"},on:{click:e.onClearSelected}},[e._v("清空")])]),t("a-table",{ref:"table",attrs:{size:"middle",bordered:"",rowKey:"id",columns:e.columns,dataSource:e.dataSource,pagination:e.ipagination,loading:e.loading,rowSelection:{selectedRowKeys:e.selectedRowKeys,onChange:e.onSelectChange}},on:{change:e.handleTableChange},scopedSlots:e._u([{key:"description",fn:function(e){return t("span",{},[t("j-ellipsis",{attrs:{value:e,length:20}})],1)}},{key:"parameterRender",fn:function(e){return t("span",{},[t("j-ellipsis",{attrs:{value:e,length:20}})],1)}},{key:"action",fn:function(a,r){return t("span",{},[-1==r.status?t("a",{on:{click:function(t){return e.resumeJob(r)}}},[e._v("启动")]):e._e(),0==r.status?t("a",{on:{click:function(t){return e.pauseJob(r)}}},[e._v("停止")]):e._e(),t("a-divider",{attrs:{type:"vertical"}}),t("a-dropdown",[t("a",{staticClass:"ant-dropdown-link"},[e._v("更多 "),t("a-icon",{attrs:{type:"down"}})],1),t("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[t("a-menu-item",[t("a",{on:{click:function(t){return e.handleEdit(r)}}},[e._v("编辑")])]),t("a-menu-item",[t("a-popconfirm",{attrs:{title:"确定删除吗?"},on:{confirm:function(){return e.handleDelete(r.id)}}},[t("a",[e._v("删除")])])],1)],1)],1)],1)}},{key:"customRenderStatus",fn:function(a){return[0==a?t("a-tag",{attrs:{color:"green"}},[e._v("已启动")]):e._e(),-1==a?t("a-tag",{attrs:{color:"orange"}},[e._v("已暂停")]):e._e()]}}])})],1),t("quartzJob-modal",{ref:"modalForm",on:{ok:e.modalFormOk}})],1)},n=[],o=a("077e"),s=a("0fea"),l=a("b65a"),i=a("d579"),c={name:"QuartzJobList",mixins:[l["a"]],components:{QuartzJobModal:o["default"],JEllipsis:i["default"]},data:function(){return{description:"定时任务在线管理",queryParam:{},columns:[{title:"#",dataIndex:"",key:"rowIndex",width:60,align:"center",customRender:function(e,t,a){return parseInt(a)+1}},{title:"任务类名",align:"center",dataIndex:"jobClassName",sorter:!0},{title:"cron表达式",align:"center",dataIndex:"cronExpression"},{title:"参数",align:"center",width:150,dataIndex:"parameter",scopedSlots:{customRender:"parameterRender"}},{title:"描述",align:"center",width:250,dataIndex:"description",scopedSlots:{customRender:"description"}},{title:"状态",align:"center",dataIndex:"status",scopedSlots:{customRender:"customRenderStatus"},filterMultiple:!1,filters:[{text:"已启动",value:"0"},{text:"已暂停",value:"-1"}]},{title:"操作",dataIndex:"action",align:"center",width:180,scopedSlots:{customRender:"action"}}],url:{list:"/sys/quartzJob/list",delete:"/sys/quartzJob/delete",deleteBatch:"/sys/quartzJob/deleteBatch",pause:"/sys/quartzJob/pause",resume:"/sys/quartzJob/resume",exportXlsUrl:"sys/quartzJob/exportXls",importExcelUrl:"sys/quartzJob/importExcel"}}},computed:{importExcelUrl:function(){return"".concat(window._CONFIG["domianURL"],"/").concat(this.url.importExcelUrl)}},methods:{handleTableChange:function(e,t,a){Object.keys(a).length>0&&(this.isorter.column=a.field,this.isorter.order="ascend"==a.order?"asc":"desc"),this.filters.status=t.status[0],this.ipagination=e,this.loadData()},pauseJob:function(e){var t=this;this.$confirm({title:"确认暂停",content:"是否暂停选中任务?",onOk:function(){Object(s["c"])(t.url.pause,{jobClassName:e.jobClassName}).then((function(e){e.success?(t.$message.success(e.message),t.loadData(),t.onClearSelected()):t.$message.warning(e.message)}))}})},resumeJob:function(e){var t=this;this.$confirm({title:"确认启动",content:"是否启动选中任务?",onOk:function(){Object(s["c"])(t.url.resume,{jobClassName:e.jobClassName}).then((function(e){e.success?(t.$message.success(e.message),t.loadData(),t.onClearSelected()):t.$message.warning(e.message)}))}})}}},u=c,d=(a("1b81"),a("2877")),p=Object(d["a"])(u,r,n,!1,null,"5dd1db74",null);t["default"]=p.exports},"88bc":function(e,t,a){(function(t){var a=1/0,r=9007199254740991,n="[object Arguments]",o="[object Function]",s="[object GeneratorFunction]",l="[object Symbol]",i="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,u=i||c||Function("return this")();function d(e,t,a){switch(a.length){case 0:return e.call(t);case 1:return e.call(t,a[0]);case 2:return e.call(t,a[0],a[1]);case 3:return e.call(t,a[0],a[1],a[2])}return e.apply(t,a)}function p(e,t){var a=-1,r=e?e.length:0,n=Array(r);while(++a<r)n[a]=t(e[a],a,e);return n}function m(e,t){var a=-1,r=t.length,n=e.length;while(++a<r)e[n+a]=t[a];return e}var f=Object.prototype,b=f.hasOwnProperty,h=f.toString,v=u.Symbol,g=f.propertyIsEnumerable,y=v?v.isConcatSpreadable:void 0,w=Math.max;function C(e,t,a,r,n){var o=-1,s=e.length;a||(a=j),n||(n=[]);while(++o<s){var l=e[o];t>0&&a(l)?t>1?C(l,t-1,a,r,n):m(n,l):r||(n[n.length]=l)}return n}function x(e,t){return e=Object(e),k(e,t,(function(t,a){return a in e}))}function k(e,t,a){var r=-1,n=t.length,o={};while(++r<n){var s=t[r],l=e[s];a(l,s)&&(o[s]=l)}return o}function _(e,t){return t=w(void 0===t?e.length-1:t,0),function(){var a=arguments,r=-1,n=w(a.length-t,0),o=Array(n);while(++r<n)o[r]=a[t+r];r=-1;var s=Array(t+1);while(++r<t)s[r]=a[r];return s[t]=o,d(e,this,s)}}function j(e){return q(e)||S(e)||!!(y&&e&&e[y])}function O(e){if("string"==typeof e||I(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}function S(e){return E(e)&&b.call(e,"callee")&&(!g.call(e,"callee")||h.call(e)==n)}var q=Array.isArray;function J(e){return null!=e&&$(e.length)&&!N(e)}function E(e){return z(e)&&J(e)}function N(e){var t=R(e)?h.call(e):"";return t==o||t==s}function $(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function R(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function z(e){return!!e&&"object"==typeof e}function I(e){return"symbol"==typeof e||z(e)&&h.call(e)==l}var F=_((function(e,t){return null==e?{}:x(e,p(C(t,1),O))}));e.exports=F}).call(this,a("c8ba"))},d579:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-tooltip",{attrs:{placement:"topLeft"}},[t("template",{slot:"title"},[t("span",[e._v(e._s(e.value))])]),e._v("\n "+e._s(e._f("ellipsis")(e.value,e.length))+"\n")],2)},n=[],o={name:"JEllipsis",props:{value:{type:String,required:!1},length:{type:Number,required:!1,default:25}}},s=o,l=a("2877"),i=Object(l["a"])(s,r,n,!1,null,"4de15389",null);t["default"]=i.exports}}]);