mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-01-06 04:18:11 +00:00
1 line
18 KiB
JavaScript
1 line
18 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-d59ac1c8"],{"01f1":function(t,e,n){"use strict";var a=n("79bb");n.n(a).a},"79bb":function(t,e,n){},8593:function(t,e,n){"use strict";n.d(e,"i",(function(){return r})),n.d(e,"g",(function(){return o})),n.d(e,"h",(function(){return u})),n.d(e,"db",(function(){return c})),n.d(e,"m",(function(){return i})),n.d(e,"k",(function(){return s})),n.d(e,"l",(function(){return l})),n.d(e,"j",(function(){return d})),n.d(e,"L",(function(){return f})),n.d(e,"D",(function(){return m})),n.d(e,"K",(function(){return p})),n.d(e,"I",(function(){return b})),n.d(e,"F",(function(){return h})),n.d(e,"G",(function(){return g})),n.d(e,"H",(function(){return _})),n.d(e,"J",(function(){return v})),n.d(e,"Z",(function(){return O})),n.d(e,"fb",(function(){return k})),n.d(e,"s",(function(){return y})),n.d(e,"c",(function(){return j})),n.d(e,"e",(function(){return V})),n.d(e,"b",(function(){return w})),n.d(e,"d",(function(){return T})),n.d(e,"f",(function(){return C})),n.d(e,"w",(function(){return x})),n.d(e,"u",(function(){return $})),n.d(e,"v",(function(){return E})),n.d(e,"Q",(function(){return S})),n.d(e,"P",(function(){return G})),n.d(e,"R",(function(){return I})),n.d(e,"Y",(function(){return P})),n.d(e,"o",(function(){return M})),n.d(e,"n",(function(){return D})),n.d(e,"U",(function(){return F})),n.d(e,"q",(function(){return L})),n.d(e,"t",(function(){return N})),n.d(e,"V",(function(){return R})),n.d(e,"a",(function(){return W})),n.d(e,"A",(function(){return z})),n.d(e,"cb",(function(){return q})),n.d(e,"E",(function(){return A})),n.d(e,"rb",(function(){return U})),n.d(e,"qb",(function(){return J})),n.d(e,"M",(function(){return B})),n.d(e,"O",(function(){return X})),n.d(e,"B",(function(){return H})),n.d(e,"S",(function(){return K})),n.d(e,"T",(function(){return Q})),n.d(e,"x",(function(){return Y})),n.d(e,"ab",(function(){return Z})),n.d(e,"y",(function(){return tt})),n.d(e,"bb",(function(){return et})),n.d(e,"p",(function(){return nt})),n.d(e,"C",(function(){return at})),n.d(e,"z",(function(){return rt})),n.d(e,"W",(function(){return ot})),n.d(e,"lb",(function(){return ut})),n.d(e,"nb",(function(){return ct})),n.d(e,"kb",(function(){return it})),n.d(e,"ob",(function(){return st})),n.d(e,"mb",(function(){return lt})),n.d(e,"r",(function(){return dt})),n.d(e,"pb",(function(){return ft})),n.d(e,"gb",(function(){return mt})),n.d(e,"eb",(function(){return pt})),n.d(e,"hb",(function(){return bt})),n.d(e,"X",(function(){return ht})),n.d(e,"jb",(function(){return gt})),n.d(e,"N",(function(){return _t})),n.d(e,"ib",(function(){return vt})),n("99af");var a=n("6b6c");function r(t){return Object(a.a)({url:"setting/config_class",method:"get",params:t})}function o(t){return Object(a.a)({url:"setting/config_class/create",method:"get"})}function u(t){return Object(a.a)({url:"setting/config_class/".concat(t,"/edit"),method:"get"})}function c(t){return Object(a.a)({url:"setting/config_class/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function i(t){return Object(a.a)({url:"setting/config",method:"get",params:t})}function s(t){return Object(a.a)({url:"setting/config/create",method:"get",params:t})}function l(t){return Object(a.a)({url:"/setting/config/".concat(t,"/edit"),method:"get"})}function d(t,e){return Object(a.a)({url:"setting/config/set_status/".concat(t,"/").concat(e),method:"PUT"})}function f(t){return Object(a.a)({url:"setting/group",method:"get",params:t})}function m(t){return Object(a.a)({url:t.url,method:t.method,data:t.datas})}function p(t){return Object(a.a)({url:"setting/group/".concat(t),method:"get"})}function b(t,e){return Object(a.a)({url:e,method:"get",params:t})}function h(t,e){return Object(a.a)({url:e,method:"get",params:t})}function g(t,e){return Object(a.a)({url:e,method:"get",params:t})}function _(t,e){return Object(a.a)({url:e,method:"get",params:t})}function v(t){return Object(a.a)({url:t,method:"PUT"})}function O(t){return Object(a.a)({url:"system/log/search_admin",method:"GET"})}function k(t){return Object(a.a)({url:"system/log",method:"GET",params:t})}function y(){return Object(a.a)({url:"system/file",method:"GET"})}function j(){return Object(a.a)({url:"system/backup",method:"GET"})}function V(t){return Object(a.a)({url:"system/backup/read",method:"GET",params:t})}function w(t){return Object(a.a)({url:"system/backup/backup",method:"put",data:t})}function T(t){return Object(a.a)({url:"system/backup/optimize",method:"put",data:t})}function C(t){return Object(a.a)({url:"system/backup/repair",method:"put",data:t})}function x(t){return Object(a.a)({url:"system/backup/file_list",method:"GET"})}function $(t){return Object(a.a)({url:"backup/download",method:"get",params:t})}function E(t){return Object(a.a)({url:"system/backup/import",method:"POST",data:t})}function S(t){return Object(a.a)({url:"system/file/login",method:"POST",data:t})}function G(t){return Object(a.a)({url:"system/file/opendir",method:"GET",params:t,file_edit:!0})}function I(t){return Object(a.a)({url:"system/file/openfile",method:"GET",params:t,file_edit:!0})}function P(t){return Object(a.a)({url:"system/file/savefile?fileToken=".concat(t.fileToken),method:"post",data:t,file_edit:!0})}function M(t){return Object(a.a)({url:"system/file/createFolder",method:"GET",params:t,file_edit:!0})}function D(t){return Object(a.a)({url:"system/file/createFile",method:"GET",params:t,file_edit:!0})}function F(t){return Object(a.a)({url:"system/file/rename",method:"GET",params:t,file_edit:!0})}function L(t){return Object(a.a)({url:"system/file/delFolder",method:"GET",params:t,file_edit:!0})}function N(t){return Object(a.a)({url:"system/file/mark",method:"get",params:t,file_edit:!0})}function R(t){return Object(a.a)({url:"system/replace_site_url",method:"post",data:t})}function W(){return Object(a.a)({url:"auth",method:"get"})}function z(){return Object(a.a)({url:"setting/get_kf_adv",method:"get"})}function q(t){return Object(a.a)({url:"setting/set_kf_adv",method:"post",data:t})}function A(){return Object(a.a)({url:"setting/group_all",method:"get"})}function U(t){return Object(a.a)({url:"system/version_list",method:"get",params:t})}function J(t){return Object(a.a)({url:"system/version_crate/".concat(t),method:"get"})}function B(t){return Object(a.a)({url:"setting/group_data/save_all",method:"POST",data:t})}function X(t){return Object(a.a)({url:"diy/open_adv/add",method:"POST",data:t})}function H(){return Object(a.a)({url:"diy/open_adv/info",method:"get"})}function K(t){return Object(a.a)({url:"setting/config/get_system/".concat(t),method:"get"})}function Q(t){return Object(a.a)({url:"setting/config/save_basics",method:"POST",data:t})}function Y(){return Object(a.a)({url:"setting/get_user_agreement",method:"get"})}function Z(t){return Object(a.a)({url:"setting/set_user_agreement",method:"post",data:t})}function tt(t){return Object(a.a)({url:"setting/get_agreement/".concat(t),method:"get"})}function et(t,e){return Object(a.a)({url:"setting/save_agreement",method:"post",data:t})}function nt(t){return Object(a.a)({url:"crmeb_product",method:"get",params:t})}function at(){return Object(a.a)({url:"setting/get_version",method:"get"})}function rt(){return Object(a.a)({url:"copyright",method:"get"})}function ot(t){return Object(a.a)({url:"copyright",method:"post",data:t})}function ut(t){return Object(a.a)({url:"/system/upgrade/list",method:"get",params:t})}function ct(){return Object(a.a)({url:"/system/upgrade_progress",method:"get"})}function it(){return Object(a.a)({url:"/system/upgrade/agreement",method:"get"})}function st(){return Object(a.a)({url:"/system/upgrade_status",method:"get"})}function lt(t){return Object(a.a)({url:"/system/upgrade_log/list",method:"get",params:t})}function dt(t){return Object(a.a)({url:"/system/upgrade_download/"+t,method:"POST"})}function ft(t){return Object(a.a)({url:"/system/upgradeable/list",method:"get",params:t})}function mt(t){return Object(a.a)({url:"system/crontab/list",params:t})}function pt(t,e){return Object(a.a)({url:"system/crontab/set_open/".concat(t,"/").concat(e)})}function bt(t){return Object(a.a)({url:"system/crontab/info/".concat(t)})}function ht(t){return Object(a.a)({url:"system/crontab/save",method:"post",data:t})}function gt(t){return Object(a.a)({url:"system/database/update_mark",method:"post",data:t})}function _t(t,e){return Object(a.a)({url:"system/file/mark/save?fileToken=".concat(t),method:"post",data:e})}function vt(){return Object(a.a)({url:"system/crontab/mark"})}},8625:function(t,e,n){},"9f17":function(t,e,n){"use strict";var a=n("8625");n.n(a).a},b60f:function(t,e,n){"use strict";n.r(e),n("99af");var a=n("8593"),r=n("f3f3"),o=n("2f62");r={filters:{formatWeek:function(t){return["周一","周二","周三","周四","周五","周六","周日"][t-1]}},data:function(){return{modal:!1,typeList:[{name:"每隔N秒",value:1},{name:"每隔N分钟",value:2},{name:"每隔N小时",value:3},{name:"每隔N天",value:4},{name:"每天",value:5},{name:"每星期",value:6},{name:"每月",value:7}],task:{},loading:!1,formValidate:{mark:"",content:"",is_open:0,type:6,week:1,day:1,hour:1,minute:30,second:0},trip:""}},created:function(){this.timerTask()},watch:{formValidate:{handler:function(t,e){switch(t.type){case 1:this.trip="每隔".concat(t.second,"秒执行一次");break;case 2:this.trip="每隔".concat(t.minute,"分钟执行一次");break;case 3:this.trip="每隔".concat(t.hour,"小时的").concat(t.minute,"分执行一次");break;case 4:this.trip="每隔".concat(t.day,"天的").concat(t.hour,"时").concat(t.minute,"分执行一次");break;case 5:this.trip="每天".concat(t.hour,"时").concat(t.minute,"分").concat(t.second,"秒执行一次");break;case 6:this.trip="每个星期".concat(t.week,"的").concat(t.hour,"时").concat(t.minute,"分").concat(t.second,"秒执行一次");break;case 7:this.trip="每月".concat(t.day,"日的").concat(t.hour,"时").concat(t.minute,"分").concat(t.second,"秒执行一次")}},immediate:!0,deep:!0}},methods:Object(r.a)(Object(r.a)({},Object(o.c)("admin/layout",["setCopyrightShow"])),{},{timerTask:function(){var t=this;Object(a.ib)().then((function(e){t.task=e.data}))},initData:function(t){t||(this.formValidate={mark:"",content:"",is_open:0,type:6,week:1,day:1,hour:1,minute:30,second:0},this.modal=!1)},timerInfo:function(t){var e=this;Object(a.hb)(t).then((function(t){e.modal=!0,e.formValidate=t.data}))},handleSubmit:function(){if(!this.formValidate.mark)return this.$Message.error({content:"请选择任务名称",onClose:function(){}});this.saveTimer(this.formValidate)},taskChange:function(t){this.formValidate.mark=t.value},saveTimer:function(t){var e=this;Object(a.X)(t).then((function(t){e.$Message.success({content:t.msg,onClose:function(){e.$emit("submitAsk")}})})).catch((function(t){e.$Message.error(t.msg)}))}})},n("01f1"),o=n("2877"),r={name:"system_crontab",components:{creatTask:Object(o.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Modal",{attrs:{title:t.formValidate.id?"编辑定时任务":"添加定时任务",width:"900"},on:{"on-ok":t.handleSubmit,"on-cancel":function(e){t.modal=!0},"on-visible-change":t.initData},model:{value:t.modal,callback:function(e){t.modal=e},expression:"modal"}},[n("Form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":97,"label-colon":""}},[n("FormItem",{attrs:{label:"任务名称",required:""}},[n("Row",{attrs:{gutter:16}},[n("Col",{attrs:{span:"20"}},[n("Select",{attrs:{"label-in-value":""},on:{"on-change":t.taskChange},model:{value:t.formValidate.mark,callback:function(e){t.$set(t.formValidate,"mark",e)},expression:"formValidate.mark"}},t._l(t.task,(function(e,a){return n("Option",{key:a,attrs:{value:a}},[t._v(t._s(e))])})),1)],1)],1)],1),n("FormItem",{attrs:{label:"执行周期",required:""}},[n("Row",{attrs:{gutter:14}},[n("Col",{attrs:{span:"4"}},[n("Select",{model:{value:t.formValidate.type,callback:function(e){t.$set(t.formValidate,"type",e)},expression:"formValidate.type"}},t._l(t.typeList,(function(e){return n("Option",{key:e.value,attrs:{value:e.value}},[t._v(t._s(e.name))])})),1)],1),6==t.formValidate.type?n("Col",{attrs:{span:"4"}},[n("Select",{model:{value:t.formValidate.week,callback:function(e){t.$set(t.formValidate,"week",e)},expression:"formValidate.week"}},t._l(7,(function(e){return n("Option",{key:e,attrs:{value:e}},[t._v(t._s(t._f("formatWeek")(e)))])})),1)],1):t._e(),[4,7].includes(t.formValidate.type)?n("Col",{attrs:{span:"4"}},[n("div",{staticClass:"input-number-wrapper"},[n("InputNumber",{attrs:{max:4===t.formValidate.type?1e4:31,min:1},model:{value:t.formValidate.day,callback:function(e){t.$set(t.formValidate,"day",e)},expression:"formValidate.day"}}),n("span",{staticClass:"suffix"},[t._v("日")])],1)]):t._e(),[3,4,5,6,7].includes(t.formValidate.type)?n("Col",{attrs:{span:"4"}},[n("div",{staticClass:"input-number-wrapper"},[n("InputNumber",{attrs:{max:23,min:0},model:{value:t.formValidate.hour,callback:function(e){t.$set(t.formValidate,"hour",e)},expression:"formValidate.hour"}}),n("span",{staticClass:"suffix"},[t._v("时")])],1)]):t._e(),[2,3,4,5,6,7].includes(t.formValidate.type)?n("Col",{attrs:{span:"4"}},[n("div",{staticClass:"input-number-wrapper"},[n("InputNumber",{attrs:{max:2===t.formValidate.type?36e3:59,min:0},model:{value:t.formValidate.minute,callback:function(e){t.$set(t.formValidate,"minute",e)},expression:"formValidate.minute"}}),n("span",{staticClass:"suffix"},[t._v("分")])],1)]):t._e(),[1,5,6,7].includes(t.formValidate.type)?n("Col",{attrs:{span:"4"}},[n("div",{staticClass:"input-number-wrapper"},[n("InputNumber",{attrs:{max:1===t.formValidate.type?36e3:59,min:0},model:{value:t.formValidate.second,callback:function(e){t.$set(t.formValidate,"second",e)},expression:"formValidate.second"}}),n("span",{staticClass:"suffix"},[t._v("秒")])],1)]):t._e()],1),n("Row",{attrs:{gutter:12}},[n("div",{staticClass:"trip"},[t._v(t._s(t.trip))])])],1),n("FormItem",{attrs:{label:"任务说明"}},[n("Row",{attrs:{gutter:10}},[n("Col",{attrs:{span:"20"}},[n("Input",{attrs:{type:"textarea",autosize:{minRows:5,maxRows:5},placeholder:"请输入任务说明"},model:{value:t.formValidate.content,callback:function(e){t.$set(t.formValidate,"content",e)},expression:"formValidate.content"}})],1)],1)],1),n("FormItem",{attrs:{label:"是否开启"}},[n("Row",{attrs:{gutter:10}},[n("Col",{attrs:{span:"12"}},[n("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},model:{value:t.formValidate.is_open,callback:function(e){t.$set(t.formValidate,"is_open",e)},expression:"formValidate.is_open"}},[n("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),n("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1)],1)],1)],1)],1)],1)}),[],!1,null,"305a4e87",null).exports},data:function(){return{loading:!1,columns:[{title:"名称",key:"name",minWidth:150},{title:"任务说明",key:"content",minWidth:120},{title:"执行周期",slot:"execution_cycle",minWidth:160},{title:"是否开启",slot:"is_open",minWidth:100},{title:"操作",slot:"action",align:"center",minWidth:100}],tableData:[],page:1,limit:15,total:1}},created:function(){this.getList()},methods:{taskTrip:function(t){switch(t.type){case 1:return"每隔".concat(t.second,"秒执行一次");case 2:return"每隔".concat(t.minute,"分钟执行一次");case 3:return"每隔".concat(t.hour,"小时执行一次");case 4:return"每隔".concat(t.day,"天执行一次");case 5:return"每天".concat(t.hour,"时").concat(t.minute,"分").concat(t.second,"秒执行一次");case 6:return"每个星期".concat(t.week,"的").concat(t.hour,"时").concat(t.minute,"分").concat(t.second,"秒执行一次");case 7:return"每月".concat(t.day,"日的").concat(t.hour,"时").concat(t.minute,"分").concat(t.second,"秒执行一次")}},getList:function(){var t=this;this.loading=!0,Object(a.gb)({page:this.page,limit:this.limit}).then((function(e){t.loading=!1;e=e.data;var n=e.count;e=e.list;t.total=n,t.tableData=e})).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},addTask:function(){this.$refs.addTask.modal=!0},edit:function(t){this.$refs.addTask.timerInfo(t)},handleDelete:function(t,e,n){var a=this;e={title:e,num:n,url:"system/crontab/del/".concat(t.id),method:"delete",ids:""};this.$modalSure(e).then((function(t){a.$Message.success(t.msg),a.getList()})).catch((function(t){a.$Message.error(t.msg)}))},handleChange:function(t){var e=this,n=t.id;t=t.is_open;Object(a.eb)(n,t).then((function(t){e.$Message.success(t.msg),e.getList()})).catch((function(t){e.$Message.error(t.msg)}))},pageChange:function(t){this.page=t,this.getList()}}},n("9f17"),n=Object(o.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("Card",{attrs:{bordered:!1,"dis-hover":""}},[n("Alert",{attrs:{closable:"true"}},[n("template",{slot:"desc"},[t._v("\n 启动定时任务两种方式:"),n("br"),t._v("\n 1、使用命令启动:php think timer start\n --d;如果更改了执行周期、编辑是否开启、删除定时任务需要重新启动下定时任务确保生效;"),n("br"),t._v("\n 2、使用接口触发定时任务,建议每分钟调用一次,接口地址 https://您的域名/api/crontab/run\n ")])],2),n("Button",{attrs:{type:"primary"},on:{click:t.addTask}},[t._v("添加定时任务")]),n("Table",{staticClass:"ivu-mt",attrs:{columns:t.columns,data:t.tableData,loading:t.loading},scopedSlots:t._u([{key:"execution_cycle",fn:function(e){return e=e.row,[n("span",[t._v(t._s(t.taskTrip(e)))])]}},{key:"is_open",fn:function(e){var a=e.row;return[n("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.handleChange(a)}},model:{value:a.is_open,callback:function(e){t.$set(a,"is_open",e)},expression:"row.is_open"}},[n("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),n("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])]}},{key:"action",fn:function(e){var a=e.row;return[n("a",{on:{click:function(e){return t.edit(a.id)}}},[t._v("编辑")]),n("Divider",{attrs:{type:"vertical"}}),n("a",{on:{click:function(e){return t.handleDelete(a,"删除秒杀商品",t.index)}}},[t._v("删除")])]}}])}),n("div",{staticClass:"acea-row row-right page"},[n("Page",{attrs:{total:t.total,current:t.page,"show-elevator":"","show-total":"","page-size":t.limit},on:{"on-change":t.pageChange}})],1),n("creatTask",{ref:"addTask",on:{submitAsk:t.getList}})],1)}),[],!1,null,"40a7f65e",null);e.default=n.exports}}]); |