chunk-53a18efa.16cfd9ae.js 7.5 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-53a18efa"],{1905:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[a("table-list",{attrs:{"list-loading":t.listLoading,data:t.tableData2,columns:t.listConfig,"current-page":t.currentPage,"page-size":t.pageSize,"total-records":t.totalRecords,isAdd:!0},on:{currentChange:t.pageHandle,sizeChange:t.sizeChange,add:t.openPopup}}),a("popup-edit",{attrs:{isShow:t.isDtlShow,curObj:t.curObj},on:{close:t.closePopup}})],1)},i=[],o=a("2909"),n=(a("d81d"),a("ed08"),a("23cb6")),r=a("a75a"),c=a("4fef"),l={name:"HouseNews",components:{SearchForm:n["default"],PopupEdit:r["default"]},provide:function(){return{parentData:this}},mixins:[c["default"]],data:function(){return{apiStr:"house.admestatenewslist",searchForm:{},isDtlShow:!1,curObj:{}}},computed:{tableData2:function(){var t=Object(o["a"])(this.tableData);return t.map((function(t){})),t}},created:function(){var t=this.$route.query;this.searchForm.estate_id=t.id||""},mounted:function(){this.listConfig={rows:[{label:"发布时间",prop:"news_at",width:"120"},{label:"标题",prop:"title",minWidth:"200"},{label:"动态内容",prop:"trends_cont",minWidth:"500",align:"left"},{label:"创建人",prop:"create_by"},{label:"更新人",prop:"update_by"},{label:"更新时间",prop:"update_at"},{label:"操作",width:120,type:"handle2",operations:[{label:"编辑",func:this.openPopup,btnType:"primary"},{label:"删除",func:this.delHandle,btnType:"danger"}]}]}},methods:{delHandle:function(t){var e=this;this.$msg("您确定要删除该楼盘吗?","confirm",(function(){e.$api.house.admestatenewsdel({estate_news_id:t.id}).then((function(t){e.$msgs("已删除!"),e.fetchData()}))}),null,!0)},openPopup:function(t){t&&t.id?this.curObj=t:this.curObj={},this.isDtlShow=!0},closePopup:function(t){this.isDtlShow=!1,t&&this.fetchData()}}},u=l,d=a("2877"),h=Object(d["a"])(u,s,i,!1,null,null,null);e["default"]=h.exports},"23cb6":function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("base-form",{ref:"ruleForm",attrs:{slot:"content",data:t.searchData},slot:"content"},[a("div",{attrs:{slot:"footer"},slot:"footer"},[a("el-button",{staticClass:"xl-form-btn bgc1",attrs:{loading:t.listLoading,icon:"el-icon-search"},on:{click:t.searchHandle}},[t._v("查询")])],1)])},i=[],o=a("5530"),n={props:{listLoading:Boolean},inject:["parentData"],mixins:mixins,data:function(){return{searchData:[]}},mounted:function(){this.getDef()},methods:{subwayLineChange:function(t){this.getDef("change")},getDef:function(t){var e=Object(o["a"])({},this.$refs.ruleForm.baseForm);this.searchData=[{label:"标题",key:"title"}],this.setDefaultValue(e,"searchData")},searchHandle:function(){var t=this.$refs.ruleForm.baseForm,e=Object(o["a"])({},t);this.$emit("change",e)}}},r=n,c=a("2877"),l=Object(c["a"])(r,s,i,!1,null,null,null);e["default"]=l.exports},"4fef":function(t,e,a){"use strict";a.r(e);var s=a("ade3"),i=a("5530");a("4e82"),a("e9c4"),a("a9e3");e["default"]={data:function(){return{listLoading:!1,tableData:[],currentPage:1,pageSize:10,totalRecords:1,listConfig:{},operations:[]}},created:function(){var t=this;this.$nextTick((function(){t.noCreated||t.fetchData()}))},methods:{searchHandle:function(t){this.currentPage=1,this.searchForm=t,this.fetchData()},sizeChange:function(t){this.pageSize=t,this.currentPage=1,this.fetchData()},pageHandle:function(t){this.currentPage=t,this.fetchData()},sortChange:function(t){this.currentPage=1;var e=Object(i["a"])({},this.searchForm);"ascending"===t.order?e.sort=JSON.stringify(Object(s["a"])({},t.prop,"asc")):e.sort=JSON.stringify(Object(s["a"])({},t.prop,"desc")),this.searchForm=Object(i["a"])({},e),this.fetchData(e)},fetchData:function(t){var e=this;if(this.apiStr){var a={page:this.currentPage,page_size:this.pageSize};t?a=Object(i["a"])(Object(i["a"])({},a),t):this.searchForm&&(a=Object(i["a"])(Object(i["a"])({},a),this.searchForm)),this.getDataBefore&&this.getDataBefore(a),this.listLoading=!0;var s=this.apiStr.split(".");this.$api[s[0]][s[1]](a).then((function(t){return 1===e.currentPage&&(e.pageSize=t.page_size||1),e.totalRecords=t.total?Number(t.total):0,e.tableData=t.list||[],e.listLoading=!1,e.getMoreData&&e.getMoreData(t,a),t})).catch((function(t){e.listLoading=!1}))}}}}},"73fd":function(t,e,a){"use strict";a("a840")},a75a:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-dialog",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{"show-close":!1,"close-on-click-modal":!1,visible:t.isShow,title:t.curObj.id?"编辑楼盘动态":"新增楼盘动态",fullscreen:!1,width:"700px","custom-class":"xl-dialog",center:""},on:{"update:visible":function(e){t.isShow=e}}},[a("base-form",{ref:"ruleForm",staticClass:"lib-edit",attrs:{data:t.formData,"is-inline":!1,"label-width":"110px"}},[a("div",{attrs:{slot:"otherItem"},slot:"otherItem"},[a("div",{staticClass:"scoped-img-area"},[t._l(t.imagesArr,(function(e,s){return a("div",{key:s,staticClass:"sia-op"},[a("img",{staticClass:"img",attrs:{src:e+"_adm0",alt:"img"}}),a("span",{staticClass:"close",on:{click:function(e){return t.imgDel(s)}}})])})),a("el-upload",{staticClass:"sia-img",attrs:{action:t.domainUrl+"/adm/upload/cloud",data:{logic_type:"estate",token:t.token},name:"upload","show-file-list":!1,"on-success":t.roomAreaUploadSuccess,"before-upload":t.roomAreaUploadBefore}},[a("i",{staticClass:"el-icon-plus icon"})])],2)])]),a("div",{staticClass:"xl-form"},[a("div",{staticClass:"xl-form-footer"},[a("el-button",{staticClass:"xl-form-btn t2",on:{click:t.close}},[t._v("关 闭")]),a("el-button",{staticClass:"xl-form-btn t1",on:{click:function(e){return t.close("confirm")}}},[t._v("确定")])],1)])],1)],1)},i=[],o=a("2909"),n=a("5530"),r=(a("a434"),a("a15b"),a("ed08"),{components:{},mixins:mixins,props:{isShow:Boolean,curObj:Object},inject:["parentData"],data:function(){var t=window.sessionStorage.getItem("fp_token"),e="https://api.honglouplus.com";return{domainUrl:e,token:t,loading:!1,formData:[],cObj:{},imagesArr:[]}},watch:{isShow:function(t){t&&this.getDef()}},methods:{imgDel:function(t){this.imagesArr.splice(t,1)},roomAreaUploadSuccess:function(t,e){var a=t.data||{};this.imagesArr.push("".concat(a.url))},roomAreaUploadBefore:function(t){var e="image/jpeg"===t.type.toLowerCase()||"image/png"===t.type.toLowerCase(),a=t.size/1024/1024<500;return e||this.$message.error("上传图片只能是 JPG PNG GIF 格式!"),a||this.$message.error("上传图片大小不能超过 500M!"),e&&a},getDef:function(t){var e={};e=Object(n["a"])({},this.curObj);var a=[];e.images&&(a=e.images.split(",")),this.imagesArr=Object(o["a"])(a),this.formData=[{label:"标题",key:"title"},{label:"时间",key:"news_at",type:"datePicker",type2:"date"},{label:"动态内容",key:"trends_cont",type:"textarea"}],this.setDefaultValue(e)},close:function(t){var e=this;"confirm"===t?this.$refs["ruleForm"].$refs["baseForm"].validate((function(t){if(t){var a=e.$refs.ruleForm.baseForm,s=Object(n["a"])({},a);e.curObj.id&&(s.estate_news_id=e.curObj.id),s.estate_id=e.parentData.searchForm.estate_id,e.imagesArr&&e.imagesArr.length>0&&(s.images=e.imagesArr.join(","));var i="admestatenewsadd";e.curObj.id&&(i="admestatenewsedit"),e.$api.house[i](s).then((function(t){e.$msgs(s.estate_id?"编辑成功":"新增成功"),e.productData=[],e.$emit("close",s)}))}})):(this.$emit("close"),this.productData=[],this.setDefaultValue())}}}),c=r,l=(a("73fd"),a("2877")),u=Object(l["a"])(c,s,i,!1,null,"8967cb16",null);e["default"]=u.exports},a840:function(t,e,a){}}]);