chunk-6cebcbf4.aa5d5537.js 9.8 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6cebcbf4"],{"24fd":function(t,e,r){"use strict";r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return n})),r.d(e,"e",(function(){return o})),r.d(e,"c",(function(){return s})),r.d(e,"d",(function(){return l}));var a=r("b775");function i(t){return Object(a["a"])({url:"/org/addOrg",method:"post",data:t})}function n(t){return Object(a["a"])({url:"/org/deleteOrg/"+t,method:"delete"})}function o(t){return Object(a["a"])({url:"/org/updateOrg",method:"put",data:t})}function s(t){return Object(a["a"])({url:"/org/getOrg",method:"get",params:t})}function l(t){return Object(a["a"])({url:"/org/getOrgList",method:"post",data:t})}},3123:function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var a=r("b775");function i(t){return Object(a["a"])({url:"/qiniu/getToken",method:"get",params:t})}},"32ed":function(t,e,r){"use strict";var a=r("70f4"),i=r.n(a);i.a},"3ef4":function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"app-container"},[r("el-button",{staticClass:"filter-item add-slideshow",attrs:{type:"success",icon:"el-icon-edit"},on:{click:t.handleCreate}},[t._v("添加轮播图")]),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],attrs:{data:t.list,"element-loading-text":"Loading",border:"",fit:"","highlight-current-row":""}},[r("el-table-column",{attrs:{align:"center",label:"ID",width:"70",type:"index"}}),r("el-table-column",{attrs:{label:"轮播图",align:"center",height:"10px"},scopedSlots:t._u([{key:"default",fn:function(t){return[r("el-popover",{attrs:{placement:"right",title:"",trigger:"hover"}},[r("img",{attrs:{src:t.row.advertisingImg}}),r("img",{staticStyle:{"max-height":"50px","max-width":"50px"},attrs:{slot:"reference",src:t.row.advertisingImg,alt:t.row.advertisingImg},slot:"reference"})])]}}])}),r("el-table-column",{attrs:{label:"所属组织名称",width:"200",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[null==e.row.orgIdEntity||""==e.row.orgIdEntity?r("span",[t._v("暂无信息")]):r("span",[t._v(t._s(e.row.orgIdEntity.orgName))])]}}])}),r("el-table-column",{attrs:{"class-name":"status-col",label:"创建时间",width:"250",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[null==e.row.advertisingCreateTime||""==e.row.advertisingCreateTime?r("span",[t._v("暂无信息")]):r("span",[t._v(t._s(e.row.advertisingCreateTime))])]}}])}),r("el-table-column",{attrs:{align:"center",prop:"created_at",label:"最近修改时间",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){return[null==e.row.advertisingLastTime||""==e.row.advertisingLastTime?r("span",[t._v("暂无信息")]):r("span",[t._v(t._s(e.row.advertisingLastTime))])]}}])}),r("el-table-column",{attrs:{align:"center",prop:"created_at",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(r){return t.handleUpdate(e.row)}}},[t._v("编辑")]),r("el-button",{attrs:{type:"danger",size:"small"},on:{click:function(r){return t.deleteDate(e.row)}}},[t._v("删除")])]}}])})],1),r("div",{staticStyle:{float:"right","margin-top":"30px"}},[r("el-pagination",{attrs:{background:"","current-page":t.currentPage,"page-sizes":[10,20,30,40],"page-size":10,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1),r("el-dialog",{attrs:{title:t.textMap[t.dialogStatus],visible:t.dialogFormVisible},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[r("el-form",{ref:"dataForm",attrs:{model:t.form}},[r("el-form-item",{attrs:{"label-width":t.imgLabelWidth,label:"轮播图",prop:"wechatPayCert"}},[r("el-upload",{staticClass:"avatar-uploader",attrs:{action:t.upload_qiniu_url,data:t.qiniuData,"show-file-list":!1,"on-success":t.handleAvatarSuccess,"on-error":t.handleError,"before-upload":t.beforeAvatarUpload}},[t.imgUrl?r("img",{staticClass:"avatar",attrs:{src:t.imgUrl}}):r("i",{staticClass:"el-icon-plus avatar-uploader-icon"})])],1),r("el-form-item",{attrs:{label:"所属组织","label-width":t.imgLabelWidth}},[r("el-select",{staticStyle:{width:"180px"},attrs:{placeholder:"请选择所属组织"},on:{change:function(e){return t.$forceUpdate()}},model:{value:t.form.orgId,callback:function(e){t.$set(t.form,"orgId",e)},expression:"form.orgId"}},t._l(t.orgList,(function(t){return r("el-option",{key:t.orgId,attrs:{label:t.orgName,value:t.orgId}})})),1)],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:t.handleCancle}},[t._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(e){"create"==t.dialogStatus?t.createData():t.updateData()}}},[t._v("确 定")])],1)],1)],1)},i=[],n=(r("5ab2"),r("6d57"),r("e10e"),r("cc57"),r("88d6")),o=r("63de"),s=r("3123"),l=r("24fd"),u=r("90e7"),c=r("52c1");function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function g(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?d(Object(r),!0).forEach((function(e){Object(n["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var f={data:function(){return{list:null,imgUrl:"",orgList:{},listLoading:!0,dialogFormVisible:!1,dialogStatus:"",textMap:{create:"添加轮播图",update:"修改轮播图"},form:{},formLabelWidth:"120px",imgLabelWidth:"170px",total:0,currentPage:1,filterQuery:{pageNum:1,pageSize:10},excelQuery:{},excelList:{},qiniuData:{token:"",key:""},upload_qiniu_url:"",upload_qiniu_addr:""}},computed:g({},Object(c["b"])(["orgId"])),created:function(){this.getList(),this.getQiniuToken()},methods:{getList:function(){var t=this;this.listLoading=!0,this.filterQuery.orgId=this.orgId,this.filterQuery.advertisingType=1,Object(o["d"])(this.filterQuery).then((function(e){t.list=e.data.list,t.total=e.data.total,t.listLoading=!1,Object(l["d"])({orgId:t.orgId}).then((function(e){t.orgList=e.data.list,t.form.orgId=t.orgList[0].orgId})),Object(u["b"])({orgId:t.orgId,settingType:3}).then((function(e){t.upload_qiniu_url=e.data[0].settingUploadQiniuUrl,t.upload_qiniu_addr=e.data[0].settingUploadQiniuAddr})),t.clearDialogData()}))},handleCreate:function(){this.dialogFormVisible=!0,this.dialogStatus="create"},handleUpdate:function(t){var e=this;this.dialogStatus="update",Object(o["c"])({advertisingId:t.advertisingId}).then((function(t){e.form=t.data,e.imgUrl=e.form.advertisingImg})),this.dialogFormVisible=!0},handleFilter:function(){this.getList()},handleCancle:function(){var t=this;this.clearDialogData(),this.dialogFormVisible=!1,this.$nextTick((function(){t.$refs["dataForm"].clearValidate()}))},clearDialogData:function(){this.imgUrl=""},createData:function(){var t=this;this.$refs["dataForm"].validate((function(e){e&&(t.form.advertisingType=1,Object(o["a"])(t.form).then((function(e){t.dialogFormVisible=!1,t.$notify({title:"图片添加",message:e.msg,type:"success",duration:2e3}),t.getList()})))}))},deleteDate:function(t){var e=this;this.$confirm("此操作将永久删除该文件, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(o["b"])(t.advertisingId).then((function(t){e.$notify({title:"删除图片",message:t.msg,type:200===t.status?"success":"error",duration:2e3}),200===t.status&&e.getList()}))})).catch((function(){e.$message({type:"info",message:"已取消删除"})}))},updateData:function(){var t=this;this.$refs["dataForm"].validate((function(e){e&&Object(o["e"])(t.form).then((function(e){t.dialogFormVisible=!1,t.clearDialogData(),t.$notify({title:"更新图片",message:e.msg,type:200===e.status?"success":"error",duration:2e3}),t.getList()}))}))},getQiniuToken:function(){var t=this;Object(s["a"])({orgId:this.orgId}).then((function(e){t.qiniuData.token=e.data}))},handleAvatarSuccess:function(t,e){this.imgUrl=this.upload_qiniu_addr+"/"+t.key,this.form.advertisingImg=this.imgUrl},beforeAvatarUpload:function(t){this.qiniuData.key=t.name;var e=t.size/1024/1024<2;return e||this.$message.error("上传图片大小不能超过 2MB!"),e},handleError:function(t){this.$message({message:"上传失败",duration:2e3,type:"warning"})},handleSizeChange:function(t){this.filterQuery.pageSize=t,this.getList()},handleCurrentChange:function(t){this.filterQuery.pageNum=t,this.getList()}}},p=f,h=(r("32ed"),r("4023")),m=Object(h["a"])(p,a,i,!1,null,null,null);e["default"]=m.exports},"63de":function(t,e,r){"use strict";r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return n})),r.d(e,"e",(function(){return o})),r.d(e,"c",(function(){return s})),r.d(e,"d",(function(){return l}));var a=r("b775");function i(t){return Object(a["a"])({url:"/advertising/addAdvertising",method:"post",data:t})}function n(t){return Object(a["a"])({url:"/advertising/deleteAdvertising/"+t,method:"delete"})}function o(t){return Object(a["a"])({url:"/advertising/updateAdvertising",method:"put",data:t})}function s(t){return Object(a["a"])({url:"/advertising/getAdvertising",method:"get",params:t})}function l(t){return Object(a["a"])({url:"/advertising/getAdvertisingList",method:"post",data:t})}},"70f4":function(t,e,r){},"90e7":function(t,e,r){"use strict";r.d(e,"a",(function(){return i})),r.d(e,"c",(function(){return n})),r.d(e,"b",(function(){return o}));var a=r("b775");function i(t){return Object(a["a"])({url:"/setting/addSetting",method:"post",data:t})}function n(t){return Object(a["a"])({url:"/setting/updateSetting",method:"put",data:t})}function o(t){return Object(a["a"])({url:"/setting/getSettingList",method:"post",data:t})}}}]);