You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
11 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5e705ef8"],{7428:function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t._self._c;return e("div",{staticClass:"main-content"},[t._m(0),e("div",{staticClass:"content"},[e("div",{staticClass:"content-btn"},[e("el-button",{staticClass:"init-button",attrs:{icon:"el-icon-plus"},on:{click:function(e){return t.add()}}},[t._v("新增公告")])],1),e("div",{},[e("VueTable",{ref:"table",attrs:{config:t.config},on:{tableCheck:t.tableCheck}},[e("template",{slot:"footer"},[e("div",{staticClass:"table-footer"},[e("button",{on:{click:function(e){return t.edit(t.table_row)}}},[t._v("修改")]),e("button",{on:{click:function(e){return t.del(t.table_row)}}},[t._v("删除")])])])],2)],1),e("Drawer",{attrs:{drawerTitle:t.addEidtTitle,drawerVrisible:t.addEidt_vrisible},on:{drawerClose:t.addEidtClose}},[e("div",{staticStyle:{padding:"30px"}},[e("FromCard",[e("template",{slot:"title"},[t._v("基本信息")]),[e("VueForm",{ref:"addEidtForm",attrs:{formObj:t.addEidtForm}},[e("template",{slot:"pushObject"},[e("el-radio",{attrs:{label:-1},model:{value:t.addEidtForm.ruleForm.pushObject,callback:function(e){t.$set(t.addEidtForm.ruleForm,"pushObject",e)},expression:"addEidtForm.ruleForm.pushObject"}},[t._v("全体业主")]),e("div",{staticStyle:{margin:"6px 0"}},[e("el-radio",{attrs:{label:-2},model:{value:t.addEidtForm.ruleForm.pushObject,callback:function(e){t.$set(t.addEidtForm.ruleForm,"pushObject",e)},expression:"addEidtForm.ruleForm.pushObject"}},[t._v("全体租户")])],1),e("div",{staticStyle:{margin:"6px 0"}},[e("el-radio",{attrs:{label:1},model:{value:t.addEidtForm.ruleForm.pushObject,callback:function(e){t.$set(t.addEidtForm.ruleForm,"pushObject",e)},expression:"addEidtForm.ruleForm.pushObject"}},[t._v("自定义楼栋")])],1),e("div",[e("el-select",{staticStyle:{width:"240px"},attrs:{disabled:t.BuildDisabled,placeholder:"请选择楼栋"},model:{value:t.BuildID,callback:function(e){t.BuildID=e},expression:"BuildID"}},t._l(t.options,(function(t){return e("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1)],1),e("template",{slot:"pushStatus"},[e("el-radio",{attrs:{label:1},model:{value:t.addEidtForm.ruleForm.pushStatus,callback:function(e){t.$set(t.addEidtForm.ruleForm,"pushStatus",e)},expression:"addEidtForm.ruleForm.pushStatus"}},[t._v("实时推送")]),e("div",{staticStyle:{margin:"6px 0"}},[e("el-radio",{attrs:{label:2},model:{value:t.addEidtForm.ruleForm.pushStatus,callback:function(e){t.$set(t.addEidtForm.ruleForm,"pushStatus",e)},expression:"addEidtForm.ruleForm.pushStatus"}},[t._v("定时推送")])],1),e("div",[e("el-date-picker",{attrs:{disabled:t.timeDisabled,"value-format":"yyyy-MM-dd HH:mm:ss",type:"datetime",placeholder:"选择日期时间",align:"right"},model:{value:t.addEidtForm.ruleForm.timingPush,callback:function(e){t.$set(t.addEidtForm.ruleForm,"timingPush",e)},expression:"addEidtForm.ruleForm.timingPush"}})],1)],1)],2)]],2)],1),e("div",{attrs:{slot:"footer"},slot:"footer"},[e("button",{staticClass:"btn-orange",on:{click:function(e){return t.addEidtSubmit()}}},[e("span",[e("i",{staticClass:"el-icon-circle-check"}),t._v("提交")])]),e("button",{staticClass:"btn-gray",on:{click:t.addEidtClose}},[e("span",[t._v("取消")])])])])],1)])},n=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"main-titel"},[e("span",[t._v("通知管理")])])}],i=r("2b74"),u=r("c356"),o={data(){return{addEidtTitle:"",addEidt_vrisible:!1,timeDisabled:!0,BuildDisabled:!0,BuildID:null,options:null,editId:null,addEidtForm:{ruleForm:{title:null,content:null,suffix:null,pushObject:null,timingPush:null,pushStatus:null},form_item:[{type:"Input",label:"通知标题",placeholder:"请输入",width:"100%",prop:"title"},{type:"textarea",label:"通知内容",placeholder:"请输入",width:"100%",rows:5,prop:"content"},{type:"Input",label:"通知后缀",placeholder:"请输入",width:"100%",prop:"suffix"},{type:"Slot",label:"推送对象",placeholder:"请输入",width:"100%",prop:"pushObject",slotName:"pushObject"},{type:"Slot",label:"推送时间",placeholder:"请输入",width:"100%",prop:"pushStatus",slotName:"pushStatus"}],rules:{typeName:[{required:!0}],marker:[{required:!0,message:"请输入费用项目名称",trigger:"blur"}]}},table_row:[],config:{thead:[{label:"序号",type:"index",width:"80"},{label:"通知标题",prop:"title",width:"auto"},{label:"app阅读量",prop:"readingVolume",width:"auto"},{label:"推送状态",prop:"pushStatus",width:"auto"},{label:"短信状态",prop:"1",width:"auto"},{label:"创建人",prop:"createName",width:"auto"},{label:"更新时间",prop:"updateDate",width:"auto"}],table_data:[],url:"notificationManagementList",search_item:[{type:"Input",label:"通知标题",placeholder:"请输入内容",prop:"title"},{type:"select",label:"推送状态",value:"",options:[{label:"已推送",value:"1"},{label:"未推送",value:"2"}],placeholder:"请选择推送状态",prop:"pushStatus"}],data:{pageNum:1,size:10}}}},created(){Object(i["m"])().then(t=>{this.options=t})},computed:{},methods:{add(){this.addEidt_vrisible=!0},edit(t){t.length>1?this.$message.error("只能查看一条数据的详情"):t.length?Object(u["t"])({id:this.table_row[0].id}).then(t=>{console.log(t),this.editId=t.id,this.addEidtForm.ruleForm.title=t.title,this.addEidtForm.ruleForm.content=t.content,this.addEidtForm.ruleForm.suffix=t.suffix,this.addEidtForm.ruleForm.timingPush=t.timingPush,this.addEidtForm.ruleForm.pushStatus=t.pushStatus,-1!==t.pushObject&&-2!==t.pushObject?(this.BuildID=t.pushObject,this.addEidtForm.ruleForm.pushObject=1):this.addEidtForm.ruleForm.pushObject=t.pushObject,this.addEidt_vrisible=!0}):this.$message.error("请选择")},addEidtSubmit(){let t={title:this.addEidtForm.ruleForm.title,content:this.addEidtForm.ruleForm.content,suffix:this.addEidtForm.ruleForm.suffix,pushObject:this.BuildID,timingPush:this.addEidtForm.ruleForm.timingPush,pushStatus:this.addEidtForm.ruleForm.pushStatus};for(let e in t)if("pushObject"==e){if(1===this.addEidtForm.ruleForm.pushObject&&!this.BuildID)return this.$message.error("选择楼栋"),void console.log(t);1!==this.addEidtForm.ruleForm.pushObject&&(t.pushObject=this.addEidtForm.ruleForm.pushObject,console.log(t))}else if(!t[e]){let r=this.addEidtForm.form_item.find(t=>e===t.prop);return this.$message.error("请填写"+r.label),void console.log(t)}this.editId?(t.id=this.editId,Object(u["v"])(t).then(e=>{console.log(t),e.status&&(this.$message({message:e.message,type:"success"}),this.addEidtClose(),this.$refs.table.loadData())})):Object(u["u"])(t).then(t=>{console.log(t),t.status&&(this.$message({message:t.message,type:"success"}),this.addEidtClose(),this.$refs.table.loadData())})},addEidtClose(){this.addEidt_vrisible=!1,this.editId=null,this.BuildID=null;for(let t in this.addEidtForm.ruleForm)this.addEidtForm.ruleForm[t]=null},tableCheck(t){this.table_row=t},del(t){if(t.length){let t=[];for(let e=0;e<this.table_row.length;e++)t.push(this.table_row[e].id);this.$confirm("是否确认删除?删除不可恢复","删除",{confirmButtonText:"确定",cancelButtonText:"取消",confirmButtonClass:"confirmButton",cancelButtonClass:"cancelButton"}).then(()=>{this.$refs.table.tableDelete(t)}).catch(t=>{})}else this.$message.error("请选中需要删除的数据")}},watch:{"addEidtForm.ruleForm.pushStatus":{handler(t){if(2===t)this.timeDisabled=!1;else{this.timeDisabled=!0;let t=new Date,e="-",r=":",a=t.getMonth()+1,n=t.getDate();a>=1&&a<=9&&(a="0"+a),n>=0&&n<=9&&(n="0"+n);let i=t.getFullYear()+e+a+e+n+" "+t.getHours()+r+t.getMinutes()+r+t.getSeconds();this.addEidtForm.ruleForm.timingPush=i}},immediate:!0},"addEidtForm.ruleForm.pushObject":{handler(t){this.BuildDisabled=1!==t},immediate:!0}}},d=o,s=(r("772f"),r("2877")),l=Object(s["a"])(d,a,n,!1,null,"15565552",null);e["default"]=l.exports},"772f":function(t,e,r){"use strict";r("df8f")},c356:function(t,e,r){"use strict";r.d(e,"g",(function(){return n})),r.d(e,"u",(function(){return i})),r.d(e,"t",(function(){return u})),r.d(e,"v",(function(){return o})),r.d(e,"a",(function(){return d})),r.d(e,"d",(function(){return s})),r.d(e,"c",(function(){return l})),r.d(e,"b",(function(){return c})),r.d(e,"e",(function(){return m})),r.d(e,"x",(function(){return h})),r.d(e,"z",(function(){return p})),r.d(e,"w",(function(){return f})),r.d(e,"f",(function(){return b})),r.d(e,"h",(function(){return g})),r.d(e,"y",(function(){return F})),r.d(e,"m",(function(){return E})),r.d(e,"o",(function(){return v})),r.d(e,"l",(function(){return O})),r.d(e,"q",(function(){return w})),r.d(e,"r",(function(){return S})),r.d(e,"p",(function(){return y})),r.d(e,"n",(function(){return _})),r.d(e,"i",(function(){return j})),r.d(e,"s",(function(){return T})),r.d(e,"k",(function(){return C})),r.d(e,"j",(function(){return q}));var a=r("b775");r("2c37");function n(t){return a["a"].request({method:"POST",url:"/announcementManagement/release",data:t})}function i(t){return a["a"].request({method:"POST",url:"/notificationManagement/insert",data:t})}function u(t){return a["a"].request({method:"GET",url:"/notificationManagement/findById",params:t})}function o(t){return a["a"].request({method:"POST",url:"/notificationManagement/update",data:t})}function d(t){return a["a"].request({method:"GET",url:"/activityManagement/findById",params:t})}function s(t){return a["a"].request({method:"POST",url:"/activityManagement/update",data:t})}function l(t){return a["a"].request({method:"POST",url:"/activityManagement/insert",data:t})}function c(t){return a["a"].request({method:"GET",url:"/activityManagement/findRegistrationById",params:t})}function m(t){return a["a"].request({method:"GET",url:"/announcementManagement/findById",params:t})}function h(t){return a["a"].request({method:"POST",url:"/sponsorManagement/insert",data:t})}function p(t){return a["a"].request({method:"POST",url:"/sponsorManagement/update",data:t})}function f(t){return a["a"].request({method:"GET",url:"/sponsorManagement/findById",params:t})}function b(t){return a["a"].request({method:"POST",url:"/announcementManagement/insert",data:t})}function g(t){return a["a"].request({method:"POST",url:"/announcementManagement/update",data:t})}function F(t){return a["a"].request({method:"GET",url:"/sponsorManagement/list",params:t})}function E(t){return a["a"].request({method:"POST",url:"/newsCategoryManagement/insert",data:t})}function v(t){return a["a"].request({method:"POST",url:"/newsCategoryManagement/update",data:t})}function O(t){return a["a"].request({method:"GET",url:"/newsCategoryManagement/findById",params:t})}function w(t){return a["a"].request({method:"POST",url:"/newsManagement/insert",data:t})}function S(t){return a["a"].request({method:"POST",url:"/newsManagement/update",data:t})}function y(t){return a["a"].request({method:"GET",url:"/newsManagement/findById",params:t})}function _(t){return a["a"].request({method:"GET",url:"/newsCategoryManagement/list",params:t})}function j(t){return a["a"].request({method:"POST",url:"electronicCommerceCategory/insert",data:t})}function T(t){return a["a"].request({method:"GET",url:"newsManagement/updateCrawling",params:t})}function C(t){return a["a"].request({method:"POST",url:"electronicCommerce/insert",data:t})}function q(t){return a["a"].request({method:"GET",url:"/electronicCommerceCategory/list",params:t})}},df8f:function(t,e,r){}}]);
//# sourceMappingURL=chunk-5e705ef8.8d95d02d.js.map