new_naweigete/crmeb/public/admin/dist/system_static/js/chunk-2e46606e.308a76e5.js
2025-03-13 09:24:48 +08:00

1 line
18 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2e46606e"],{"1b66":function(t,e,n){},4707:function(t,e,n){n("d23a")},8593:function(t,e,n){n.d(e,"i",(function(){return r})),n.d(e,"g",(function(){return o})),n.d(e,"h",(function(){return i})),n.d(e,"W",(function(){return u})),n.d(e,"m",(function(){return c})),n.d(e,"k",(function(){return s})),n.d(e,"l",(function(){return l})),n.d(e,"j",(function(){return d})),n.d(e,"J",(function(){return m})),n.d(e,"B",(function(){return f})),n.d(e,"I",(function(){return p})),n.d(e,"G",(function(){return b})),n.d(e,"D",(function(){return h})),n.d(e,"E",(function(){return g})),n.d(e,"F",(function(){return v})),n.d(e,"H",(function(){return _})),n.d(e,"T",(function(){return y})),n.d(e,"Y",(function(){return k})),n.d(e,"s",(function(){return O})),n.d(e,"c",(function(){return j})),n.d(e,"e",(function(){return w})),n.d(e,"b",(function(){return V})),n.d(e,"d",(function(){return T})),n.d(e,"f",(function(){return x})),n.d(e,"w",(function(){return $})),n.d(e,"u",(function(){return C})),n.d(e,"v",(function(){return L})),n.d(e,"M",(function(){return S})),n.d(e,"L",(function(){return E})),n.d(e,"N",(function(){return G})),n.d(e,"S",(function(){return R})),n.d(e,"o",(function(){return D})),n.d(e,"n",(function(){return U})),n.d(e,"O",(function(){return P})),n.d(e,"q",(function(){return N})),n.d(e,"t",(function(){return z})),n.d(e,"P",(function(){return B})),n.d(e,"a",(function(){return F})),n.d(e,"C",(function(){return q})),n.d(e,"kb",(function(){return A})),n.d(e,"jb",(function(){return I})),n.d(e,"x",(function(){return J})),n.d(e,"U",(function(){return X})),n.d(e,"y",(function(){return Z})),n.d(e,"V",(function(){return H})),n.d(e,"p",(function(){return K})),n.d(e,"A",(function(){return M})),n.d(e,"z",(function(){return Q})),n.d(e,"Q",(function(){return W})),n.d(e,"eb",(function(){return Y})),n.d(e,"gb",(function(){return tt})),n.d(e,"db",(function(){return et})),n.d(e,"hb",(function(){return nt})),n.d(e,"fb",(function(){return at})),n.d(e,"r",(function(){return rt})),n.d(e,"ib",(function(){return ot})),n.d(e,"Z",(function(){return it})),n.d(e,"X",(function(){return ut})),n.d(e,"ab",(function(){return ct})),n.d(e,"R",(function(){return st})),n.d(e,"cb",(function(){return lt})),n.d(e,"K",(function(){return dt})),n.d(e,"bb",(function(){return mt})),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 i(t){return Object(a.a)({url:"setting/config_class/".concat(t,"/edit"),method:"get"})}function u(t){return Object(a.a)({url:"setting/config_class/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function c(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 m(t){return Object(a.a)({url:"setting/group",method:"get",params:t})}function f(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 v(t,e){return Object(a.a)({url:e,method:"get",params:t})}function _(t){return Object(a.a)({url:t,method:"PUT"})}function y(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 O(){return Object(a.a)({url:"system/file",method:"GET"})}function j(){return Object(a.a)({url:"system/backup",method:"GET"})}function w(t){return Object(a.a)({url:"system/backup/read",method:"GET",params:t})}function V(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 x(t){return Object(a.a)({url:"system/backup/repair",method:"put",data:t})}function $(t){return Object(a.a)({url:"system/backup/file_list",method:"GET"})}function C(t){return Object(a.a)({url:"backup/download",method:"get",params:t})}function L(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 E(t){return Object(a.a)({url:"system/file/opendir",method:"GET",params:t,file_edit:!0})}function G(t){return Object(a.a)({url:"system/file/openfile",method:"GET",params:t,file_edit:!0})}function R(t){return Object(a.a)({url:"system/file/savefile?fileToken=".concat(t.fileToken),method:"post",data:t,file_edit:!0})}function D(t){return Object(a.a)({url:"system/file/createFolder",method:"GET",params:t,file_edit:!0})}function U(t){return Object(a.a)({url:"system/file/createFile",method:"GET",params:t,file_edit:!0})}function P(t){return Object(a.a)({url:"system/file/rename",method:"GET",params:t,file_edit:!0})}function N(t){return Object(a.a)({url:"system/file/delFolder",method:"GET",params:t,file_edit:!0})}function z(t){return Object(a.a)({url:"system/file/mark",method:"get",params:t,file_edit:!0})}function B(t){return Object(a.a)({url:"system/replace_site_url",method:"post",data:t})}function F(){return Object(a.a)({url:"auth",method:"get"})}function q(){return Object(a.a)({url:"setting/group_all",method:"get"})}function A(t){return Object(a.a)({url:"system/version_list",method:"get",params:t})}function I(t){return Object(a.a)({url:"system/version_crate/".concat(t),method:"get"})}function J(){return Object(a.a)({url:"setting/get_user_agreement",method:"get"})}function X(t){return Object(a.a)({url:"setting/set_user_agreement",method:"post",data:t})}function Z(t){return Object(a.a)({url:"setting/get_agreement/".concat(t),method:"get"})}function H(t,e){return Object(a.a)({url:"setting/save_agreement",method:"post",data:t})}function K(t){return Object(a.a)({url:"crmeb_product",method:"get",params:t})}function M(){return Object(a.a)({url:"setting/get_version",method:"get"})}function Q(){return Object(a.a)({url:"copyright",method:"get"})}function W(t){return Object(a.a)({url:"copyright",method:"post",data:t})}function Y(t){return Object(a.a)({url:"/system/upgrade/list",method:"get",params:t})}function tt(){return Object(a.a)({url:"/system/upgrade_progress",method:"get"})}function et(){return Object(a.a)({url:"/system/upgrade/agreement",method:"get"})}function nt(){return Object(a.a)({url:"/system/upgrade_status",method:"get"})}function at(t){return Object(a.a)({url:"/system/upgrade_log/list",method:"get",params:t})}function rt(t){return Object(a.a)({url:"/system/upgrade_download/"+t,method:"POST"})}function ot(t){return Object(a.a)({url:"/system/upgradeable/list",method:"get",params:t})}function it(t){return Object(a.a)({url:"system/crontab/list",params:t})}function ut(t,e){return Object(a.a)({url:"system/crontab/set_open/".concat(t,"/").concat(e)})}function ct(t){return Object(a.a)({url:"system/crontab/info/".concat(t)})}function st(t){return Object(a.a)({url:"system/crontab/save",method:"post",data:t})}function lt(t){return Object(a.a)({url:"system/database/update_mark",method:"post",data:t})}function dt(t,e){return Object(a.a)({url:"system/file/mark/save?fileToken=".concat(t),method:"post",data:e})}function mt(){return Object(a.a)({url:"system/crontab/mark"})}},9534:function(t,e,n){n("1b66")},b60f:function(t,e,n){n.r(e),n("b0c0"),n("99af");var a=n("8593"),r=(n("caad"),n("5530")),o=n("2f62"),i=(r={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:"",weekList:[{label:"周一",value:1},{label:"周二",value:2},{label:"周三",value:3},{label:"周四",value:4},{label:"周五",value:5},{label:"周六",value:6},{label:"周日",value:7}]}},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.b)("admin/layout",["setCopyrightShow"])),{},{timerTask:function(){var t=this;Object(a.bb)().then((function(e){t.task=e.data}))},initData:function(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.ab)(t).then((function(t){e.modal=!0,e.formValidate=t.data}))},handleSubmit:function(){if(!this.formValidate.mark)return this.$message.error({message:"请选择任务名称",onClose:function(){}});this.saveTimer(this.formValidate)},taskChange:function(t){},saveTimer:function(t){var e=this;Object(a.R)(t).then((function(t){e.$message.success({message:t.msg,onClose:function(){e.$emit("submitAsk")}})})).catch((function(t){e.$message.error(t.msg)}))}})},o=(n("9534"),n("2877")),r=Object(o.a)(r,(function(){var t=this,e=t._self._c;return e("div",[e("el-dialog",{attrs:{visible:t.modal,title:t.formValidate.id?"编辑定时任务":"添加定时任务",width:"1000px"},on:{"update:visible":function(e){t.modal=e},closed:t.initData}},[e("el-form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":"97px","label-colon":""}},[e("el-form-item",{attrs:{label:"任务名称:",required:""}},[e("el-row",{attrs:{gutter:16}},[e("el-col",{attrs:{span:20}},[e("el-select",{model:{value:t.formValidate.mark,callback:function(e){t.$set(t.formValidate,"mark",e)},expression:"formValidate.mark"}},t._l(t.task,(function(t,n){return e("el-option",{key:n,attrs:{value:n,label:t}})})),1)],1)],1)],1),e("el-form-item",{attrs:{label:"执行周期:",required:""}},[e("el-row",{attrs:{gutter:14}},[e("el-col",{attrs:{span:4}},[e("el-select",{model:{value:t.formValidate.type,callback:function(e){t.$set(t.formValidate,"type",e)},expression:"formValidate.type"}},t._l(t.typeList,(function(t){return e("el-option",{key:t.value,attrs:{value:t.value,label:t.name}})})),1)],1),6==t.formValidate.type?e("el-col",{attrs:{span:4}},[e("el-select",{model:{value:t.formValidate.week,callback:function(e){t.$set(t.formValidate,"week",e)},expression:"formValidate.week"}},t._l(t.weekList,(function(n){return e("el-option",t._b({key:n.value},"el-option",n,!1))})),1)],1):t._e(),[4,7].includes(t.formValidate.type)?e("el-col",{attrs:{span:4}},[e("div",{staticClass:"input-number-wrapper"},[e("el-input-number",{attrs:{controls:!1,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"}}),e("span",{staticClass:"suffix"},[t._v("日")])],1)]):t._e(),[3,4,5,6,7].includes(t.formValidate.type)?e("el-col",{attrs:{span:4}},[e("div",{staticClass:"input-number-wrapper"},[e("el-input-number",{attrs:{"controls-position":"right",max:23,min:0},model:{value:t.formValidate.hour,callback:function(e){t.$set(t.formValidate,"hour",e)},expression:"formValidate.hour"}}),e("span",{staticClass:"suffix"},[t._v("时")])],1)]):t._e(),[2,3,4,5,6,7].includes(t.formValidate.type)?e("el-col",{attrs:{span:4}},[e("div",{staticClass:"input-number-wrapper"},[e("el-input-number",{attrs:{"controls-position":"right",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"}}),e("span",{staticClass:"suffix"},[t._v("分")])],1)]):t._e(),[1,5,6,7].includes(t.formValidate.type)?e("el-col",{attrs:{span:4}},[e("div",{staticClass:"input-number-wrapper"},[e("el-input-number",{attrs:{"controls-position":"right",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"}}),e("span",{staticClass:"suffix"},[t._v("秒")])],1)]):t._e()],1),e("el-row",{attrs:{gutter:12}},[e("div",{staticClass:"trip"},[t._v(t._s(t.trip))])])],1),e("el-form-item",{attrs:{label:"任务说明:"}},[e("el-row",{attrs:{gutter:10}},[e("el-col",{attrs:{span:20}},[e("el-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),e("el-form-item",{attrs:{label:"是否开启:"}},[e("el-row",{attrs:{gutter:10}},[e("el-col",{attrs:{span:12}},[e("el-switch",{attrs:{"active-value":1,"inactive-value":0,size:"large"},model:{value:t.formValidate.is_open,callback:function(e){t.$set(t.formValidate,"is_open",e)},expression:"formValidate.is_open"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1)],1)],1)],1),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.modal=!1}}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary"},on:{click:t.handleSubmit}},[t._v("提 交")])],1)],1)],1)}),[],!1,null,"3cce723c",null).exports,n("d708"));r={name:"system_crontab",components:{creatTask:r},data:function(){return{loading:!1,tableData:[],page:1,limit:15,total:1,apiBaseURL:""}},created:function(){this.apiBaseURL=i.a.apiBaseURL,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.Z)({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.X)(n,t).then((function(t){e.$message.success(t.msg),e.getList()})).catch((function(t){e.$message.error(t.msg)}))}}},n("4707"),n=Object(o.a)(r,(function(){var t=this,e=t._self._c;return e("el-card",{attrs:{bordered:!1,shadow:"never"}},[e("el-alert",{attrs:{type:"warning",closable:!1}},[e("template",{slot:"title"},[t._v("\n 启动定时任务两种方式:"),e("br"),t._v("\n 1、使用命令启动php think timer start\n --d如果更改了执行周期、编辑是否开启、删除定时任务需要重新启动下定时任务确保生效"),e("br"),t._v("\n 2、使用接口触发定时任务建议每分钟调用一次接口地址 "+t._s(t.apiBaseURL)+"/api/crontab/run "),e("br"),t._v("\n 开发说明:新增定时任务在 /crmeb/app/services/system/crontab/CrontabRunServices.php 文件中新增任务方法代码\n ")])],2),e("el-button",{staticClass:"mt14",attrs:{type:"primary"},on:{click:t.addTask}},[t._v("添加定时任务")]),e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"ivu-mt",attrs:{data:t.tableData}},[e("el-table-column",{attrs:{label:"标题","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("span",[t._v(t._s(n.row.name))])]}}])}),e("el-table-column",{attrs:{label:"任务说明","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("span",[t._v(t._s(n.row.content))])]}}])}),e("el-table-column",{attrs:{label:"执行周期","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("span",[t._v(t._s(t.taskTrip(n.row)))])]}}])}),e("el-table-column",{attrs:{label:"是否开启","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("el-switch",{staticClass:"defineSwitch",attrs:{"active-value":1,"inactive-value":0,size:"large","active-text":"开启","inactive-text":"关闭"},on:{change:function(e){return t.handleChange(n.row)}},model:{value:n.row.is_open,callback:function(e){t.$set(n.row,"is_open",e)},expression:"scope.row.is_open"}})]}}])}),e("el-table-column",{attrs:{label:"操作",width:"100"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("a",{on:{click:function(e){return t.edit(n.row.id)}}},[t._v("编辑")]),e("el-divider",{attrs:{direction:"vertical"}}),e("a",{on:{click:function(e){return t.handleDelete(n.row,"删除秒杀商品",n.$index)}}},[t._v("删除")])]}}])})],1),e("div",{staticClass:"acea-row row-right page"},[t.total?e("pagination",{attrs:{total:t.total,page:t.page,limit:t.limit},on:{"update:page":function(e){t.page=e},"update:limit":function(e){t.limit=e},pagination:t.getList}}):t._e()],1),e("creatTask",{ref:"addTask",on:{submitAsk:t.getList}})],1)}),[],!1,null,"64cec4f7",null);e.default=n.exports},d23a:function(t,e,n){}}]);