2 lines
14 KiB
JavaScript
2 lines
14 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-45cfb248"],{"16dc":function(o,t,e){"use strict";e.r(t);var n=function(){var o=this,t=o._self._c;return t("div",["addReportCustomComponentRel"!==o.reportCustomComponentRelManageInfo.curComponent?t("div",[t("el-row",[t("el-col",{attrs:{span:24}},[t("el-card",[t("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[t("h5",[o._v(o._s(o.reportCustomComponentRelManageInfo.title)),t("span",[o._v(o._s(o.$t("reportCustomComponentRel.component")))])]),t("div",[t("el-button",{attrs:{size:"small"},on:{click:function(t){return o._goBack()}}},[o._v(" "+o._s(o.$t("reportCustomComponentRel.back"))+" ")]),t("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return o._openAddReportCustomComponentRelModal()}}},[t("i",{staticClass:"el-icon-plus"}),o._v(" "+o._s(o.$t("reportCustomComponentRel.associateComponent"))+" ")])],1)]),t("div",{staticClass:"card-body"},[t("el-table",{staticStyle:{width:"100%"},attrs:{data:o.reportCustomComponentRelManageInfo.reportCustomComponentRels,border:""}},[t("el-table-column",{attrs:{prop:"relId",label:o.$t("reportCustomComponentRel.relId"),align:"center"}}),t("el-table-column",{attrs:{prop:"componentName",label:o.$t("reportCustomComponentRel.component"),align:"center"}}),t("el-table-column",{attrs:{prop:"customId",label:o.$t("reportCustomComponentRel.reportId"),align:"center"}}),t("el-table-column",{attrs:{prop:"seq",label:o.$t("reportCustomComponentRel.componentSeq"),align:"center"}}),t("el-table-column",{attrs:{prop:"createTime",label:o.$t("reportCustomComponentRel.associateTime"),align:"center"}}),t("el-table-column",{attrs:{label:o.$t("reportCustomComponentRel.operation"),align:"center"},scopedSlots:o._u([{key:"default",fn:function(e){return[t("el-button-group",[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return o._openDeleteReportCustomComponentRelModel(e.row)}}},[o._v(" "+o._s(o.$t("reportCustomComponentRel.delete"))+" ")])],1)]}}],null,!1,3101372718)})],1),t("el-pagination",{attrs:{"current-page":o.reportCustomComponentRelManageInfo.conditions.page,"page-size":o.reportCustomComponentRelManageInfo.conditions.row,layout:"total, prev, pager, next",total:o.reportCustomComponentRelManageInfo.total},on:{"current-change":o.handleCurrentChange}})],1)])],1)],1)],1):t("div",[t("add-report-custom-component-rel",{ref:"addReportCustomComponentRel"})],1),t("delete-report-custom-component-rel",{ref:"deleteReportCustomComponentRel"})],1)},r=[],s=e("b775");function p(o){return new Promise((t,e)=>{Object(s["a"])({url:"/reportCustomComponentRel.listReportCustomComponentRel",method:"get",params:o}).then(o=>{const e=o.data;t(e)}).catch(o=>{e(o)})})}function a(o){return new Promise((t,e)=>{Object(s["a"])({url:"/reportCustomComponentRel.saveReportCustomComponentRel",method:"post",data:o}).then(o=>{const e=o.data;t(e)}).catch(o=>{e(o)})})}function l(o){return new Promise((t,e)=>{Object(s["a"])({url:"/reportCustomComponentRel.deleteReportCustomComponentRel",method:"post",data:o}).then(o=>{const e=o.data;t(e)}).catch(o=>{e(o)})})}var m=function(){var o=this,t=o._self._c;return t("el-row",[t("el-col",{attrs:{span:24}},[t("el-card",[t("div",{staticClass:"clearfix flex justify-between",attrs:{slot:"header"},slot:"header"},[t("h5",[t("span",[o._v(o._s(o.$t("addReportCustomComponentRel.associate")))])])]),t("div",{staticClass:"card-body"},[t("el-form",{attrs:{"label-width":"120px"}},[t("el-form-item",{attrs:{label:o.$t("addReportCustomComponentRel.component")}},[t("el-col",{attrs:{span:18}},[t("el-input",{attrs:{disabled:"",placeholder:o.$t("addReportCustomComponentRel.componentRequired")},model:{value:o.addReportCustomComponentRelInfo.name,callback:function(t){o.$set(o.addReportCustomComponentRelInfo,"name",t)},expression:"addReportCustomComponentRelInfo.name"}})],1),t("el-col",{attrs:{span:6}},[t("el-button",{staticStyle:{float:"right"},attrs:{type:"primary"},on:{click:function(t){return o.chooseReportComponent()}}},[o._v(" "+o._s(o.$t("addReportCustomComponentRel.chooseComponent"))+" ")])],1)],1),t("el-form-item",{attrs:{label:o.$t("addReportCustomComponentRel.componentSeq")}},[t("el-input",{attrs:{placeholder:o.$t("addReportCustomComponentRel.seqRequired")},model:{value:o.addReportCustomComponentRelInfo.seq,callback:function(t){o.$set(o.addReportCustomComponentRelInfo,"seq",t)},expression:"addReportCustomComponentRelInfo.seq"}})],1)],1),t("div",{staticStyle:{"text-align":"right","margin-top":"20px"}},[t("el-button",{staticStyle:{"margin-right":"20px"},attrs:{type:"warning"},on:{click:function(t){return o._closeAddReportCustomComponentRelInfo()}}},[o._v(" "+o._s(o.$t("common.cancel"))+" ")]),t("el-button",{attrs:{type:"primary"},on:{click:function(t){return o.saveReportCustomComponentRelInfo()}}},[t("i",{staticClass:"el-icon-check"}),o._v(" "+o._s(o.$t("common.save"))+" ")])],1)],1)])],1),t("choose-report-custom-component",{ref:"chooseReportCustomComponent"})],1)},i=[],u=function(){var o=this,t=o._self._c;return t("el-dialog",{attrs:{title:o.$t("chooseReportCustomComponent.chooseReportComponent"),visible:o.dialogVisible,width:"80%",top:"5vh"},on:{"update:visible":function(t){o.dialogVisible=t}}},[t("el-row",[t("el-col",{attrs:{span:24}},[t("el-card",[t("div",{staticClass:"card-body"},[t("el-row",{staticStyle:{"margin-bottom":"20px"},attrs:{gutter:20}},[t("el-col",{attrs:{span:18}}),t("el-col",{attrs:{span:6}},[t("el-input-group",[t("el-input",{attrs:{placeholder:o.$t("chooseReportCustomComponent.inputComponentName"),size:"small"},model:{value:o.chooseReportCustomComponentInfo._currentReportCustomComponentName,callback:function(t){o.$set(o.chooseReportCustomComponentInfo,"_currentReportCustomComponentName",t)},expression:"chooseReportCustomComponentInfo._currentReportCustomComponentName"}}),t("el-button",{attrs:{slot:"append",type:"primary",size:"small"},on:{click:function(t){return o.queryReportCustomComponents()}},slot:"append"},[o._v(" "+o._s(o.$t("chooseReportCustomComponent.search"))+" ")])],1)],1)],1),t("el-table",{staticStyle:{width:"100%"},attrs:{data:o.chooseReportCustomComponentInfo.reportCustomComponents,border:""}},[t("el-table-column",{attrs:{prop:"componentId",label:o.$t("chooseReportCustomComponent.componentId"),align:"center"}}),t("el-table-column",{attrs:{prop:"name",label:o.$t("chooseReportCustomComponent.componentName"),align:"center"}}),t("el-table-column",{attrs:{prop:"componentType",label:o.$t("chooseReportCustomComponent.componentType"),align:"center"}}),t("el-table-column",{attrs:{prop:"queryModel",label:o.$t("chooseReportCustomComponent.queryModel"),align:"center"}}),t("el-table-column",{attrs:{prop:"remark",label:o.$t("chooseReportCustomComponent.description"),align:"center"}}),t("el-table-column",{attrs:{label:o.$t("chooseReportCustomComponent.operation"),align:"center"},scopedSlots:o._u([{key:"default",fn:function(e){return[t("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(t){return o.chooseReportCustomComponent(e.row)}}},[o._v(" "+o._s(o.$t("chooseReportCustomComponent.choose"))+" ")])]}}])})],1),t("el-pagination",{staticStyle:{"margin-top":"20px"},attrs:{"current-page":o.pagination.currentPage,"page-size":10,layout:"total, prev, pager, next",total:o.pagination.total},on:{"current-change":o.handleCurrentChange}})],1)])],1)],1)],1)},C=[],c=e("ff08"),d={name:"ChooseReportCustomComponent",data(){return{dialogVisible:!1,chooseReportCustomComponentInfo:{reportCustomComponents:[],_currentReportCustomComponentName:"",_curParam:{}},pagination:{currentPage:1,total:0}}},methods:{open(o){this.chooseReportCustomComponentInfo._curParam=o,this.dialogVisible=!0,this._refreshChooseReportCustomComponentInfo(),this._loadAllReportCustomComponentInfo(1,10,"")},async _loadAllReportCustomComponentInfo(o,t,e){try{const n=await Object(c["b"])({page:o,row:t,name:e});this.chooseReportCustomComponentInfo.reportCustomComponents=n.data,this.pagination.total=n.records,this.pagination.currentPage=o}catch(n){console.error("请求失败处理",n)}},chooseReportCustomComponent(o){Object.assign(this.chooseReportCustomComponentInfo._curParam,o),this.dialogVisible=!1},queryReportCustomComponents(){this._loadAllReportCustomComponentInfo(1,10,this.chooseReportCustomComponentInfo._currentReportCustomComponentName)},_refreshChooseReportCustomComponentInfo(){this.chooseReportCustomComponentInfo._currentReportCustomComponentName=""},handleCurrentChange(o){this._loadAllReportCustomComponentInfo(o,10,this.chooseReportCustomComponentInfo._currentReportCustomComponentName)}}},R=d,h=(e("26b8"),e("2877")),f=Object(h["a"])(R,u,C,!1,null,"c64bb180",null),g=f.exports,b={name:"AddReportCustomComponentRel",components:{ChooseReportCustomComponent:g},data(){return{addReportCustomComponentRelInfo:{relId:"",componentId:"",name:"",customId:"",seq:""}}},methods:{open(o){this.addReportCustomComponentRelInfo.customId=o.customId},addReportCustomComponentRelValidate(){return this.$validate.validate({addReportCustomComponentRelInfo:this.addReportCustomComponentRelInfo},{"addReportCustomComponentRelInfo.componentId":[{limit:"required",param:"",errInfo:this.$t("addReportCustomComponentRel.componentRequired")},{limit:"maxLength",param:"30",errInfo:this.$t("addReportCustomComponentRel.componentMaxLength")}],"addReportCustomComponentRelInfo.customId":[{limit:"required",param:"",errInfo:this.$t("addReportCustomComponentRel.reportIdRequired")},{limit:"maxLength",param:"30",errInfo:this.$t("addReportCustomComponentRel.reportIdMaxLength")}],"addReportCustomComponentRelInfo.seq":[{limit:"required",param:"",errInfo:this.$t("addReportCustomComponentRel.seqRequired")},{limit:"maxLength",param:"11",errInfo:this.$t("addReportCustomComponentRel.seqMaxLength")}]})},async saveReportCustomComponentRelInfo(){if(this.addReportCustomComponentRelValidate())try{const o=await a(this.addReportCustomComponentRelInfo);0===o.code?(this.clearAddReportCustomComponentRelInfo(),this.$emit("listReportCustomComponentRel"),this.$message.success(o.msg)):this.$message.error(o.msg)}catch(o){console.error("请求失败处理",o),this.$message.error(o)}else this.$message.error(this.$validate.errInfo)},_closeAddReportCustomComponentRelInfo(){this.$emit("listReportCustomComponentRel")},clearAddReportCustomComponentRelInfo(){this.addReportCustomComponentRelInfo={componentId:"",customId:"",seq:"",name:""}},chooseReportComponent(){this.$refs.chooseReportCustomComponent.open(this.addReportCustomComponentRelInfo)}}},I=b,_=(e("34b7"),Object(h["a"])(I,m,i,!1,null,"6f0c816c",null)),$=_.exports,v=function(){var o=this,t=o._self._c;return t("el-dialog",{attrs:{title:o.$t("deleteReportCustomComponentRel.confirmOperation"),visible:o.dialogVisible,width:"30%",center:""},on:{"update:visible":function(t){o.dialogVisible=t}}},[t("div",{staticStyle:{"text-align":"center"}},[t("p",[o._v(o._s(o.$t("deleteReportCustomComponentRel.confirmDelete")))])]),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){return o.closeDeleteReportCustomComponentRelModel()}}},[o._v(" "+o._s(o.$t("deleteReportCustomComponentRel.cancel"))+" ")]),t("el-button",{attrs:{type:"primary"},on:{click:function(t){return o.deleteReportCustomComponentRel()}}},[o._v(" "+o._s(o.$t("deleteReportCustomComponentRel.confirmDeleteBtn"))+" ")])],1)])},y=[],w=e("7323"),M={name:"DeleteReportCustomComponentRel",data(){return{dialogVisible:!1,deleteReportCustomComponentRelInfo:{}}},methods:{open(o){this.deleteReportCustomComponentRelInfo={...o},this.dialogVisible=!0},async deleteReportCustomComponentRel(){this.deleteReportCustomComponentRelInfo.shopId=Object(w["f"])();try{const o=await l(this.deleteReportCustomComponentRelInfo);0===o.code?(this.$message.success(o.msg),this.dialogVisible=!1,this.$emit("listReportCustomComponentRel")):this.$message.error(o.msg)}catch(o){console.error("请求失败处理",o),this.$message.error(o)}},closeDeleteReportCustomComponentRelModel(){this.dialogVisible=!1}}},q=M,x=Object(h["a"])(q,v,y,!1,null,null,null),k=x.exports,j={name:"ReportCustomComponentRelManage",components:{AddReportCustomComponentRel:$,DeleteReportCustomComponentRel:k},data(){return{reportCustomComponentRelManageInfo:{reportCustomComponentRels:[],total:0,records:1,moreCondition:!1,curComponent:"reportCustomComponentRel",relId:"",title:"",conditions:{page:1,row:10,relId:"",customId:""}}}},created(){this.reportCustomComponentRelManageInfo.conditions.customId=this.$route.query.customId,this.reportCustomComponentRelManageInfo.title=this.$route.query.title,this._listReportCustomComponentRels(1,10)},methods:{handleCurrentChange(o){this._listReportCustomComponentRels(o,this.reportCustomComponentRelManageInfo.conditions.row)},async _listReportCustomComponentRels(o,t){this.reportCustomComponentRelManageInfo.conditions.page=o,this.reportCustomComponentRelManageInfo.conditions.row=t;try{const o=await p(this.reportCustomComponentRelManageInfo.conditions);this.reportCustomComponentRelManageInfo.total=o.total,this.reportCustomComponentRelManageInfo.records=o.records,this.reportCustomComponentRelManageInfo.reportCustomComponentRels=o.data}catch(e){console.error("请求失败处理",e)}},_openAddReportCustomComponentRelModal(){this.reportCustomComponentRelManageInfo.curComponent="addReportCustomComponentRel",this.$refs.addReportCustomComponentRel.open({customId:this.reportCustomComponentRelManageInfo.conditions.customId})},_openDeleteReportCustomComponentRelModel(o){this.$refs.deleteReportCustomComponentRel.open(o)},_goBack(){this.$router.go(-1)}}},V=j,A=(e("cb9a"),Object(h["a"])(V,n,r,!1,null,"6dae2407",null));t["default"]=A.exports},"26b8":function(o,t,e){"use strict";e("2b54")},"2b54":function(o,t,e){},"33a3":function(o,t,e){},"34b7":function(o,t,e){"use strict";e("33a3")},"4c83":function(o,t,e){},cb9a:function(o,t,e){"use strict";e("4c83")},ff08:function(o,t,e){"use strict";e.d(t,"b",(function(){return r}));var n=e("b775");function r(o){return new Promise((t,e)=>{Object(n["a"])({url:"/reportCustomComponent.listReportCustomComponent",method:"get",params:o}).then(o=>{const e=o.data;t(e)}).catch(o=>{e(o)})})}}}]);
|
|
//# sourceMappingURL=chunk-45cfb248.891b9f63.js.map
|