(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4a8a51e6"],{3277:function(e,t,o){"use strict";o("7314")},7314:function(e,t,o){},b37b:function(e,t,o){"use strict";o.r(t);var n=function(){var e=this,t=e._self._c;return t("div",[t("el-row",[t("el-col",{attrs:{span:24}},[t("el-card",{staticClass:"box-card"},[t("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v(e._s(e.componentConditionManageInfo.componentName)+" "+e._s(e.$t("componentConditionManage.condition")))]),t("div",[t("el-button",{attrs:{size:"small"},on:{click:function(t){return e._goBack()}}},[e._v(e._s(e.$t("common.back")))]),t("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e._openAddComponentConditionModal()}}},[t("i",{staticClass:"el-icon-plus"}),e._v(e._s(e.$t("common.add"))+" ")])],1)]),t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.componentConditionManageInfo.componentConditions,border:"",stripe:""}},[t("el-table-column",{attrs:{prop:"conditionId",label:e.$t("componentConditionManage.conditionId"),align:"center",width:"120"}}),t("el-table-column",{attrs:{prop:"name",label:e.$t("componentConditionManage.name"),align:"center"}}),t("el-table-column",{attrs:{prop:"holdpace",label:e.$t("componentConditionManage.holdpace"),align:"center"}}),t("el-table-column",{attrs:{prop:"param",label:e.$t("componentConditionManage.param"),align:"center"}}),t("el-table-column",{attrs:{prop:"type",label:e.$t("componentConditionManage.type"),align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s("text"==t.row.type?e.$t("componentConditionManage.text"):e.$t("componentConditionManage.date"))+" ")]}}])}),t("el-table-column",{attrs:{prop:"seq",label:e.$t("componentConditionManage.seq"),align:"center"}}),t("el-table-column",{attrs:{prop:"remark",label:e.$t("componentConditionManage.remark"),align:"center"}}),t("el-table-column",{attrs:{label:e.$t("common.operation"),align:"center",width:"180"},scopedSlots:e._u([{key:"default",fn:function(o){return[t("el-button-group",[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e._openEditComponentConditionModel(o.row)}}},[e._v(" "+e._s(e.$t("common.edit"))+" ")]),t("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(t){return e._openDeleteComponentConditionModel(o.row)}}},[e._v(" "+e._s(e.$t("common.delete"))+" ")])],1)]}}])})],1),t("el-pagination",{attrs:{"current-page":e.componentConditionManageInfo.conditions.page,"page-size":e.DEFAULT_ROWS,layout:"total, prev, pager, next, jumper",total:e.componentConditionManageInfo.total},on:{"current-change":e.handleCurrentChange}})],1)],1)],1),t("add-component-condition",{ref:"addComponentCondition"}),t("edit-component-condition",{ref:"editComponentCondition"}),t("delete-component-condition",{ref:"deleteComponentCondition"})],1)},a=[],i=o("b775");function r(e){return new Promise((t,o)=>{Object(i["a"])({url:"/reportCustomComponentCondition.listReportCustomComponentCondition",method:"get",params:e}).then(e=>{const o=e.data;t(o)}).catch(e=>{o(e)})})}function l(e){return new Promise((t,o)=>{Object(i["a"])({url:"/reportCustomComponentCondition.saveReportCustomComponentCondition",method:"post",data:e}).then(e=>{const o=e.data;t(o)}).catch(e=>{o(e)})})}function s(e){return new Promise((t,o)=>{Object(i["a"])({url:"/reportCustomComponentCondition.updateReportCustomComponentCondition",method:"post",data:e}).then(e=>{const o=e.data;t(o)}).catch(e=>{o(e)})})}function m(e){return new Promise((t,o)=>{Object(i["a"])({url:"/reportCustomComponentCondition.deleteReportCustomComponentCondition",method:"post",data:e}).then(e=>{const o=e.data;t(o)}).catch(e=>{o(e)})})}var c=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("componentConditionManage.addCondition"),visible:e.dialogVisible,width:"60%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("el-form",{ref:"form",attrs:{model:e.formData,rules:e.rules,"label-width":"120px"}},[t("el-form-item",{attrs:{label:e.$t("componentConditionManage.name"),prop:"name"}},[t("el-input",{attrs:{placeholder:e.$t("componentConditionManage.namePlaceholder"),clearable:""},model:{value:e.formData.name,callback:function(t){e.$set(e.formData,"name",t)},expression:"formData.name"}})],1),t("el-form-item",{attrs:{label:e.$t("componentConditionManage.holdpace"),prop:"holdpace"}},[t("el-input",{attrs:{placeholder:e.$t("componentConditionManage.holdpacePlaceholder"),clearable:""},model:{value:e.formData.holdpace,callback:function(t){e.$set(e.formData,"holdpace",t)},expression:"formData.holdpace"}})],1),t("el-form-item",{attrs:{label:e.$t("componentConditionManage.param"),prop:"param"}},[t("el-input",{attrs:{placeholder:e.$t("componentConditionManage.paramPlaceholder"),clearable:""},model:{value:e.formData.param,callback:function(t){e.$set(e.formData,"param",t)},expression:"formData.param"}})],1),t("el-form-item",{attrs:{label:e.$t("componentConditionManage.type"),prop:"type"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("componentConditionManage.typePlaceholder")},model:{value:e.formData.type,callback:function(t){e.$set(e.formData,"type",t)},expression:"formData.type"}},e._l(e.typeOptions,(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("componentConditionManage.seq"),prop:"seq"}},[t("el-input",{attrs:{placeholder:e.$t("componentConditionManage.seqPlaceholder"),clearable:""},model:{value:e.formData.seq,callback:function(t){e.$set(e.formData,"seq",t)},expression:"formData.seq"}})],1),t("el-form-item",{attrs:{label:e.$t("componentConditionManage.remark")}},[t("el-input",{attrs:{type:"textarea",placeholder:e.$t("componentConditionManage.remarkPlaceholder"),rows:3},model:{value:e.formData.remark,callback:function(t){e.$set(e.formData,"remark",t)},expression:"formData.remark"}})],1)],1),t("span",{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.handleSubmit}},[e._v(e._s(e.$t("common.confirm")))])],1)],1)},d=[],p={name:"AddComponentCondition",data(){return{dialogVisible:!1,formData:{componentId:"",name:"",holdpace:"",param:"",type:"",remark:"",seq:""},rules:{name:[{required:!0,message:this.$t("componentConditionManage.nameRequired"),trigger:"blur"},{max:64,message:this.$t("componentConditionManage.nameMaxLength"),trigger:"blur"}],holdpace:[{required:!0,message:this.$t("componentConditionManage.holdpaceRequired"),trigger:"blur"},{max:64,message:this.$t("componentConditionManage.holdpaceMaxLength"),trigger:"blur"}],param:[{required:!0,message:this.$t("componentConditionManage.paramRequired"),trigger:"blur"},{max:64,message:this.$t("componentConditionManage.paramMaxLength"),trigger:"blur"}],type:[{required:!0,message:this.$t("componentConditionManage.typeRequired"),trigger:"change"}],seq:[{required:!0,message:this.$t("componentConditionManage.seqRequired"),trigger:"blur"},{pattern:/^\d+$/,message:this.$t("componentConditionManage.seqNumber"),trigger:"blur"}]},typeOptions:[{value:"text",label:this.$t("componentConditionManage.text")},{value:"date",label:this.$t("componentConditionManage.date")}]}},methods:{open(e){this.resetForm(),this.formData.componentId=e.componentId,this.dialogVisible=!0},resetForm(){this.$refs.form&&this.$refs.form.resetFields(),this.formData={componentId:"",name:"",holdpace:"",param:"",type:"",remark:"",seq:""}},handleClose(){this.resetForm()},async handleSubmit(){this.$refs.form.validate(async e=>{if(e)try{await l(this.formData),this.$message.success(this.$t("common.submitSuccess")),this.dialogVisible=!1,this.$emit("refresh")}catch(t){console.error("添加失败:",t)}})}}},u=p,g=o("2877"),h=Object(g["a"])(u,c,d,!1,null,null,null),f=h.exports,C=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("componentConditionManage.editCondition"),visible:e.dialogVisible,width:"60%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("el-form",{ref:"form",attrs:{model:e.formData,rules:e.rules,"label-width":"120px"}},[t("el-form-item",{attrs:{label:e.$t("componentConditionManage.name"),prop:"name"}},[t("el-input",{attrs:{placeholder:e.$t("componentConditionManage.namePlaceholder"),clearable:""},model:{value:e.formData.name,callback:function(t){e.$set(e.formData,"name",t)},expression:"formData.name"}})],1),t("el-form-item",{attrs:{label:e.$t("componentConditionManage.holdpace"),prop:"holdpace"}},[t("el-input",{attrs:{placeholder:e.$t("componentConditionManage.holdpacePlaceholder"),clearable:""},model:{value:e.formData.holdpace,callback:function(t){e.$set(e.formData,"holdpace",t)},expression:"formData.holdpace"}})],1),t("el-form-item",{attrs:{label:e.$t("componentConditionManage.param"),prop:"param"}},[t("el-input",{attrs:{placeholder:e.$t("componentConditionManage.paramPlaceholder"),clearable:""},model:{value:e.formData.param,callback:function(t){e.$set(e.formData,"param",t)},expression:"formData.param"}})],1),t("el-form-item",{attrs:{label:e.$t("componentConditionManage.type"),prop:"type"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("componentConditionManage.typePlaceholder")},model:{value:e.formData.type,callback:function(t){e.$set(e.formData,"type",t)},expression:"formData.type"}},e._l(e.typeOptions,(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("componentConditionManage.seq"),prop:"seq"}},[t("el-input",{attrs:{placeholder:e.$t("componentConditionManage.seqPlaceholder"),clearable:""},model:{value:e.formData.seq,callback:function(t){e.$set(e.formData,"seq",t)},expression:"formData.seq"}})],1),t("el-form-item",{attrs:{label:e.$t("componentConditionManage.remark")}},[t("el-input",{attrs:{type:"textarea",placeholder:e.$t("componentConditionManage.remarkPlaceholder"),rows:3},model:{value:e.formData.remark,callback:function(t){e.$set(e.formData,"remark",t)},expression:"formData.remark"}})],1)],1),t("span",{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.handleSubmit}},[e._v(e._s(e.$t("common.confirm")))])],1)],1)},b=[],$={name:"EditComponentCondition",data(){return{dialogVisible:!1,formData:{conditionId:"",componentId:"",name:"",holdpace:"",param:"",type:"",remark:"",seq:""},rules:{name:[{required:!0,message:this.$t("componentConditionManage.nameRequired"),trigger:"blur"},{max:64,message:this.$t("componentConditionManage.nameMaxLength"),trigger:"blur"}],holdpace:[{required:!0,message:this.$t("componentConditionManage.holdpaceRequired"),trigger:"blur"},{max:64,message:this.$t("componentConditionManage.holdpaceMaxLength"),trigger:"blur"}],param:[{required:!0,message:this.$t("componentConditionManage.paramRequired"),trigger:"blur"},{max:64,message:this.$t("componentConditionManage.paramMaxLength"),trigger:"blur"}],type:[{required:!0,message:this.$t("componentConditionManage.typeRequired"),trigger:"change"}],seq:[{required:!0,message:this.$t("componentConditionManage.seqRequired"),trigger:"blur"},{pattern:/^\d+$/,message:this.$t("componentConditionManage.seqNumber"),trigger:"blur"}],conditionId:[{required:!0,message:this.$t("componentConditionManage.conditionIdRequired"),trigger:"blur"}]},typeOptions:[{value:"text",label:this.$t("componentConditionManage.text")},{value:"date",label:this.$t("componentConditionManage.date")}]}},methods:{open(e){this.resetForm(),Object.assign(this.formData,e),this.dialogVisible=!0},resetForm(){this.$refs.form&&this.$refs.form.resetFields(),this.formData={conditionId:"",componentId:"",name:"",holdpace:"",param:"",type:"",remark:"",seq:""}},handleClose(){this.resetForm()},async handleSubmit(){this.$refs.form.validate(async e=>{if(e)try{await s(this.formData),this.$message.success(this.$t("common.submitSuccess")),this.dialogVisible=!1,this.$emit("refresh")}catch(t){console.error("修改失败:",t)}})}}},M=$,D=Object(g["a"])(M,C,b,!1,null,null,null),y=D.exports,_=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("common.confirm"),visible:e.dialogVisible,width:"30%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("div",{staticStyle:{"text-align":"center","margin-bottom":"20px"}},[t("p",[e._v(e._s(e.$t("componentConditionManage.confirmDeleteCondition")))])]),t("span",{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.handleConfirm}},[e._v(e._s(e.$t("common.confirm")))])],1)])},v=[],k={name:"DeleteComponentCondition",data(){return{dialogVisible:!1,conditionData:{}}},methods:{open(e){this.conditionData={...e},this.dialogVisible=!0},handleClose(){this.conditionData={}},async handleConfirm(){try{await m(this.conditionData),this.$message.success(this.$t("common.submitSuccess")),this.dialogVisible=!1,this.$emit("refresh")}catch(e){console.error("删除失败:",e)}}}},q=k,x=Object(g["a"])(q,_,v,!1,null,null,null),w=x.exports,I={name:"ComponentConditionManage",components:{AddComponentCondition:f,EditComponentCondition:y,DeleteComponentCondition:w},data(){return{DEFAULT_PAGE:1,DEFAULT_ROWS:10,componentConditionManageInfo:{componentConditions:[],total:0,conditions:{componentId:"",name:"",param:"",page:1,row:10},componentName:""}}},created(){this.componentConditionManageInfo.conditions.componentId=this.$route.query.componentId,this.componentConditionManageInfo.componentName=this.$route.query.componentName,this._listComponentConditions(this.DEFAULT_PAGE,this.DEFAULT_ROWS)},methods:{handleCurrentChange(e){this._listComponentConditions(e,this.DEFAULT_ROWS)},async _listComponentConditions(e,t){this.componentConditionManageInfo.conditions.page=e,this.componentConditionManageInfo.conditions.row=t;try{const e=await r(this.componentConditionManageInfo.conditions);this.componentConditionManageInfo.total=e.total,this.componentConditionManageInfo.componentConditions=e.data}catch(o){console.error("获取条件列表失败:",o)}},_openAddComponentConditionModal(){this.$refs.addComponentCondition.open({componentId:this.componentConditionManageInfo.conditions.componentId})},_openEditComponentConditionModel(e){this.$refs.editComponentCondition.open(e)},_openDeleteComponentConditionModel(e){this.$refs.deleteComponentCondition.open(e)},_goBack(){this.$router.go(-1)}}},R=I,P=(o("3277"),Object(g["a"])(R,n,a,!1,null,"0f106e42",null));t["default"]=P.exports}}]); //# sourceMappingURL=chunk-4a8a51e6.0bfa8295.js.map