1 line
34 KiB
JavaScript
1 line
34 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-61606984"],{"0ca0":function(e,t,a){},"0ca3":function(e,t,a){},"48a8":function(e,t,a){},"90e7":function(e,t,a){"use strict";a.d(t,"g",(function(){return i})),a.d(t,"m",(function(){return r})),a.d(t,"f",(function(){return o})),a.d(t,"l",(function(){return s})),a.d(t,"h",(function(){return l})),a.d(t,"n",(function(){return c})),a.d(t,"a",(function(){return u})),a.d(t,"b",(function(){return p})),a.d(t,"c",(function(){return d})),a.d(t,"e",(function(){return f})),a.d(t,"d",(function(){return m})),a.d(t,"i",(function(){return h})),a.d(t,"j",(function(){return g})),a.d(t,"o",(function(){return v})),a.d(t,"k",(function(){return b}));var n=a("b775");function i(e){return Object(n["a"])({url:"/hakocompany/DeductionInfo/findById",method:"post",data:e})}function r(e){return Object(n["a"])({url:"/hakocompany/DeductionInfo/update",method:"post",data:e})}function o(e){return Object(n["a"])({url:"/hakocompany/CollectionInfoApi/findById",method:"post",data:e})}function s(e){return Object(n["a"])({url:"/hakocompany/CollectionInfoApi/update",method:"post",data:e})}function l(e){return Object(n["a"])({url:"/hakocompany/ChargePushConfigApi/findById",method:"post",data:e})}function c(e){return Object(n["a"])({url:"/hakocompany/ChargePushConfigApi/update",method:"post",data:e})}function u(e){return Object(n["a"])({url:"/company/ProjectSatisfactionConfig/pageList",method:"post",data:e})}function p(e){return Object(n["a"])({url:"/company/ProjectSatisfactionConfig/update",method:"post",data:e})}function d(e){return Object(n["a"])({url:"/hakocompany/CockpitConfig/create",method:"post",data:e})}function f(e){return Object(n["a"])({url:"/hakocompany/CockpitConfig/findByCompanyIdAndType",method:"post",data:e})}function m(e){return Object(n["a"])({url:"/hakocompany/CockpitConfig/sceneMenuList",method:"post",data:e})}function h(e){return Object(n["a"])({url:"/hakocompany/ProjectConfig/pageList",method:"post",data:e})}function g(e){return Object(n["a"])({url:"/hakocompany/ProjectConfig/updateExponentByProjectUuid",method:"post",data:e})}function v(e,t){return Object(n["a"])({url:"/oss/upload",isFile:!0,isReturnResponse:!0,headers:{"Content-Type":"multipart/form-data;charset=UTF-8"},method:"post",data:e,onUploadProgress:t&&t.onUploadProgress})}function b(e){return Object(n["a"])({url:"/hakocompany/ProjectConfig/updateVisitPollRateByProjectUuid",method:"post",data:e})}},"91d1":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 cardSet"},[a("div",[a("el-tabs",{attrs:{value:e.activeName,type:"border-card"},on:{"tab-click":e.handleClick}},[a("el-tab-pane",{attrs:{label:"项目服务配置",name:"projectServiceConfig"}},["projectServiceConfig"===e.activeName?a("projectServiceConfig",{attrs:{type:2}}):e._e()],1)],1)],1)])},i=[],r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"detailContent"},[a("el-card",{staticClass:"box-card topSearchBoxCard"},[a("div",{ref:"box",staticClass:"searchStys transition_dom"},[a("el-form",{ref:"searchInfo",attrs:{model:e.searchInfo}},[a("div",{ref:"form_box",staticClass:"searchBar"},[a("div",{staticClass:"searchInput"},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{prop:"name"}},[a("el-input",{attrs:{clearable:"",placeholder:"服务名称"},model:{value:e.searchInfo.name,callback:function(t){e.$set(e.searchInfo,"name",t)},expression:"searchInfo.name"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{prop:"type"}},[a("el-select",{attrs:{placeholder:"服务类型",clearable:""},model:{value:e.searchInfo.type,callback:function(t){e.$set(e.searchInfo,"type",t)},expression:"searchInfo.type"}},e._l(e.planCategory,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1)],1)],1),e._v(" "),a("div",{staticClass:"searchBtn"},[a("el-form-item",[a("el-button",{on:{click:function(t){return e.resetForm("searchInfo")}}},[e._v("重置")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.onSearch}},[e._v("查询")]),e._v(" "),e.is_show||"80px"==e.height?e._e():a("el-button",{attrs:{type:"text"},on:{click:e.upAndDown}},[e._v("展开"),a("i",{staticClass:"el-icon-arrow-down"})]),e._v(" "),e.is_show&&"80px"!=e.height?a("el-button",{attrs:{type:"text"},on:{click:e.upAndDown}},[e._v("收起"),a("i",{staticClass:"el-icon-arrow-up"})]):e._e()],1)],1)])])],1)]),e._v(" "),a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("div",{staticClass:"cardHeader"},[a("span",[e._v("服务列表")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.editThisPage}},[e._v("新增服务")])],1)]),e._v(" "),a("div",[a("el-table",{attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},data:e.tableData,align:"center",border:""}},[a("el-table-column",{attrs:{label:"序号",align:"center",width:"80",fixed:""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.$index+(e.searchInfo.pageNumber-1)*e.searchInfo.pageSize+1))])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"服务ID",fixed:""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.codeNumber))]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"服务名称",fixed:""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.name))]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"服务类型"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e._f("getItemType")(t.row.type,e.planCategory)))]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"服务图标"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-image",{staticClass:"bannerImg",attrs:{src:t.row.icon,fit:"contain"}},[a("div",{staticClass:"image-slot",attrs:{slot:"placeholder"},slot:"placeholder"},[e._v("加载中"),a("span",{staticClass:"dot"},[e._v("...")])]),e._v(" "),a("div",{staticClass:"image-error-slot",attrs:{slot:"error"},slot:"error"},[e._v("-")])])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"路由链接","min-width":"100","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.linkUrl))]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"跳转方","min-width":"100","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e._f("getItemType")(t.row.jumpModel,e.jumpTargetList)))]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"备注","min-width":"120","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.remarks))]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作",fixed:"right",width:"160"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.editItem(t.row)}}},[e._v("编辑")])]}}])})],1)],1),e._v(" "),a("div",{staticClass:"paginationSet"},[a("el-pagination",{attrs:{background:"","current-page":e.searchInfo.pageNumber,"page-sizes":[10,30,50,100],"page-size":e.searchInfo.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)]),e._v(" "),a("el-dialog",{attrs:{title:e.dialogTitle,visible:e.dialogFormVisible},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[a("el-form",{ref:"baseServiceForm",attrs:{model:e.baseServiceForm,rules:e.baseServiceFormRules,"label-width":e.formLabelWidth}},[a("el-form-item",{attrs:{label:"服务类型",prop:"type"}},[a("el-select",{attrs:{placeholder:"请选择服务类型"},model:{value:e.baseServiceForm.type,callback:function(t){e.$set(e.baseServiceForm,"type",t)},expression:"baseServiceForm.type"}},e._l(e.planCategory,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"服务名称",prop:"name"}},[a("el-input",{attrs:{placeholder:"请输入所属服务的服务名称",autocomplete:"off",maxlength:"6","show-word-limit":""},model:{value:e.baseServiceForm.name,callback:function(t){e.$set(e.baseServiceForm,"name",t)},expression:"baseServiceForm.name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"跳转方",prop:"jumpModel"}},[a("el-select",{attrs:{placeholder:"请选择所属服务的跳转方"},model:{value:e.baseServiceForm.jumpModel,callback:function(t){e.$set(e.baseServiceForm,"jumpModel",t)},expression:"baseServiceForm.jumpModel"}},e._l(e.jumpTargetList,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),e._v(" "),3===e.baseServiceForm.jumpModel?a("el-form-item",{attrs:{label:"微信appId",prop:"wxAppid",rules:e.wxAppidRules}},[a("el-input",{attrs:{placeholder:"请输入所属服务的微信appId",autocomplete:"off",maxlength:"64","show-word-limit":""},model:{value:e.baseServiceForm.wxAppid,callback:function(t){e.$set(e.baseServiceForm,"wxAppid",t)},expression:"baseServiceForm.wxAppid"}})],1):e._e(),e._v(" "),a("el-form-item",{attrs:{label:"路由链接",prop:"linkUrl"}},[a("el-row",[a("el-col",{attrs:{span:22}},[a("el-input",{attrs:{placeholder:"请输入所属服务的路由地址",maxlength:"300","show-word-limit":""},model:{value:e.baseServiceForm.linkUrl,callback:function(t){e.$set(e.baseServiceForm,"linkUrl",t)},expression:"baseServiceForm.linkUrl"}})],1),e._v(" "),a("el-col",{staticClass:"icon-list__tips",attrs:{span:2}},[a("el-tooltip",{staticStyle:{padding:"10px"},attrs:{placement:"top",effect:"light"}},[a("div",{attrs:{slot:"content"},slot:"content"},[a("p",[e._v("URL格式:")]),e._v(" "),a("p",[e._v("1.常规业务开发的功能URL,如用户管理,目录下页面路径为 /Sys/User, 此处填写 /sys/user。")]),e._v(" "),a("p",[e._v("2.嵌套外部网页,如通过菜单打开百度网页,此处填写 http://www.baidu.com,http:// 不可省略。")]),e._v(" "),a("p",[e._v("示例:用户管理:/sys/user 嵌套百度:http://www.baidu.com 嵌套网页:http://127.0.0.1:8000")])]),e._v(" "),a("i",{staticClass:"el-icon-warning"})])],1)],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"服务图标",prop:"icon"}},[a("uploadOss",{staticClass:"upload-img",attrs:{imgStore:e.imgStore,isShowFileList:!0,listType:e.listType,fileSizeLimit:50,isLimitWH:!1,whLimit:e.whLimit},model:{value:e.baseServiceForm.icon,callback:function(t){e.$set(e.baseServiceForm,"icon",t)},expression:"baseServiceForm.icon"}}),e._v(" "),a("i",{staticClass:"el-icon-info"}),a("i",{staticClass:"notes"},[e._v("图标尺寸为128*128,大小不超过50kB")])],1),e._v(" "),a("el-form-item",{attrs:{label:"服务图标",prop:"remarks"}},[a("el-input",{attrs:{type:"textarea",autocomplete:"off",rows:3,maxlength:"500","show-word-limit":""},model:{value:e.baseServiceForm.remarks,callback:function(t){e.$set(e.baseServiceForm,"remarks",t)},expression:"baseServiceForm.remarks"}})],1)],1),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.dialogFormVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.submitForm("baseServiceForm")}}},[e._v("确 定")])],1)],1)],1)},o=[],s=a("cc57"),l=a("f747"),c=a("dce5"),u={components:{uploadOss:s["a"]},data:function(){return{is_show:!1,height:0,searchInfo:{pageNumber:1,pageSize:10,name:"",type:""},total:0,tableData:[],jumpTargetList:c["S"],planCategory:[{value:1,label:"基础服务"},{value:2,label:"公共服务"},{value:3,label:"生活服务"}],listType:"picture-card",imgStore:"miniBaseService/",whLimit:{w:128,h:128},dialogType:0,dialogTitle:"新增服务",formLabelWidth:"120px",dialogFormVisible:!1,baseServiceForm:{type:"",name:"",jumpModel:null,wxAppid:"",linkUrl:"",icon:"",remarks:""},baseServiceFormRules:{type:[{required:!0,message:"请选择服务类型",trigger:"change"}],name:[{required:!0,message:"请输入服务名称",trigger:"blur"}],jumpModel:[{required:!0,message:"请选择所属服务的跳转方",trigger:"change"}],linkUrl:[{required:!0,message:"请输入服务路由",trigger:"blur"}],icon:[{required:!0,message:"请选择服务图片",trigger:"blur"}]},wxAppidRules:[{required:!0,message:"请输入所属服务的微信appId",trigger:"blur"}]}},mounted:function(){this.getRealHeight(),this.getList()},methods:{getList:function(){var e=this;Object(l["b"])(this.searchInfo).then((function(t){0===t.code&&(e.tableData=t.data.records,e.total=t.data.rowsCount)}))},editThisPage:function(){this.dialogType=0,this.baseServiceForm={type:"",name:"",url:"",imageUrl:"",remark:""},this.dialogFormVisible=!0},editItem:function(e){this.dialogType=1,this.baseServiceForm=Object.assign({},e),this.dialogFormVisible=!0},submitForm:function(e){var t=this;this.$refs[e].validate((function(e){if(e){var a=t.baseServiceForm;0===t.dialogType?Object(l["a"])(a).then((function(e){0===e.code?(t.$message({message:"添加成功",type:"success"}),t.dialogFormVisible=!1,t.getList()):t.$message({message:"添加失败",type:"error"})})):Object(l["k"])(a).then((function(e){0===e.code?(t.$message({message:"编辑成功",type:"success"}),t.dialogFormVisible=!1,t.getList()):t.$message({message:"编辑失败",type:"error"})}))}}))},onSearch:function(){this.searchInfo.pageNumber=1,this.getList()},resetForm:function(e){this.$refs[e].resetFields(),this.searchInfo.pageNumber=1,this.getList()},handleSizeChange:function(e){this.searchInfo.pageSize=e,this.searchInfo.pageNumber=1,this.getList()},handleCurrentChange:function(e){this.searchInfo.pageNumber=e,this.getList()},upAndDown:function(){this.is_show?this.$refs.box.style.height="80px":this.$refs.box.style.height=this.height,this.is_show=!this.is_show},getRealHeight:function(){this.$nextTick((function(){this.height=this.$refs.form_box.offsetHeight+"px"}))},addItem:function(){this.$emit("clickAdd",this.info)}}},p=u,d=(a("c354"),a("829d")),f=Object(d["a"])(p,r,o,!1,null,null,null),m=f.exports,h=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[e.configTop?a("div",[a("div",{staticClass:"topSearch"},[a("el-form",{ref:"searchInfo",staticClass:"demo-form-inline",attrs:{inline:!0,model:e.searchInfo}},[a("el-form-item",{attrs:{label:"小区名称",prop:"name"}},[a("el-input",{attrs:{clearable:"",placeholder:"小区名称"},model:{value:e.searchInfo.name,callback:function(t){e.$set(e.searchInfo,"name",t)},expression:"searchInfo.name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"基础服务",prop:"baseServiceName"}},[a("el-input",{attrs:{clearable:"",placeholder:"基础服务"},model:{value:e.searchInfo.baseServiceName,callback:function(t){e.$set(e.searchInfo,"baseServiceName",t)},expression:"searchInfo.baseServiceName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"公共服务",prop:"businessServiceName"}},[a("el-input",{attrs:{clearable:"",placeholder:"公共服务"},model:{value:e.searchInfo.businessServiceName,callback:function(t){e.$set(e.searchInfo,"businessServiceName",t)},expression:"searchInfo.businessServiceName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"生活服务",prop:"incrementServiceName"}},[a("el-input",{attrs:{clearable:"",placeholder:"生活服务"},model:{value:e.searchInfo.incrementServiceName,callback:function(t){e.$set(e.searchInfo,"incrementServiceName",t)},expression:"searchInfo.incrementServiceName"}})],1),e._v(" "),a("el-form-item",[a("el-button",{on:{click:function(t){return e.resetForm("searchInfo")}}},[e._v("重置")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.onSearch}},[e._v("查询")])],1)],1)],1),e._v(" "),a("div",[a("el-table",{attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},data:e.tableData,align:"center",border:""}},[a("el-table-column",{attrs:{label:"序号",align:"center",width:"80",fixed:""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.$index+(e.searchInfo.pageNumber-1)*e.searchInfo.pageSize+1))])]}}],null,!1,757905432)}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"物业公司名称",fixed:""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.topOrganizationalName||"-"))]}}],null,!1,2331134506)}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"项目名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.name||"-"))]}}],null,!1,2577856951)}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"项目UUID"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.uuid||"-"))]}}],null,!1,3332501149)}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"已启用基础服务","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e.reviewServices(t.row.projectServiceNames,1)))]}}],null,!1,3319840073)}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"已启用公共服务","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e.reviewServices(t.row.projectServiceNames,2)))]}}],null,!1,735666154)}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"已启用生活服务","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e.reviewServices(t.row.projectServiceNames,3)))]}}],null,!1,1018744459)}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作",fixed:"right",width:"160"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.setDetail(t.row)}}},[e._v("服务配置")])]}}],null,!1,4058497101)})],1)],1),e._v(" "),a("div",{staticClass:"paginationSet"},[a("el-pagination",{attrs:{background:"","current-page":e.searchInfo.pageNumber,"page-sizes":[10,30,50,100],"page-size":e.searchInfo.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)]):e._e(),e._v(" "),e.config?a("div",[a("config",{attrs:{info:e.detailInfo},on:{back:e.backList}})],1):e._e()])},g=[],v=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"detailContent"},[a("div",{staticClass:"backBar"},[a("el-card",{attrs:{shadow:"never"}},[a("el-page-header",{attrs:{content:"【"+e.info.topOrganizationalName+"-"+e.info.name+"】服务配置"},on:{back:e.goBack}})],1)],1),e._v(" "),a("el-card",{staticClass:"box-card topSearchBoxCard"},[a("div",{ref:"box",staticClass:"searchStys transition_dom"},[a("el-form",{ref:"searchInfo",attrs:{model:e.searchInfo}},[a("div",{ref:"form_box",staticClass:"searchBar"},[a("div",{staticClass:"searchInput"},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{prop:"name"}},[a("el-input",{attrs:{clearable:"",placeholder:"服务名称"},model:{value:e.searchInfo.name,callback:function(t){e.$set(e.searchInfo,"name",t)},expression:"searchInfo.name"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{prop:"type"}},[a("el-select",{attrs:{placeholder:"服务类型",clearable:""},model:{value:e.searchInfo.type,callback:function(t){e.$set(e.searchInfo,"type",t)},expression:"searchInfo.type"}},e._l(e.planCategory,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{prop:"status"}},[a("el-select",{attrs:{placeholder:"状态",clearable:""},model:{value:e.searchInfo.status,callback:function(t){e.$set(e.searchInfo,"status",t)},expression:"searchInfo.status"}},e._l(e.taskStatus,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1)],1)],1),e._v(" "),a("div",{staticClass:"searchBtn"},[a("el-form-item",[a("el-button",{on:{click:function(t){return e.resetForm("searchInfo")}}},[e._v("重置")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.onSearch}},[e._v("查询")]),e._v(" "),e.is_show||"80px"==e.height?e._e():a("el-button",{attrs:{type:"text"},on:{click:e.upAndDown}},[e._v("展开"),a("i",{staticClass:"el-icon-arrow-down"})]),e._v(" "),e.is_show&&"80px"!=e.height?a("el-button",{attrs:{type:"text"},on:{click:e.upAndDown}},[e._v("收起"),a("i",{staticClass:"el-icon-arrow-up"})]):e._e()],1)],1)])])],1)]),e._v(" "),a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("div",{staticClass:"cardHeader"},[a("span",[e._v("服务列表")])])]),e._v(" "),a("div",[a("el-table",{attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},data:e.tableData,align:"center",border:""}},[a("el-table-column",{attrs:{label:"序号",align:"center",width:"80",fixed:""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.$index+(e.searchInfo.pageNumber-1)*e.searchInfo.pageSize+1))])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"服务ID",fixed:""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.codeNumber))]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"服务名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.name))]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"服务类型",fixed:""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e._f("getItemType")(t.row.type,e.planCategory)))]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"服务图标"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-image",{staticClass:"bannerImg",attrs:{src:t.row.icon,fit:"contain"}},[a("div",{staticClass:"image-slot",attrs:{slot:"placeholder"},slot:"placeholder"},[e._v("加载中"),a("span",{staticClass:"dot"},[e._v("...")])]),e._v(" "),a("div",{staticClass:"image-error-slot",attrs:{slot:"error"},slot:"error"},[e._v("-")])])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.enableTime?"已启用":"未启用"))]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"路由链接",prop:"linkUrl","min-width":"120","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"启用时间",prop:"enableTime","min-width":"180"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"备注","min-width":"120","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.remarks))]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作",fixed:"right",width:"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{class:t.row.enableTime?"textBtn-err":"textBtn-success",attrs:{type:"text"},on:{click:function(a){return e.editItem(t.row)}}},[e._v(e._s(t.row.enableTime?"停用":"启用"))])]}}])})],1)],1),e._v(" "),a("div",{staticClass:"paginationSet"},[a("el-pagination",{attrs:{background:"","current-page":e.searchInfo.pageNumber,"page-sizes":[10,30,50,100],"page-size":e.searchInfo.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)])],1)},b=[],_={props:["info"],data:function(){return{is_show:!1,height:0,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:"未启用"}]}},mounted:function(){this.searchInfo.projectUuid=this.info.uuid,this.getRealHeight(),this.getList()},methods:{getList:function(){var e=this;Object(l["e"])(this.searchInfo).then((function(t){0===t.code&&(e.tableData=t.data.records,e.total=t.data.rowsCount)}))},onSearch:function(){this.searchInfo.pageNumber=1,this.getList()},resetForm:function(e){this.$refs[e].resetFields(),this.searchInfo.pageNumber=1,this.getList()},handleSizeChange:function(e){this.searchInfo.pageSize=e,this.searchInfo.pageNumber=1,this.getList()},handleCurrentChange:function(e){this.searchInfo.pageNumber=e,this.getList()},upAndDown:function(){this.is_show?this.$refs.box.style.height="80px":this.$refs.box.style.height=this.height,this.is_show=!this.is_show},getRealHeight:function(){this.$nextTick((function(){this.height=this.$refs.form_box.offsetHeight+"px"}))},addItem:function(){this.$emit("clickAdd",this.info)},goBack:function(){this.$emit("back")},editItem:function(e){var t=this,a=1,n={isFrequently:a,projectUuid:this.info.uuid},i="";e.configRelaId?(n=Object.assign(n,{id:e.configRelaId}),i="停用"):(n=Object.assign(n,{projectServiceConfigId:e.id}),i="启用"),this.$confirm("确定要".concat(i,"该服务?"),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.configRelaId?Object(l["j"])(n).then((function(e){0===e.code?t.$message({type:"success",message:"操作成功"}):t.$message({type:"error",message:"操作失败"}),t.getList()})):Object(l["i"])(n).then((function(e){0===e.code?t.$message({type:"success",message:"操作成功"}):t.$message({type:"error",message:"操作失败"}),t.getList()}))})).catch((function(){}))}}},y=_,S=(a("d242"),Object(d["a"])(y,v,b,!1,null,null,null)),w=S.exports,k={components:{config:w},data:function(){return{configTop:!0,config:!1,total:0,searchInfo:{pageNumber:1,pageSize:10,name:"",organizationalName:"",baseServiceName:"",businessServiceName:"",incrementServiceName:"",isServiceList:2},tableData:[],detailInfo:{}}},mounted:function(){this.searchInfo.organizationalName=JSON.parse(localStorage.getItem("companyInfo")).fullName,this.getList()},methods:{getList:function(){var e=this;Object(l["d"])(this.searchInfo).then((function(t){e.tableData=t.data.records,e.total=t.data.rowsCount}))},onSearch:function(){this.searchInfo.pageNumber=1,this.getList()},resetForm:function(e){this.$refs[e].resetFields(),this.searchInfo.pageNumber=1,this.getList()},handleSizeChange:function(e){this.searchInfo.pageSize=e,this.searchInfo.pageNumber=1,this.getList()},handleCurrentChange:function(e){this.searchInfo.pageNumber=e,this.getList()},backList:function(){this.configTop=!0,this.config=!1,this.getList()},setDetail:function(e){this.detailInfo=e,this.configTop=!1,this.config=!0},reviewServices:function(e,t){if(null!=e){var a=e[t-1]?e[t-1][t]:"-";return a}return"-"}}},C=k,I=(a("be63"),Object(d["a"])(C,h,g,!1,null,null,null)),x=I.exports,j={components:{basicServices:m,projectServiceConfig:x},data:function(){return{activeName:"projectServiceConfig"}},methods:{handleClick:function(e){var t=e.paneName;this.activeName=t}}},L=j,F=Object(d["a"])(L,n,i,!1,null,"1140ad9a",null);t["default"]=F.exports},b860:function(e,t,a){"use strict";a("d7bc")},be63:function(e,t,a){"use strict";a("0ca3")},c354:function(e,t,a){"use strict";a("48a8")},cc57:function(e,t,a){"use strict";var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[[a("el-upload",{staticClass:"upload-demo",attrs:{action:"","http-request":e.handleUpload,disabled:e.disabled,"on-preview":e.handlePreview,"on-remove":e.handleRemove,"on-success":e.handleSuccess,"before-remove":e.beforeRemove,"show-file-list":e.isShowFileList,accept:e.accept,multiple:e.multiple,limit:e.limit,"on-exceed":e.handleExceed,"file-list":e.fileList,"list-type":e.listType}},["picture-card"!==e.listType?[a("el-button",{attrs:{size:"small",type:"primary"}},[e._v("点击上传")]),e._v(" "),e.disabled?e._e():a("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v("\n 只能上传"+e._s(e.seeTrans[e.uploadType])+"文件,且不超过"+e._s(e.fileSizeLimit)+"MB\n ")])]:[!e.isShowFileList&&e.fileList.length>0?a("img",{staticClass:"avatar",attrs:{src:e.fileList[0].url}}):a("i",{staticClass:"el-icon-picture-outline avatar-uploader-icon"}),e._v(" "),e.disabled?e._e():a("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v("\n 只能上传"+e._s(e.seeTrans[e.uploadType])+"文件,且不超过"+e._s(e.fileSizeLimit)+"MB\n ")])]],2),e._v(" "),a("el-dialog",{attrs:{visible:e.dialogVisible},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("img",{attrs:{width:"100%",src:e.dialogImageUrl,alt:""}})])]],2)},i=[],r=(a("b5aa"),a("3ef1")),o=(a("d31c"),a("aa18"),a("982e"),a("fc02"),a("a450"),a("e680"),a("90e7")),s=(a("4057"),function(){function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return"".concat(+new Date,"_").concat(e()).concat(e())});function l(e){var t=e.lastIndexOf("."),a="";return-1!=t&&(a=e.substring(t)),a}var c={name:"Upload",props:{value:String,tip:{type:String,default:"上传大小不能超过80M"},limit:{type:Number,default:1},action:{type:String,default:""},headers:{type:Object,default:function(){}},name:{type:String,default:""},listType:{type:String,default:"picture"},fileSizeLimit:{type:Number,default:1},accept:{type:String,default:"image/jpeg,image/png,image/JPG,image/jpg,image/PNG"},uploadType:{type:String,default:function(){return"images"}},multiple:{type:Boolean,default:!1},isShowFileList:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},imgStore:{type:String},isChangeFileName:{type:Boolean,default:!0}},data:function(){return{uploadTypeTrans:{images:{accept:"image/jpeg,image/png,image/JPG,image/jpg,image/PNG"},music:{accept:"audio/mp3,video/mp4"},doc:{accept:"text/plain,application/msword,application/excel,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.wordprocessingml.document"},pdf:{accept:"application/pdf"}},seeTrans:{music:"歌曲",images:"图片",doc:"文档",xlsx:"execl文件",pdf:"pdf文档"},dialogVisible:!1,dialogImageUrl:""}},computed:{imageUrl:function(){return this.value},imageName:function(){return null!=this.value&&""!==this.value&&void 0!=this.value?this.value.substr(this.value.lastIndexOf("/")+1):null},fileList:function(){return null!=this.value&&""!==this.value&&void 0!=this.value?[{name:this.imageName?this.imageName:"",url:this.imageUrl?this.imageUrl:""}]:[]},showFileList:{get:function(){return null!==this.value&&""!==this.value&&void 0!==this.value},set:function(e){}}},mounted:function(){this.uploadType&&this.uploadTypeTrans[this.uploadType].accept&&(this.accept=this.uploadTypeTrans[this.uploadType].accept)},methods:{emitInput:function(e){this.$emit("input",e)},handleRemove:function(e,t){this.emitInput("")},handlePreview:function(e){this.dialogImageUrl=e.url,this.dialogVisible=!0},handleExceed:function(e,t){console.log("fileList",t),this.$message.warning("每次只能上传 ".concat(this.limit," 个文件"))},beforeRemove:function(e,t){return this.$confirm("确定移除 ".concat(e.name,"?"))},beforeAvatarUpload:function(e){var t=e.size/1024/1024<this.fileSizeLimit;if(!t)return this.$message.error("上传文件大小不能超过"+this.fileSizeLimit+"MB!"),!1;var a=this.accept.split(","),n=a.some((function(t){return e.type===t.trim()||t.includes("*")&&e.type.startsWith(t.split("*")[0])}));return!(!n&&a.length>0)||(this.$message.error("上传文件类型不符合要求!"),!1)},handleSuccess:function(e,t,a){this.fileList=a,this.$emit("on-success",t,a)},add0:function(e){return e<10?"0"+e:e},getYearMonthDay:function(){var e=new Date,t=e.getFullYear(),a=e.getMonth()+1,n=e.getDate();return""+t+this.add0(a)+this.add0(n)},handleUpload:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(t){var a,n,i,r,c;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,console.log("option",t),a="",a=this.isChangeFileName?s()+l(t.file.name):t.file.name,n=new FormData,n.append("file",t.file),n.append("imgStore",this.imgStore),n.append("fileName",a),n.append("yearMonthDay",this.getYearMonthDay()),e.next=1,Object(o["o"])(n);case 1:if(i=e.sent,!i||!i.data||0!==i.data.code){e.next=2;break}r=i.data.data.fullUrl||i.data.data.url,t.onSuccess({name:t.file.name,url:r}),this.fileList.pop(),this.fileList.push({name:t.file.name,url:r}),this.emitInput(r),this.$message.success("文件上传成功"),e.next=3;break;case 2:throw new Error(i.data.message||"上传失败");case 3:e.next=5;break;case 4:e.prev=4,c=e["catch"](0),console.error("上传失败:",c),this.$message.error("文件上传失败: ".concat(c.message||"未知错误")),t.onError("上传失败");case 5:case"end":return e.stop()}}),e,this,[[0,4]])})));function t(t){return e.apply(this,arguments)}return t}()}},u=c,p=(a("b860"),a("829d")),d=Object(p["a"])(u,n,i,!1,null,"20ab94cc",null);t["a"]=d.exports},d242:function(e,t,a){"use strict";a("0ca0")},d7bc:function(e,t,a){},f747:function(e,t,a){"use strict";a.d(t,"b",(function(){return i})),a.d(t,"a",(function(){return r})),a.d(t,"k",(function(){return o})),a.d(t,"e",(function(){return s})),a.d(t,"i",(function(){return l})),a.d(t,"j",(function(){return c})),a.d(t,"c",(function(){return u})),a.d(t,"h",(function(){return p})),a.d(t,"d",(function(){return d})),a.d(t,"f",(function(){return f})),a.d(t,"g",(function(){return m}));var n=a("b775");function i(e){return Object(n["a"])({url:"/hakocompany/ProjectServiceConfig/pageList",method:"post",data:e})}function r(e){return Object(n["a"])({url:"/hakocompany/ProjectServiceConfig/create",method:"post",data:e})}function o(e){return Object(n["a"])({url:"/hakocompany/ProjectServiceConfig/update",method:"post",data:e})}function s(e){return Object(n["a"])({url:"/hakocompany/ProjectServiceConfig/configPageList",method:"post",data:e})}function l(e){return Object(n["a"])({url:"/hakocompany/ProjectServiceConfigRela/enable",method:"post",data:e})}function c(e){return Object(n["a"])({url:"/hakocompany/ProjectServiceConfigRela/stop",method:"post",data:e})}function u(e){return Object(n["a"])({url:"/hakocompany/ProjectServiceConfigRela/findEnableListByProjectUuid",method:"post",data:e})}function p(e){return Object(n["a"])({url:"/hakocompany/ProjectServiceConfigRela/setFrequently",method:"post",data:e})}function d(e){return Object(n["a"])({url:"/company/organizationalStructure/projectServicePageList",method:"post",data:e})}function f(e){return Object(n["a"])({url:"/hakocompany/MeteringConfig/pageList",method:"post",data:e})}function m(e){return Object(n["a"])({url:"/hakocompany/MeteringConfig/update",method:"post",data:e})}}}]); |