2 lines
18 KiB
JavaScript
2 lines
18 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-046cc33b"],{1947:function(e,t,o){},"356c":function(e,t,o){"use strict";o.r(t);var n=function(){var e=this,t=e._self._c;return t("div",[t("el-card",{},[t("div",{staticClass:"clearfix flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v(e._s(e.$t("reportCustomComponentManage.queryCondition")))])]),t("div",{staticClass:"filter-container"},[t("el-form",{staticClass:"flex justify-start",attrs:{inline:!0,model:e.reportCustomComponentManageInfo.conditions}},[t("el-form-item",[t("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("reportCustomComponentManage.inputComponentId"),clearable:""},model:{value:e.reportCustomComponentManageInfo.conditions.componentId,callback:function(t){e.$set(e.reportCustomComponentManageInfo.conditions,"componentId",t)},expression:"reportCustomComponentManageInfo.conditions.componentId"}})],1),t("el-form-item",[t("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("reportCustomComponentManage.inputComponentName"),clearable:""},model:{value:e.reportCustomComponentManageInfo.conditions.name,callback:function(t){e.$set(e.reportCustomComponentManageInfo.conditions,"name",t)},expression:"reportCustomComponentManageInfo.conditions.name"}})],1),t("el-form-item",[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("reportCustomComponentManage.selectComponentType"),clearable:""},model:{value:e.reportCustomComponentManageInfo.conditions.componentType,callback:function(t){e.$set(e.reportCustomComponentManageInfo.conditions,"componentType",t)},expression:"reportCustomComponentManageInfo.conditions.componentType"}},e._l(e.componentTypeOptions,(function(e){return t("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),t("el-form-item",[t("el-button",{attrs:{type:"primary"},on:{click:e._queryReportCustomComponentMethod}},[t("i",{staticClass:"el-icon-search"}),e._v(" "+e._s(e.$t("reportCustomComponentManage.query"))+" ")]),t("el-button",{on:{click:e._resetReportCustomComponentMethod}},[t("i",{staticClass:"el-icon-refresh"}),e._v(" "+e._s(e.$t("reportCustomComponentManage.reset"))+" ")])],1)],1)],1)]),t("el-card",{staticClass:"margin-top-sm"},[t("div",{staticClass:"clearfix flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v(e._s(e.$t("reportCustomComponentManage.reportComponents")))]),t("el-button",{staticStyle:{float:"right"},attrs:{type:"primary",size:"small"},on:{click:e._openAddReportCustomComponentModal}},[t("i",{staticClass:"el-icon-plus"}),e._v(" "+e._s(e.$t("reportCustomComponentManage.add"))+" ")])],1),t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.reportCustomComponentManageInfo.reportCustomComponents,border:""}},[t("el-table-column",{attrs:{prop:"componentId",label:e.$t("reportCustomComponentManage.componentId"),align:"center"}}),t("el-table-column",{attrs:{prop:"name",label:e.$t("reportCustomComponentManage.componentName"),align:"center"}}),t("el-table-column",{attrs:{prop:"componentType",label:e.$t("reportCustomComponentManage.componentType"),align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s("1001"===t.row.componentType?e.$t("reportCustomComponentManage.table"):e.$t("reportCustomComponentManage.pieChart"))+" ")]}}])}),t("el-table-column",{attrs:{prop:"queryModel",label:e.$t("reportCustomComponentManage.queryMethod"),align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s("1"===t.row.queryModel?"sql":"java")+" ")]}}])}),t("el-table-column",{attrs:{prop:"remark",label:e.$t("reportCustomComponentManage.description"),align:"center"}}),t("el-table-column",{attrs:{label:e.$t("reportCustomComponentManage.operation"),align:"center",width:"300"},scopedSlots:e._u([{key:"default",fn:function(o){return["1001"===o.row.componentType?t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e._openComponentCondition(o.row)}}},[e._v(" "+e._s(e.$t("reportCustomComponentManage.setCondition"))+" ")]):e._e(),"1001"===o.row.componentType?t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e._openComponentFooter(o.row)}}},[e._v(" "+e._s(e.$t("reportCustomComponentManage.footerStatistics"))+" ")]):e._e(),t("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(t){return e._openEditReportCustomComponentModel(o.row)}}},[e._v(" "+e._s(e.$t("reportCustomComponentManage.edit"))+" ")]),t("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(t){return e._openDeleteReportCustomComponentModel(o.row)}}},[e._v(" "+e._s(e.$t("reportCustomComponentManage.delete"))+" ")])]}}])})],1),t("el-pagination",{staticStyle:{"margin-top":"20px","text-align":"right"},attrs:{"current-page":e.currentPage,"page-size":e.pageSize,layout:"total, prev, pager, next",total:e.reportCustomComponentManageInfo.total},on:{"current-change":e.handleCurrentChange}})],1),t("add-report-custom-component",{ref:"addReportCustomComponent"}),t("edit-report-custom-component",{ref:"editReportCustomComponent"}),t("delete-report-custom-component",{ref:"deleteReportCustomComponent"})],1)},a=[],r=o("ff08"),p=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("reportCustomComponentManage.add"),visible:e.dialogVisible,width:"70%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("el-form",{ref:"addForm",attrs:{model:e.addReportCustomComponentInfo,"label-width":"120px","label-position":"right"}},[t("el-form-item",{attrs:{label:e.$t("reportCustomComponentManage.componentName"),prop:"name",rules:[{required:!0,message:e.$t("reportCustomComponentManage.requiredComponentName"),trigger:"blur"},{max:64,message:e.$t("reportCustomComponentManage.maxLength64"),trigger:"blur"}]}},[t("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("reportCustomComponentManage.inputComponentName")},model:{value:e.addReportCustomComponentInfo.name,callback:function(t){e.$set(e.addReportCustomComponentInfo,"name",t)},expression:"addReportCustomComponentInfo.name"}})],1),t("el-form-item",{attrs:{label:e.$t("reportCustomComponentManage.componentType"),prop:"componentType",rules:[{required:!0,message:e.$t("reportCustomComponentManage.requiredComponentType"),trigger:"change"}]}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("reportCustomComponentManage.selectComponentType")},model:{value:e.addReportCustomComponentInfo.componentType,callback:function(t){e.$set(e.addReportCustomComponentInfo,"componentType",t)},expression:"addReportCustomComponentInfo.componentType"}},e._l(e.componentTypeOptions,(function(e){return t("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),t("el-form-item",{attrs:{label:e.$t("reportCustomComponentManage.queryMethod"),prop:"queryModel",rules:[{required:!0,message:e.$t("reportCustomComponentManage.requiredQueryMethod"),trigger:"change"}]}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("reportCustomComponentManage.selectQueryMethod")},model:{value:e.addReportCustomComponentInfo.queryModel,callback:function(t){e.$set(e.addReportCustomComponentInfo,"queryModel",t)},expression:"addReportCustomComponentInfo.queryModel"}},[t("el-option",{attrs:{label:"sql",value:"1"}}),t("el-option",{attrs:{label:"java",value:"2"}})],1)],1),"1"===e.addReportCustomComponentInfo.queryModel?t("el-form-item",{attrs:{label:"sql"}},[t("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",rows:15,placeholder:e.$t("reportCustomComponentManage.inputSql")},model:{value:e.addReportCustomComponentInfo.componentSql,callback:function(t){e.$set(e.addReportCustomComponentInfo,"componentSql",t)},expression:"addReportCustomComponentInfo.componentSql"}})],1):e._e(),"2"===e.addReportCustomComponentInfo.queryModel?t("el-form-item",{attrs:{label:"java"}},[t("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",rows:15,placeholder:e.$t("reportCustomComponentManage.inputJavaScript")},model:{value:e.addReportCustomComponentInfo.javaScript,callback:function(t){e.$set(e.addReportCustomComponentInfo,"javaScript",t)},expression:"addReportCustomComponentInfo.javaScript"}})],1):e._e(),t("el-form-item",{attrs:{label:e.$t("reportCustomComponentManage.description")}},[t("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",placeholder:e.$t("reportCustomComponentManage.inputDescription")},model:{value:e.addReportCustomComponentInfo.remark,callback:function(t){e.$set(e.addReportCustomComponentInfo,"remark",t)},expression:"addReportCustomComponentInfo.remark"}})],1)],1),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v(" "+e._s(e.$t("common.cancel"))+" ")]),t("el-button",{attrs:{type:"primary"},on:{click:e.saveReportCustomComponentInfo}},[e._v(" "+e._s(e.$t("common.save"))+" ")])],1)],1)},s=[],m={name:"AddReportCustomComponent",data(){return{dialogVisible:!1,addReportCustomComponentInfo:{name:"",componentType:"",queryModel:"",componentSql:"",javaScript:"",remark:""},componentTypeOptions:[{value:"1001",label:this.$t("reportCustomComponentManage.table")},{value:"2002",label:this.$t("reportCustomComponentManage.pieChart")}]}},methods:{open(){this.dialogVisible=!0},handleClose(){this.$refs.addForm.resetFields(),this.addReportCustomComponentInfo={name:"",componentType:"",queryModel:"",componentSql:"",javaScript:"",remark:""}},async saveReportCustomComponentInfo(){this.$refs.addForm.validate(async e=>{if(e)try{await Object(r["saveReportCustomComponent"])(this.addReportCustomComponentInfo),this.$message.success(this.$t("reportCustomComponentManage.addSuccess")),this.dialogVisible=!1,this.$emit("refresh")}catch(t){console.error(t)}})}}},l=m,i=o("2877"),u=Object(i["a"])(l,p,s,!1,null,null,null),C=u.exports,c=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("reportCustomComponentManage.edit"),visible:e.dialogVisible,width:"70%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("el-form",{ref:"editForm",attrs:{model:e.editReportCustomComponentInfo,"label-width":"120px","label-position":"right"}},[t("el-form-item",{attrs:{label:e.$t("reportCustomComponentManage.componentName"),prop:"name",rules:[{required:!0,message:e.$t("reportCustomComponentManage.requiredComponentName"),trigger:"blur"},{max:64,message:e.$t("reportCustomComponentManage.maxLength64"),trigger:"blur"}]}},[t("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("reportCustomComponentManage.inputComponentName")},model:{value:e.editReportCustomComponentInfo.name,callback:function(t){e.$set(e.editReportCustomComponentInfo,"name",t)},expression:"editReportCustomComponentInfo.name"}})],1),t("el-form-item",{attrs:{label:e.$t("reportCustomComponentManage.componentType"),prop:"componentType",rules:[{required:!0,message:e.$t("reportCustomComponentManage.requiredComponentType"),trigger:"change"}]}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("reportCustomComponentManage.selectComponentType"),disabled:""},model:{value:e.editReportCustomComponentInfo.componentType,callback:function(t){e.$set(e.editReportCustomComponentInfo,"componentType",t)},expression:"editReportCustomComponentInfo.componentType"}},e._l(e.componentTypeOptions,(function(e){return t("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),t("el-form-item",{attrs:{label:e.$t("reportCustomComponentManage.queryMethod"),prop:"queryModel",rules:[{required:!0,message:e.$t("reportCustomComponentManage.requiredQueryMethod"),trigger:"change"}]}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("reportCustomComponentManage.selectQueryMethod")},model:{value:e.editReportCustomComponentInfo.queryModel,callback:function(t){e.$set(e.editReportCustomComponentInfo,"queryModel",t)},expression:"editReportCustomComponentInfo.queryModel"}},[t("el-option",{attrs:{label:"sql",value:"1"}}),t("el-option",{attrs:{label:"java",value:"2"}})],1)],1),"1"===e.editReportCustomComponentInfo.queryModel?t("el-form-item",{attrs:{label:"sql"}},[t("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",rows:15,placeholder:e.$t("reportCustomComponentManage.inputSql")},model:{value:e.editReportCustomComponentInfo.componentSql,callback:function(t){e.$set(e.editReportCustomComponentInfo,"componentSql",t)},expression:"editReportCustomComponentInfo.componentSql"}})],1):e._e(),"2"===e.editReportCustomComponentInfo.queryModel?t("el-form-item",{attrs:{label:"java"}},[t("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",rows:15,placeholder:e.$t("reportCustomComponentManage.inputJavaScript")},model:{value:e.editReportCustomComponentInfo.javaScript,callback:function(t){e.$set(e.editReportCustomComponentInfo,"javaScript",t)},expression:"editReportCustomComponentInfo.javaScript"}})],1):e._e(),t("el-form-item",{attrs:{label:e.$t("reportCustomComponentManage.description")}},[t("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",placeholder:e.$t("reportCustomComponentManage.inputDescription")},model:{value:e.editReportCustomComponentInfo.remark,callback:function(t){e.$set(e.editReportCustomComponentInfo,"remark",t)},expression:"editReportCustomComponentInfo.remark"}})],1)],1),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v(" "+e._s(e.$t("common.cancel"))+" ")]),t("el-button",{attrs:{type:"primary"},on:{click:e.editReportCustomComponent}},[e._v(" "+e._s(e.$t("common.save"))+" ")])],1)],1)},d=[],f={name:"EditReportCustomComponent",data(){return{dialogVisible:!1,editReportCustomComponentInfo:{componentId:"",name:"",componentType:"",queryModel:"",componentSql:"",javaScript:"",remark:""},componentTypeOptions:[{value:"1001",label:this.$t("reportCustomComponentManage.table")},{value:"2002",label:this.$t("reportCustomComponentManage.pieChart")}]}},methods:{open(e){this.editReportCustomComponentInfo={...e},this.dialogVisible=!0},handleClose(){this.$refs.editForm.resetFields()},async editReportCustomComponent(){this.$refs.editForm.validate(async e=>{if(e)try{await Object(r["updateReportCustomComponent"])(this.editReportCustomComponentInfo),this.$message.success(this.$t("reportCustomComponentManage.editSuccess")),this.dialogVisible=!1,this.$emit("refresh")}catch(t){console.error(t)}})}}},g=f,h=Object(i["a"])(g,c,d,!1,null,null,null),b=h.exports,y=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("reportCustomComponentManage.confirmOperation"),visible:e.dialogVisible,width:"30%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("div",{staticStyle:{"text-align":"center"}},[t("p",[e._v(e._s(e.$t("reportCustomComponentManage.confirmDeleteComponent")))])]),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v(" "+e._s(e.$t("reportCustomComponentManage.cancel"))+" ")]),t("el-button",{attrs:{type:"primary",loading:e.loading},on:{click:e.deleteReportCustomComponent}},[e._v(" "+e._s(e.$t("reportCustomComponentManage.confirmDelete"))+" ")])],1)])},M=[],v={name:"DeleteReportCustomComponent",data(){return{dialogVisible:!1,deleteReportCustomComponentInfo:{},loading:!1}},methods:{open(e){this.deleteReportCustomComponentInfo={...e},this.dialogVisible=!0},handleClose(){this.deleteReportCustomComponentInfo={}},async deleteReportCustomComponent(){this.loading=!0;try{await Object(r["deleteReportCustomComponent"])(this.deleteReportCustomComponentInfo),this.$message.success(this.$t("reportCustomComponentManage.deleteSuccess")),this.dialogVisible=!1,this.$emit("refresh")}catch(e){console.error(e)}finally{this.loading=!1}}}},$=v,R=Object(i["a"])($,y,M,!1,null,null,null),I=R.exports,_={name:"ReportCustomComponentManage",components:{AddReportCustomComponent:C,EditReportCustomComponent:b,DeleteReportCustomComponent:I},data(){return{reportCustomComponentManageInfo:{reportCustomComponents:[],total:0,conditions:{componentId:"",name:"",componentType:""}},componentTypeOptions:[{value:"1001",label:this.$t("reportCustomComponentManage.table")},{value:"2002",label:this.$t("reportCustomComponentManage.pieChart")},{value:"3003",label:this.$t("reportCustomComponentManage.input")},{value:"4004",label:this.$t("reportCustomComponentManage.select")},{value:"5005",label:this.$t("reportCustomComponentManage.date")}],currentPage:1,pageSize:10}},created(){this._listReportCustomComponents(this.currentPage,this.pageSize)},methods:{async _listReportCustomComponents(e,t){try{const o={page:e,rows:t,...this.reportCustomComponentManageInfo.conditions},n=await Object(r["b"])(o);this.reportCustomComponentManageInfo.reportCustomComponents=n.data,this.reportCustomComponentManageInfo.total=n.total}catch(o){console.error(o)}},_queryReportCustomComponentMethod(){this.currentPage=1,this._listReportCustomComponents(this.currentPage,this.pageSize)},_resetReportCustomComponentMethod(){this.reportCustomComponentManageInfo.conditions={componentId:"",name:"",componentType:""},this._queryReportCustomComponentMethod()},_openAddReportCustomComponentModal(){this.$refs.addReportCustomComponent.open()},_openEditReportCustomComponentModel(e){this.$refs.editReportCustomComponent.open(e)},_openDeleteReportCustomComponentModel(e){this.$refs.deleteReportCustomComponent.open(e)},_openComponentCondition(e){this.$router.push({path:"/pages/dev/componentConditionManage",query:{componentId:e.componentId,componentName:e.name}})},_openComponentFooter(e){this.$router.push({path:"/pages/dev/reportCustomComponentFooterManage",query:{componentId:e.componentId,componentName:e.name}})},handleCurrentChange(e){this.currentPage=e,this._listReportCustomComponents(this.currentPage,this.pageSize)}}},q=_,S=(o("de9e"),Object(i["a"])(q,n,a,!1,null,"0b93ce66",null));t["default"]=S.exports},de9e:function(e,t,o){"use strict";o("1947")},ff08:function(e,t,o){"use strict";o.d(t,"b",(function(){return a}));var n=o("b775");function a(e){return new Promise((t,o)=>{Object(n["a"])({url:"/reportCustomComponent.listReportCustomComponent",method:"get",params:e}).then(e=>{const o=e.data;t(o)}).catch(e=>{o(e)})})}}}]);
|
|
//# sourceMappingURL=chunk-046cc33b.bc2a554f.js.map
|