1 line
12 KiB
JavaScript
1 line
12 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-8cadc496"],{4720:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("el-form",{ref:"queryForm",attrs:{model:e.queryParams,inline:!0,"label-width":"68px"}},[a("el-form-item",{attrs:{label:"活动类型",prop:"type"}},[a("el-select",{attrs:{placeholder:"请选择活动类型",clearable:"",size:"small"},model:{value:e.queryParams.type,callback:function(t){e.$set(e.queryParams,"type",t)},expression:"queryParams.type"}},e._l(e.schoolcalendartypeOptions,(function(e){return a("el-option",{key:e.dictValue,attrs:{label:e.dictLabel,value:e.dictValue}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"适用范围",prop:"scope"}},[a("el-select",{attrs:{placeholder:"请选择适用范围",clearable:"",size:"small"},model:{value:e.queryParams.scope,callback:function(t){e.$set(e.queryParams,"scope",t)},expression:"queryParams.scope"}},e._l(e.scopeOptions,(function(e){return a("el-option",{key:e.dictValue,attrs:{label:e.dictLabel,value:e.dictValue}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"学年学期",prop:"xnxq"}},[a("el-select",{attrs:{placeholder:"请选择学年学期",clearable:"",size:"small"},model:{value:e.queryParams.xnxq,callback:function(t){e.$set(e.queryParams,"xnxq",t)},expression:"queryParams.xnxq"}},e._l(e.xnxqOptions,(function(e){return a("el-option",{key:e.dictValue,attrs:{label:e.dictLabel,value:e.dictValue}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"活动时间",prop:"activitytime"}},[a("el-date-picker",{staticStyle:{width:"240px"},attrs:{size:"small","value-format":"yyyy-MM-dd",type:"daterange","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:e.dateRange,callback:function(t){e.dateRange=t},expression:"dateRange"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),e._v(" "),a("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),e._v(" "),a("el-row",{staticClass:"mb8",attrs:{gutter:10}},[a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["benyi:schoolcalendar:add"],expression:"['benyi:schoolcalendar:add']"}],attrs:{type:"primary",icon:"el-icon-plus",size:"mini"},on:{click:e.handleAdd}},[e._v("新增")])],1),e._v(" "),a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["benyi:schoolcalendar:edit"],expression:"['benyi:schoolcalendar:edit']"}],attrs:{type:"success",icon:"el-icon-edit",size:"mini",disabled:e.single},on:{click:e.handleUpdate}},[e._v("修改")])],1),e._v(" "),a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["benyi:schoolcalendar:remove"],expression:"['benyi:schoolcalendar:remove']"}],attrs:{type:"danger",icon:"el-icon-delete",size:"mini",disabled:e.multiple},on:{click:e.handleDelete}},[e._v("删除")])],1),e._v(" "),a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["benyi:schoolcalendar:export"],expression:"['benyi:schoolcalendar:export']"}],attrs:{type:"warning",icon:"el-icon-download",size:"mini"},on:{click:e.handleExport}},[e._v("导出")])],1)],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.schoolcalendarList},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"编号",align:"center",prop:"id"}}),e._v(" "),a("el-table-column",{attrs:{label:"名称",align:"center",prop:"name"}}),e._v(" "),a("el-table-column",{attrs:{label:"活动类型",align:"center",formatter:e.schoolcalendartypeFormat,prop:"type"}}),e._v(" "),a("el-table-column",{attrs:{label:"适用范围",align:"center",formatter:e.scopeFormat,prop:"scope"}}),e._v(" "),a("el-table-column",{attrs:{label:"学年学期",align:"center",formatter:e.xnxqFormat,prop:"xnxq"}}),e._v(" "),a("el-table-column",{attrs:{label:"活动时间",align:"center",prop:"activitytime",width:"180"}}),e._v(" "),a("el-table-column",{attrs:{label:"创建时间",align:"center",prop:"createtime",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e.parseTime(t.row.createtime)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["benyi:schoolcalendar:edit"],expression:"['benyi:schoolcalendar:edit']"}],attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(a){return e.handleUpdate(t.row)}}},[e._v("修改")]),e._v(" "),a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["benyi:schoolcalendar:remove"],expression:"['benyi:schoolcalendar:remove']"}],attrs:{size:"mini",type:"text",icon:"el-icon-delete"},on:{click:function(a){return e.handleDelete(t.row)}}},[e._v("删除")])]}}])})],1),e._v(" "),a("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}}),e._v(" "),a("el-dialog",{attrs:{title:e.title,visible:e.open,width:"500px"},on:{"update:visible":function(t){e.open=t}}},[a("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"80px"}},[a("el-form-item",{attrs:{label:"名称",prop:"name"}},[a("el-input",{attrs:{type:"textarea",placeholder:"请输入内容"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"活动类型",prop:"type"}},[a("el-select",{attrs:{placeholder:"请选择活动类型",clearable:"",size:"small"},model:{value:e.form.type,callback:function(t){e.$set(e.form,"type",t)},expression:"form.type"}},e._l(e.schoolcalendartypeOptions,(function(e){return a("el-option",{key:e.dictValue,attrs:{label:e.dictLabel,value:e.dictValue}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"适用范围",prop:"scope"}},[a("el-select",{attrs:{multiple:"",placeholder:"请选择适用范围",clearable:"",size:"small"},model:{value:e.form.scope,callback:function(t){e.$set(e.form,"scope",t)},expression:"form.scope"}},e._l(e.scopeOptions,(function(e){return a("el-option",{key:e.dictValue,attrs:{label:e.dictLabel,value:e.dictValue}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"活动时间",prop:"activitytime"}},[a("el-date-picker",{staticStyle:{width:"200px"},attrs:{clearable:"",size:"small",type:"date","value-format":"yyyy-MM-dd",placeholder:"选择活动时间"},model:{value:e.form.activitytime,callback:function(t){e.$set(e.form,"activitytime",t)},expression:"form.activitytime"}})],1)],1),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确 定")]),e._v(" "),a("el-button",{on:{click:e.cancel}},[e._v("取 消")])],1)],1)],1)},i=[],l=(a("28a5"),a("cc7d")),r={name:"Schoolcalendar",data:function(){return{loading:!0,ids:[],single:!0,multiple:!0,total:0,schoolcalendarList:[],title:"",dateRange:[],open:!1,schoolcalendartypeOptions:[],scopeOptions:[],xnxqOptions:[],queryParams:{pageNum:1,pageSize:10,name:void 0,type:void 0,scope:void 0,xnxq:void 0,deptid:void 0,activitytime:void 0,createuserid:void 0,createtime:void 0},form:{},rules:{name:[{required:!0,message:"名称不能为空",trigger:"blur"}],type:[{required:!0,message:"活动类型不能为空",trigger:"blur"}],scope:[{required:!0,message:"活动范围不能为空",trigger:"blur"}],activitytime:[{required:!0,message:"活动时间不能为空",trigger:"blur"}]}}},created:function(){var e=this;this.getList(),this.getDicts("sys_schoolcalendartype").then((function(t){e.schoolcalendartypeOptions=t.data})),this.getDicts("sys_yebjlx").then((function(t){e.scopeOptions=t.data})),this.getDicts("sys_xnxq").then((function(t){e.xnxqOptions=t.data}))},methods:{schoolcalendartypeFormat:function(e,t){return this.selectDictLabel(this.schoolcalendartypeOptions,e.type)},scopeFormat:function(e,t){for(var a=e.scope.split(";").length,n="",i=0;i<a;i++)n=n+this.selectDictLabel(this.scopeOptions,e.scope.split(";")[i])+";";return n},xnxqFormat:function(e,t){return this.selectDictLabel(this.xnxqOptions,e.xnxq)},getList:function(){var e=this;this.loading=!0,Object(l["f"])(this.addDateRange(this.queryParams,this.dateRange)).then((function(t){e.schoolcalendarList=t.rows,e.total=t.total,e.loading=!1}))},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={id:void 0,name:void 0,type:void 0,scope:void 0,activitytime:void 0},this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.dateRange=[],this.resetForm("queryForm"),this.handleQuery()},handleSelectionChange:function(e){this.ids=e.map((function(e){return e.id})),this.single=1!=e.length,this.multiple=!e.length},handleAdd:function(){this.reset(),this.open=!0,this.title="添加园历管理"},handleUpdate:function(e){var t=this;this.reset();var a=e.id||this.ids;Object(l["e"])(a).then((function(e){t.form=e.data,t.scopeOptions=e.scopes,t.form.scope=e.scopeIds,t.open=!0,t.title="修改园历管理"}))},submitForm:function(){var e=this;this.$refs["form"].validate((function(t){if(t){var a=e.form.scope;e.form.scope=a.join(";"),void 0!=e.form.id?Object(l["g"])(e.form).then((function(t){200===t.code?(e.msgSuccess("修改成功"),e.open=!1,e.getList()):e.msgError(t.msg)})):Object(l["a"])(e.form).then((function(t){200===t.code?(e.msgSuccess("新增成功"),e.open=!1,e.getList()):e.msgError(t.msg)}))}}))},handleDelete:function(e){var t=this,a=e.id||this.ids;this.$confirm('是否确认删除园历管理编号为"'+a+'"的数据项?',"警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){return Object(l["b"])(a)})).then((function(){t.getList(),t.msgSuccess("删除成功")})).catch((function(){}))},handleExport:function(){var e=this,t=this.queryParams;this.$confirm("是否确认导出所有园历管理数据项?","警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){return Object(l["c"])(t)})).then((function(t){e.download(t.msg)})).catch((function(){}))}}},o=r,s=a("2877"),c=Object(s["a"])(o,n,i,!1,null,null,null);t["default"]=c.exports},cc7d:function(e,t,a){"use strict";a.d(t,"f",(function(){return i})),a.d(t,"d",(function(){return l})),a.d(t,"e",(function(){return r})),a.d(t,"a",(function(){return o})),a.d(t,"g",(function(){return s})),a.d(t,"b",(function(){return c})),a.d(t,"c",(function(){return u}));var n=a("b775");function i(e){return Object(n["a"])({url:"/benyi/schoolcalendar/list",method:"get",params:e})}function l(e){return Object(n["a"])({url:"/benyi/schoolcalendar/getSchoolCalendars",method:"get",params:e})}function r(e){return Object(n["a"])({url:"/benyi/schoolcalendar/"+e,method:"get"})}function o(e){return Object(n["a"])({url:"/benyi/schoolcalendar",method:"post",data:e})}function s(e){return Object(n["a"])({url:"/benyi/schoolcalendar",method:"put",data:e})}function c(e){return Object(n["a"])({url:"/benyi/schoolcalendar/"+e,method:"delete"})}function u(e){return Object(n["a"])({url:"/benyi/schoolcalendar/export",method:"get",params:e})}}}]); |