1 line
34 KiB
JavaScript
1 line
34 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-332bda58"],{"14e8":function(t,e,n){},"2d76":function(t,e,n){},"445c":function(t,e,n){"use strict";n("bf4a")},"6ea68":function(t,e,n){"use strict";n("14e8")},"6fbc":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"app-container cardSet"},[t.list?n("div",[n("el-tabs",{attrs:{type:"border-card"},model:{value:t.homeActive,callback:function(e){t.homeActive=e},expression:"homeActive"}},[n("el-tab-pane",{attrs:{label:"Banner管理",name:"banner"}},["banner"===t.homeActive?n("Banner",{ref:"bannerList",on:{clickBatch:t.addBannerBatch,clickDetail:t.setDetail}}):t._e()],1),t._v(" "),n("el-tab-pane",{attrs:{label:"常用功能管理",name:"projectServiceConfig"}},["projectServiceConfig"===t.homeActive?n("projectServiceConfig"):t._e()],1)],1)],1):t._e(),t._v(" "),t.add?n("Add",{ref:"addBanner",attrs:{type:t.addType},on:{back:t.backList}}):t._e(),t._v(" "),t.detail?n("Detail",{ref:"bannerDetail",attrs:{info:t.detailInfo},on:{back:t.backList,clickAdd:t.addBannerItem}}):t._e()],1)},i=[],r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"topSearch"},[n("el-form",{ref:"searchInfo",staticClass:"demo-form-inline",attrs:{inline:!0,model:t.searchInfo}},[n("el-form-item",{attrs:{label:"小区名称",prop:"name"}},[n("el-input",{attrs:{clearable:"",placeholder:"小区名称"},model:{value:t.searchInfo.name,callback:function(e){t.$set(t.searchInfo,"name",e)},expression:"searchInfo.name"}})],1),t._v(" "),n("el-form-item",[n("el-button",{on:{click:function(e){return t.resetForm("searchInfo")}}},[t._v("重置")]),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:t.onSearch}},[t._v("查询")])],1)],1)],1),t._v(" "),n("div",{staticClass:"tableBtn"},[n("el-button",{attrs:{type:"primary"},on:{click:t.addAll}},[t._v("批量设置")])],1),t._v(" "),n("div",[n("el-table",{attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},data:t.tableData,align:"center",border:""}},[n("el-table-column",{attrs:{label:"序号",align:"center",width:"80",fixed:""},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.$index+(t.searchInfo.pageNumber-1)*t.searchInfo.pageSize+1))])]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"物业公司名称",fixed:""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.topOrganizationalName||"-"))]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"项目名称"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.name||"-"))]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"轮播图"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-image",{staticStyle:{width:"150px",height:"75px"},attrs:{src:t.getImgFirst(e.row.imageUrls),"preview-src-list":t.getImgList(e.row.imageUrls)}},[n("span",{staticStyle:{"line-height":"75px"},attrs:{slot:"error"},slot:"error"},[t._v("-")])])]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"发布时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.imageUrlsUpdateTime||"-"))]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"操作",fixed:"right",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.setDetail(e.row)}}},[t._v("设置")])]}}])})],1)],1),t._v(" "),n("div",{staticClass:"paginationSet"},[n("el-pagination",{attrs:{background:"","current-page":t.searchInfo.pageNumber,"page-sizes":[10,30,50,100],"page-size":t.searchInfo.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)])},o=[],s=(n("fc02"),n("f6b0")),c={data:function(){return{total:0,searchInfo:{pageNumber:1,pageSize:10,name:"",organizationalName:"",isSlideshow:1},tableData:[]}},mounted:function(){this.searchInfo.organizationalName=JSON.parse(localStorage.getItem("companyInfo")).fullName,this.getList()},methods:{getList:function(){var t=this;Object(s["b"])(this.searchInfo).then((function(e){t.tableData=e.data.records,t.total=e.data.rowsCount}))},getImgList:function(t){if(t){var e=t.split(",");return e}return[]},getImgFirst:function(t){if(t){var e=t.split(",");return e[0]}return""},onSearch:function(){this.searchInfo.pageNumber=1,this.getList()},resetForm:function(t){this.$refs[t].resetFields(),this.searchInfo.pageNumber=1,this.getList()},handleSizeChange:function(t){this.searchInfo.pageSize=t,this.searchInfo.pageNumber=1,this.getList()},handleCurrentChange:function(t){this.searchInfo.pageNumber=t,this.getList()},addAll:function(){this.$emit("clickBatch")},setDetail:function(t){this.$emit("clickDetail",t)}}},l=c,u=(n("cfb9"),n("829d")),d=Object(u["a"])(l,r,o,!1,null,null,null),h=d.exports,f=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"backBar"},[n("el-card",{attrs:{shadow:"never"}},[n("el-page-header",{attrs:{content:"轮播图设置"},on:{back:t.goBack}})],1)],1),t._v(" "),n("div",[n("el-card",{staticClass:"box-card",attrs:{shadow:"never"}},[n("el-form",{ref:"addForm",staticClass:"demo-ruleForm",staticStyle:{"margin-top":"20px"},attrs:{model:t.addForm,rules:t.rules,"label-width":"100px"}},[n("el-form-item",{staticClass:"addContent",attrs:{label:"轮播图",prop:"name"}},[n("el-upload",{class:{AddBtn:!t.showBtn},attrs:{"list-type":"picture-card",action:"",limit:6,"http-request":t.uploadImg,"on-success":t.handleAvatarSuccess,"before-upload":t.beforeAvatarUpload,"on-remove":t.removeImg,accept:".jpg,.jpeg,.png","file-list":t.addForm.imgList}},[n("i",{staticClass:"el-icon-plus"}),t._v(" "),n("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[n("div",{staticClass:"uploadTip"},[t._v("1. 图片允许分辨率为690*300,格式为jpg/png文件")]),t._v(" "),n("div",{staticClass:"uploadTip"},[t._v("2. 每次最多上传6张图片,且不超过500kb")])])])],1),t._v(" "),"item"==t.type?n("el-form-item",{attrs:{label:"适用范围",prop:"name"}},[n("el-input",{staticStyle:{width:"500px"},attrs:{disabled:!0},model:{value:t.testTxt,callback:function(e){t.testTxt=e},expression:"testTxt"}})],1):t._e(),t._v(" "),"batch"==t.type?n("el-form-item",{attrs:{label:"适用范围",prop:"name"}},[n("div",{staticClass:"selectCommunity"},[t.projectList.length>0?n("el-card",{staticClass:"box-card",staticStyle:{"margin-top":"20px"},attrs:{shadow:"never"}},[n("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[n("span",[t._v("小区")])]),t._v(" "),n("div",[n("el-checkbox",{attrs:{indeterminate:t.isIndeterminateProject},on:{change:t.changeAllProject},model:{value:t.checkAllProject,callback:function(e){t.checkAllProject=e},expression:"checkAllProject"}},[t._v("全选")]),t._v(" "),n("div",{staticStyle:{margin:"15px 0"}}),t._v(" "),n("el-checkbox-group",{on:{change:t.changeProject},model:{value:t.checkedProjectList,callback:function(e){t.checkedProjectList=e},expression:"checkedProjectList"}},t._l(t.projectList,(function(e){return n("el-checkbox",{key:e.id,attrs:{label:e.uuid}},[t._v(t._s(e.name))])})),1)],1)]):t._e()],1)]):t._e(),t._v(" "),n("el-form-item",[n("el-button",{attrs:{type:"primary"},on:{click:t.onSubmit}},[t._v("确认发布")]),t._v(" "),n("el-button",{on:{click:t.goBack}},[t._v("取消")])],1)],1)],1)],1)])},p=[],m=(n("d31c"),n("b5aa"),n("3ef1")),g=(n("aa18"),n("1bc7"),n("a450"),n("90e7")),b=n("e862"),v={props:["type"],data:function(){return{testTxt:"物业公司-小区",companyList:[],companyIds:[],checkAllCompany:!1,isIndeterminateCompany:!1,checkedCompanyList:[],projectList:[],projectIds:[],checkAllProject:!1,isIndeterminateProject:!1,checkedProjectList:[],showBtn:!0,addForm:{imgList:[]},rules:{},info:{}}},mounted:function(){this.getAllCompany()},methods:{init:function(t){console.log(t),this.info=t,this.testTxt="".concat(this.info.topOrganizationalName).concat("-"+this.info.name)},getAllCompany:function(){var t=JSON.parse(localStorage.getItem("companyInfo")).osId;this.checkedCompanyList=[t],this.getSelectProject(t)},getSelectProject:function(t){var e=this;Object(b["f"])({id:t}).then((function(t){t&&t.data?(e.projectList=t.data,t.data.forEach((function(t){e.projectIds.push(t.uuid)})),e.checkAllProject=!0,e.checkedProjectList=e.projectIds):(e.projectList=[],e.projectIds=[],e.checkedProjectList=[],e.selectProject=[])}))},beforeAvatarUpload:function(t){var e=this,n=["image/jpeg","image/png"],a=n.includes(t.type),i=t.size/1024<500;if(!a)return this.$message.error("上传图片只能是 jpg、png 格式!"),!1;if(!i)return this.$message.error("上传图片大小不能超过 500kb !"),!1;var r=new Promise((function(e,n){var a=690,i=300,r=window.URL||window.webkitURL,o=new Image;o.onload=function(){var t=o.width==a&&o.height==i;t?e():n()},o.src=r.createObjectURL(t)})).then((function(){return t}),(function(){return e.$message.error("上传图片尺寸不符合,推荐分辨率 690*300 !"),Promise.reject()}));return a&&i&&r},uploadImg:function(){var t=Object(m["a"])(regeneratorRuntime.mark((function t(e){var n,a,i,r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,n=e.file,a=new FormData,a.append("file",n),t.next=1,Object(g["o"])(a);case 1:if(i=t.sent,!i||!i.data||0!==i.data.code){t.next=2;break}r=i.data.data.fullUrl,e.onSuccess({name:n.name,url:r},n),this.$message.success("图片上传成功"),t.next=3;break;case 2:throw new Error(i.data.message||"上传失败");case 3:t.next=5;break;case 4:t.prev=4,o=t["catch"](0),console.error("上传失败:",o),this.$message.error("图片上传失败: ".concat(o.message||"未知错误")),e.onError("上传失败");case 5:case"end":return t.stop()}}),t,this,[[0,4]])})));function e(e){return t.apply(this,arguments)}return e}(),handleAvatarSuccess:function(t,e,n){t&&t.url&&(e.url=t.url,e.response=t),this.addForm.imgList=n.map((function(t){return t.response&&t.response.url&&(t.url=t.response.url),t.url&&t.url.startsWith("blob:")&&t.response&&t.response.url&&(t.url=t.response.url),t})),this.addForm.imgList.length>=6&&(this.showBtn=!1)},removeImg:function(t,e){this.addForm.imgList=e,this.addForm.imgList.length>=6?this.showBtn=!1:this.showBtn=!0},changeAllCompany:function(t){this.checkedCompanyList=t?this.companyIds:[],this.isIndeterminateCompany=!1,this.projectList=[],this.projectIds=[]},changeCompany:function(t){var e=t.length;this.checkAllCompany=e===this.companyIds.length,this.isIndeterminateCompany=e>0&&e<this.companyIds.length,this.checkedCompanyList=t,1==t.length?this.getSelectProject(t[0]):(this.projectIds=[],this.projectList=[],this.checkedProjectList=[],this.selectProject=[])},changeAllProject:function(t){this.checkedProjectList=t?this.projectIds:[],this.selectProject=t?this.projectIds:[],this.isIndeterminateProject=!1},changeProject:function(t){var e=t.length;this.checkAllProject=e===this.projectIds.length,this.isIndeterminateProject=e>0&&e<this.projectIds.length,this.checkedProjectList=t},onSubmit:function(){if(!this.addForm.imgList.length)return this.$message({message:"请先上传banner图!",type:"warning"}),!1;var t=[];if(this.addForm.imgList.forEach((function(e){var n="";e.response&&e.response.url?n=e.response.url:e.url&&!e.url.startsWith("blob:")&&(n=e.url),n?t.push({imageName:e.name,imageUrl:n}):console.warn("图片未上传成功,跳过:",e.name)})),0===t.length)return this.$message({message:"请确保所有图片都已上传成功!",type:"warning"}),!1;if("item"==this.type){var e={companyIdList:[this.info.id],imageList:t,projectUuidList:[this.info.uuid],createBy:"系统管理员",setSource:3};this.postAdd(e)}else{console.log(this.checkedCompanyList),console.log(this.checkedProjectList);var n={};if(!(this.checkedCompanyList.length>0))return this.$message({message:"请选择物业公司和小区!",type:"warning"}),!1;if(1==this.checkedCompanyList.length&&this.checkedProjectList.length<=0)return this.$message({message:"请选择当前公司下的小区!",type:"warning"}),!1;n=1==this.checkedCompanyList.length?{companyIdList:this.checkedCompanyList,projectUuidList:this.checkedProjectList,imageList:t,createBy:"系统管理员",setSource:3}:{companyIdList:this.checkedCompanyList,imageList:t,createBy:"系统管理员",setSource:3},this.postAdd(n)}},postAdd:function(t){var e=this;Object(b["a"])(t).then((function(t){e.$message({type:"success",message:"上传成功!"}),e.goBack()}))},goBack:function(){"item"==this.type?this.$emit("back","item"):this.$emit("back","batch")}}},y=v,k=(n("c78e"),Object(u["a"])(y,f,p,!1,null,null,null)),_=k.exports,j=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"detailContent"},[n("div",{staticClass:"backBar"},[n("el-card",{attrs:{shadow:"never"}},[n("el-page-header",{attrs:{content:"轮播设置【"+t.info.topOrganizationalName+"-"+t.info.name+"】"},on:{back:t.goBack}})],1)],1),t._v(" "),n("el-tabs",{attrs:{type:"border-card"},model:{value:t.detailActive,callback:function(e){t.detailActive=e},expression:"detailActive"}},[n("el-tab-pane",{attrs:{label:"当前轮播图",name:"active"}},[n("div",{staticClass:"tableBtn"},[n("el-button",{attrs:{type:"warning"},on:{click:t.stopAllBanner}},[t._v("全部停用")])],1),t._v(" "),n("div",[n("el-table",{ref:"table",attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},data:t.usedList,align:"center","row-key":"time",border:""}},[n("el-table-column",{attrs:{label:"序号",type:"index",align:"center",width:"80"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"轮播图"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-image",{staticStyle:{width:"150px",height:"75px"},attrs:{src:e.row.imageUrl,"preview-src-list":[e.row.imageUrl]}},[n("span",{staticStyle:{"line-height":"75px"},attrs:{slot:"error"},slot:"error"},[t._v("-")])])]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"启用时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.updateDate||"-"))]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"启用人"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.createBy||"-"))]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"操作",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{staticClass:"textBtn-err",attrs:{type:"text"},on:{click:function(n){return t.stopBanner(e.row)}}},[t._v("停用")])]}}])})],1)],1)]),t._v(" "),n("el-tab-pane",{attrs:{label:"轮播图图集",name:"list"}},[n("div",{staticClass:"tableBtn"},[n("el-button",{attrs:{type:"danger"},on:{click:t.batchDelBanner}},[t._v("批量删除")]),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:t.addItem}},[t._v("新增")])],1),t._v(" "),n("div",[n("el-table",{attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},data:t.allList,align:"center",border:""},on:{"selection-change":t.selectionChange}},[n("el-table-column",{attrs:{align:"center",type:"selection",width:"55"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"轮播图"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-image",{staticStyle:{width:"150px",height:"75px"},attrs:{src:e.row.imageUrl,"preview-src-list":[e.row.imageUrl]}},[n("span",{staticStyle:{"line-height":"75px"},attrs:{slot:"error"},slot:"error"},[t._v("-")])])]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(1==e.row.isEnable?"已启用":"未启用"))])]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"创建时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.updateDate||"-"))]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"创建人"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.createBy||"-"))]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"操作",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{class:0==e.row.isEnable?"textBtn-success":"textBtn-err",attrs:{type:"text"},on:{click:function(n){return t.startBanner(e.row)}}},[t._v(t._s(0==e.row.isEnable?"启用":"停用"))]),t._v(" "),n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.delBanner(e.row)}}},[t._v("删除")])]}}])})],1)],1),t._v(" "),n("div",{staticClass:"paginationSet"},[n("el-pagination",{attrs:{background:"","current-page":t.imgList.pageNumber,"page-sizes":[10,30,50,100],"page-size":t.imgList.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)])],1)],1)},L=[],I=n("e7e2"),C=n.n(I),S={props:["info"],data:function(){return{total:0,imgList:{pageNumber:1,pageSize:10},usedList:[],allList:[],selectIds:[],detailActive:"active"}},mounted:function(){this.getAllList(),this.getUsedList();var t=document.querySelector(".el-table__body-wrapper tbody"),e=this;C.a.create(t,{onEnd:function(t){e.usedList.splice(t.newIndex,0,e.usedList.splice(t.oldIndex,1)[0]);var n=e.usedList.slice(0);e.usedList=[],e.$nextTick((function(){e.usedList=n,e.postSort(e.usedList)}))}})},methods:{getAllList:function(){var t=this;this.imgList.companyId=this.info.id,this.imgList.projectUuid=this.info.uuid,Object(b["c"])(this.imgList).then((function(e){t.allList=e.data.records,t.total=e.data.rowsCount}))},getUsedList:function(){var t=this,e={companyId:this.info.id,projectUuid:this.info.uuid,isEnable:1};Object(b["c"])(e).then((function(e){t.usedList=e.data.records}))},postSort:function(t){var e=this,n=t;n.forEach((function(t,e){t.sort=e+1})),Object(b["g"])({sortList:n}).then((function(t){e.$message({message:"排序设置成功",type:"success"}),e.getUsedList()}))},stopBanner:function(t){var e=this;this.$confirm("此操作将停用该启用的banner图, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var n={id:t.id,projectUuid:e.info.uuid,stopAll:0};Object(b["h"])(n).then((function(t){e.$message({type:"success",message:"停用设置成功!"}),e.getAllList(),e.getUsedList()}))})).catch((function(){}))},stopAllBanner:function(){var t=this;this.$confirm("此操作将停用所有已启用的banner图, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var e={stopAll:1,projectUuid:t.info.uuid};Object(b["h"])(e).then((function(e){t.$message({type:"success",message:"停用所有设置成功!"}),t.getAllList(),t.getUsedList()}))})).catch((function(){}))},startBanner:function(t){var e=this,n={id:t.id,projectUuid:this.info.uuid};Object(b["d"])(n).then((function(t){e.$message({type:"success",message:"启用设置成功!"}),e.getAllList(),e.getUsedList()}))},selectionChange:function(t){var e=this;this.selectIds=[],t.length>0?t.forEach((function(t){e.selectIds.push(t.id)})):this.selectIds=[]},batchDelBanner:function(){var t=this;if(!this.selectIds.length)return this.$message({message:"请选择要删除的banner图!",type:"warning"}),!1;this.$confirm("此操作将删除所选的banner图, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.delItem(t.selectIds)})).catch((function(){}))},delBanner:function(t){var e=this;this.$confirm("此操作将删除当前banner图, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.delItem([t.id])})).catch((function(){}))},delItem:function(t){var e=this,n={idList:t};Object(b["b"])(n).then((function(t){e.$message({type:"success",message:"删除成功!"}),e.getAllList(),e.getUsedList()}))},handleSizeChange:function(t){this.imgList.pageSize=t,this.imgList.pageNumber=1,this.getAllList()},handleCurrentChange:function(t){this.imgList.pageNumber=t,this.getAllList()},addItem:function(){this.$emit("clickAdd",this.info)},goBack:function(){this.$emit("back")}}},w=S,x=(n("445c"),Object(u["a"])(w,j,L,!1,null,null,null)),O=x.exports,B=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.configTop?n("div",[n("div",{staticClass:"topSearch"},[n("el-form",{ref:"searchInfo",staticClass:"demo-form-inline",attrs:{inline:!0,model:t.searchInfo}},[n("el-form-item",{attrs:{label:"小区名称",prop:"name"}},[n("el-input",{attrs:{clearable:"",placeholder:"小区名称"},model:{value:t.searchInfo.name,callback:function(e){t.$set(t.searchInfo,"name",e)},expression:"searchInfo.name"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"服务名称",prop:"frequentlyServiceName"}},[n("el-input",{attrs:{clearable:"",placeholder:"服务名称"},model:{value:t.searchInfo.frequentlyServiceName,callback:function(e){t.$set(t.searchInfo,"frequentlyServiceName",e)},expression:"searchInfo.frequentlyServiceName"}})],1),t._v(" "),n("el-form-item",[n("el-button",{on:{click:function(e){return t.resetForm("searchInfo")}}},[t._v("重置")]),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:t.onSearch}},[t._v("查询")])],1)],1)],1),t._v(" "),n("div",[n("el-table",{attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},data:t.tableData,align:"center",border:""}},[n("el-table-column",{attrs:{label:"序号",align:"center",width:"80",fixed:""},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.$index+(t.searchInfo.pageNumber-1)*t.searchInfo.pageSize+1))])]}}],null,!1,757905432)}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"物业公司名称",fixed:""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.topOrganizationalName||"-"))]}}],null,!1,2331134506)}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"项目名称"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.name||"-"))]}}],null,!1,2577856951)}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"常用服务","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.projectServiceNames||"-"))]}}],null,!1,1400937388)}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"操作",fixed:"right",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.setDetail(e.row)}}},[t._v("编辑")])]}}],null,!1,261008517)})],1)],1),t._v(" "),n("div",{staticClass:"paginationSet"},[n("el-pagination",{attrs:{background:"","current-page":t.searchInfo.pageNumber,"page-sizes":[10,30,50,100],"page-size":t.searchInfo.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)]):t._e(),t._v(" "),t.config?n("div",[n("config",{attrs:{info:t.detailInfo},on:{back:t.backList}})],1):t._e()])},P=[],A=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"detailContent"},[n("div",{staticClass:"backBar"},[n("el-card",{attrs:{shadow:"never"}},[n("el-page-header",{attrs:{content:"常用服务配置"},on:{back:t.goBack}})],1)],1),t._v(" "),n("el-card",{staticClass:"box-card"},[n("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[n("div",{staticClass:"cardHeader"},[n("div",{staticClass:"header-notes"},[n("div",{staticClass:"header-notes-title"},[t._v("物业公司:")]),n("el-input",{attrs:{disabled:"",readonly:""},model:{value:t.info.topOrganizationalName,callback:function(e){t.$set(t.info,"topOrganizationalName",e)},expression:"info.topOrganizationalName"}})],1),t._v(" "),n("div",{staticClass:"header-notes"},[n("div",{staticClass:"header-notes-title"},[t._v("项目名称:")]),n("el-input",{attrs:{disabled:"",readonly:""},model:{value:t.info.name,callback:function(e){t.$set(t.info,"name",e)},expression:"info.name"}})],1)]),t._v(" "),n("div",{staticClass:"cardHeader"},[n("span",[t._v("设置常用服务 "),n("i",{staticClass:"el-icon-question notes-icons"}),n("i",{staticClass:"notes"},[t._v("必须且仅能设置4个常用服务")])])])]),t._v(" "),t.tableData.serviceList?n("div",{staticClass:"serviceList"},t._l(t.tableData.serviceList[0],(function(e,a){return n("div",{key:a,staticClass:"serviceItem"},[n("div",{staticClass:"serviceItemTitle"},[t._v(t._s("1"===a?"基础服务":"2"===a?"公共服务":"生活服务")+":")]),t._v(" "),n("div",{staticClass:"serviceItemConfiglist"},t._l(e,(function(e,a){return n("el-checkbox",{key:a,attrs:{"true-label":1,"false-label":0,disabled:!0===t.checkBoxDisabled&&0===e.isFrequently},on:{change:function(n){return t.setThisIsFrequently(n,e)}},model:{value:e.isFrequently,callback:function(n){t.$set(e,"isFrequently",n)},expression:"it.isFrequently"}},[t._v(t._s(e.name))])})),1)])})),0):n("div",{staticClass:"nodata-notes"},[t._v("\n 暂无已启用的服务,请在对应项目配置相关服务\n ")])])],1)},$=[],z=(n("b3d7"),n("f747")),N={props:["info"],data:function(){return{searchInfo:{pageNumber:1,pageSize:10,name:"",status:"",type:"",projectUuid:""},total:0,tableData:{},planCategory:[{value:1,label:"基础服务"},{value:2,label:"公共服务"},{value:3,label:"生活服务"}],taskStatus:[{value:1,label:"已启用"},{value:2,label:"未启用"}],hasSelect:0}},computed:{checkBoxDisabled:function(){for(var t=this.tableData.serviceList[0],e=0,n=0,a=Object.values(t);n<a.length;n++){var i=a[n];i.map((function(t){1===t.isFrequently&&++e}))}return this.hasSelect=e,!(e<4)}},mounted:function(){this.searchInfo.projectUuid=this.info.uuid,this.getList()},methods:{getList:function(){var t=this;Object(z["c"])(this.searchInfo).then((function(e){0===e.code&&(t.tableData=e.data)}))},onSearch:function(){this.searchInfo.pageNumber=1,this.getList()},resetForm:function(t){this.$refs[t].resetFields(),this.searchInfo.pageNumber=1,this.getList()},handleSizeChange:function(t){this.searchInfo.pageSize=t,this.searchInfo.pageNumber=1,this.getList()},handleCurrentChange:function(t){this.searchInfo.pageNumber=t,this.getList()},addItem:function(){this.$emit("clickAdd",this.info)},goBack:function(){this.$emit("back")},setThisIsFrequently:function(t,e){var n=this;console.log("val",t),console.log("row",e);var a={isFrequently:1===t?1:2,id:e.id,projectUuid:this.info.uuid};if(this.hasSelect>4)return this.$message({type:"error",message:"设置常用服务,必须且仅能设置4个常用服务"}),!1;Object(z["h"])(a).then((function(t){0===t.code?n.$message({type:"success",message:"更新成功"}):n.$message({type:"error",message:"更新失败"})}))}}},U=N,T=(n("6ea68"),Object(u["a"])(U,A,$,!1,null,null,null)),D=T.exports,F={components:{config:D},data:function(){return{configTop:!0,config:!1,total:0,searchInfo:{pageNumber:1,pageSize:10,name:"",organizationalName:"",frequentlyServiceName:"",isServiceList:1},tableData:[],detailInfo:{}}},mounted:function(){this.searchInfo.organizationalName=JSON.parse(localStorage.getItem("companyInfo")).fullName,this.getList()},methods:{getList:function(){var t=this;Object(z["d"])(this.searchInfo).then((function(e){t.tableData=e.data.records,t.total=e.data.rowsCount}))},onSearch:function(){this.searchInfo.pageNumber=1,this.getList()},resetForm:function(t){this.$refs[t].resetFields(),this.searchInfo.pageNumber=1,this.getList()},handleSizeChange:function(t){this.searchInfo.pageSize=t,this.searchInfo.pageNumber=1,this.getList()},handleCurrentChange:function(t){this.searchInfo.pageNumber=t,this.getList()},backList:function(){this.configTop=!0,this.config=!1,this.getList()},setDetail:function(t){this.detailInfo=t,this.configTop=!1,this.config=!0}}},E=F,q=(n("d31a"),Object(u["a"])(E,B,P,!1,null,null,null)),R=q.exports,M={components:{Banner:h,Add:_,Detail:O,projectServiceConfig:R},data:function(){return{list:!0,add:!1,detail:!1,homeActive:"banner",detailInfo:{}}},mounted:function(){},methods:{addBannerItem:function(t){console.log(t),this.addType="item",this.list=!1,this.add=!0,this.detail=!1,this.$nextTick((function(){this.$refs.addBanner.init(t)}))},addBannerBatch:function(){this.addType="batch",this.list=!1,this.add=!0,this.detail=!1},setDetail:function(t){this.detailInfo=t,this.list=!1,this.add=!1,this.detail=!0},backList:function(t){"item"==t?(this.list=!1,this.add=!1,this.detail=!0,this.$nextTick((function(){this.$refs.bannerDetail.detailActive="list",this.$refs.bannerDetail.getAllList(),this.$refs.bannerDetail.getUsedList()}))):(this.list=!0,this.add=!1,this.detail=!1,this.$nextTick((function(){this.$refs.bannerList.getList()})))}}},J=M,H=(n("8b49"),Object(u["a"])(J,a,i,!1,null,null,null));e["default"]=H.exports},"8b49":function(t,e,n){"use strict";n("fe2e")},"90e7":function(t,e,n){"use strict";n.d(e,"g",(function(){return i})),n.d(e,"m",(function(){return r})),n.d(e,"f",(function(){return o})),n.d(e,"l",(function(){return s})),n.d(e,"h",(function(){return c})),n.d(e,"n",(function(){return l})),n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return d})),n.d(e,"c",(function(){return h})),n.d(e,"e",(function(){return f})),n.d(e,"d",(function(){return p})),n.d(e,"i",(function(){return m})),n.d(e,"j",(function(){return g})),n.d(e,"o",(function(){return b})),n.d(e,"k",(function(){return v}));var a=n("b775");function i(t){return Object(a["a"])({url:"/hakocompany/DeductionInfo/findById",method:"post",data:t})}function r(t){return Object(a["a"])({url:"/hakocompany/DeductionInfo/update",method:"post",data:t})}function o(t){return Object(a["a"])({url:"/hakocompany/CollectionInfoApi/findById",method:"post",data:t})}function s(t){return Object(a["a"])({url:"/hakocompany/CollectionInfoApi/update",method:"post",data:t})}function c(t){return Object(a["a"])({url:"/hakocompany/ChargePushConfigApi/findById",method:"post",data:t})}function l(t){return Object(a["a"])({url:"/hakocompany/ChargePushConfigApi/update",method:"post",data:t})}function u(t){return Object(a["a"])({url:"/company/ProjectSatisfactionConfig/pageList",method:"post",data:t})}function d(t){return Object(a["a"])({url:"/company/ProjectSatisfactionConfig/update",method:"post",data:t})}function h(t){return Object(a["a"])({url:"/hakocompany/CockpitConfig/create",method:"post",data:t})}function f(t){return Object(a["a"])({url:"/hakocompany/CockpitConfig/findByCompanyIdAndType",method:"post",data:t})}function p(t){return Object(a["a"])({url:"/hakocompany/CockpitConfig/sceneMenuList",method:"post",data:t})}function m(t){return Object(a["a"])({url:"/hakocompany/ProjectConfig/pageList",method:"post",data:t})}function g(t){return Object(a["a"])({url:"/hakocompany/ProjectConfig/updateExponentByProjectUuid",method:"post",data:t})}function b(t,e){return Object(a["a"])({url:"/oss/upload",isFile:!0,isReturnResponse:!0,headers:{"Content-Type":"multipart/form-data;charset=UTF-8"},method:"post",data:t,onUploadProgress:e&&e.onUploadProgress})}function v(t){return Object(a["a"])({url:"/hakocompany/ProjectConfig/updateVisitPollRateByProjectUuid",method:"post",data:t})}},b3d7:function(t,e,n){var a=n("e99b"),i=n("d3ef")(!1);a(a.S,"Object",{values:function(t){return i(t)}})},bf4a:function(t,e,n){},c78e:function(t,e,n){"use strict";n("e7c6")},cfb9:function(t,e,n){"use strict";n("d24a")},d24a:function(t,e,n){},d31a:function(t,e,n){"use strict";n("2d76")},d3ef:function(t,e,n){var a=n("26df"),i=n("93ca"),r=n("3471"),o=n("35d4").f;t.exports=function(t){return function(e){var n,s=r(e),c=i(s),l=c.length,u=0,d=[];while(l>u)n=c[u++],a&&!o.call(s,n)||d.push(t?[n,s[n]]:s[n]);return d}}},e7c6:function(t,e,n){},e862:function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"e",(function(){return r})),n.d(e,"i",(function(){return o})),n.d(e,"f",(function(){return s})),n.d(e,"c",(function(){return c})),n.d(e,"g",(function(){return l})),n.d(e,"d",(function(){return u})),n.d(e,"h",(function(){return d})),n.d(e,"b",(function(){return h}));var a=n("b775");function i(t){return Object(a["a"])({url:"/hakocompany/ProjectImageManagement/batchSetMultiCompany",method:"post",data:t})}function r(t){return Object(a["a"])({url:"/company/organizationalStructure/findById",method:"post",data:t})}function o(t){return Object(a["a"])({url:"/company/organizationalStructure/updateAgeConf",method:"post",data:t})}function s(t){return Object(a["a"])({url:"/company/organizationalStructure/findProjectListByCompanyId",method:"post",data:t})}function c(t){return Object(a["a"])({url:"/hakocompany/ProjectImageManagement/pageList",method:"post",data:t})}function l(t){return Object(a["a"])({url:"/hakocompany/ProjectImageManagement/sort",method:"post",data:t})}function u(t){return Object(a["a"])({url:"/hakocompany/ProjectImageManagement/enable",method:"post",data:t})}function d(t){return Object(a["a"])({url:"/hakocompany/ProjectImageManagement/stop",method:"post",data:t})}function h(t){return Object(a["a"])({url:"/hakocompany/ProjectImageManagement/deleteBatch",method:"post",data:t})}},f6b0:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return r}));var a=n("b775");function i(t){return Object(a["a"])({url:"/company/organizationalStructure/findAllPageList",method:"post",data:t})}function r(t){return Object(a["a"])({url:"/hakocompany/TaskStatisticsReport/exportProjectReport",method:"POST",responseType:"blob",data:t})}},f747:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return r})),n.d(e,"k",(function(){return o})),n.d(e,"e",(function(){return s})),n.d(e,"i",(function(){return c})),n.d(e,"j",(function(){return l})),n.d(e,"c",(function(){return u})),n.d(e,"h",(function(){return d})),n.d(e,"d",(function(){return h})),n.d(e,"f",(function(){return f})),n.d(e,"g",(function(){return p}));var a=n("b775");function i(t){return Object(a["a"])({url:"/hakocompany/ProjectServiceConfig/pageList",method:"post",data:t})}function r(t){return Object(a["a"])({url:"/hakocompany/ProjectServiceConfig/create",method:"post",data:t})}function o(t){return Object(a["a"])({url:"/hakocompany/ProjectServiceConfig/update",method:"post",data:t})}function s(t){return Object(a["a"])({url:"/hakocompany/ProjectServiceConfig/configPageList",method:"post",data:t})}function c(t){return Object(a["a"])({url:"/hakocompany/ProjectServiceConfigRela/enable",method:"post",data:t})}function l(t){return Object(a["a"])({url:"/hakocompany/ProjectServiceConfigRela/stop",method:"post",data:t})}function u(t){return Object(a["a"])({url:"/hakocompany/ProjectServiceConfigRela/findEnableListByProjectUuid",method:"post",data:t})}function d(t){return Object(a["a"])({url:"/hakocompany/ProjectServiceConfigRela/setFrequently",method:"post",data:t})}function h(t){return Object(a["a"])({url:"/company/organizationalStructure/projectServicePageList",method:"post",data:t})}function f(t){return Object(a["a"])({url:"/hakocompany/MeteringConfig/pageList",method:"post",data:t})}function p(t){return Object(a["a"])({url:"/hakocompany/MeteringConfig/update",method:"post",data:t})}},fe2e:function(t,e,n){}}]); |