tft-fe/dist/js/5286.1c513d99.js

1 line
10 KiB
JavaScript
Raw Normal View History

2023-03-23 15:50:11 +08:00
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[5286],{5286:function(t,e,r){r.r(e),r.d(e,{default:function(){return v}});var a=function(){var t=this,e=t._self._c;return e("div",{staticClass:"report-classification"},[e("search-bar",{ref:"searchBarForm",attrs:{formConfigs:t.formConfig},on:{headBtnClick:t.buttonClick}}),e("base-table",{attrs:{page:t.listQuery.current,limit:t.listQuery.size,"table-props":t.tableProps,"table-data":t.tableData,"max-height":t.tableH},on:{emitFun:t.categoryChange}},[t.tableBtn.length?e("method-btn",{attrs:{slot:"handleBtn",width:180,label:"操作","method-list":t.tableBtn},on:{clickBtn:t.handleClick},slot:"handleBtn"}):t._e()],1),e("pagination",{attrs:{page:t.listQuery.current,limit:t.listQuery.size,total:t.total},on:{"update:page":function(e){return t.$set(t.listQuery,"current",e)},"update:limit":function(e){return t.$set(t.listQuery,"size",e)},pagination:function(e){return t.getList()}}}),e("base-dialog",{attrs:{dialogTitle:t.addOrEditTitle,dialogVisible:t.centervisible,"before-close":t.handleCancel},on:{cancel:t.handleCancel,confirm:t.handleConfirm}},[e("report-name-edit",{ref:"reportNameEdit",on:{successSubmit:t.successSubmit}})],1)],1)},n=[],i=function(){var t=this,e=t._self._c;return e("el-form",{ref:"form",attrs:{rules:t.rules,"label-width":"100px",model:t.form}},[e("el-form-item",{attrs:{label:"报表名称",prop:"fileName"}},[e("el-input",{model:{value:t.form.fileName,callback:function(e){t.$set(t.form,"fileName",e)},expression:"form.fileName"}})],1)],1)},o=[],u=r(910),s={name:"ReportNameEdit",data(){return{form:{id:"",fileName:""},rules:{fileName:[{required:!0,message:"请输入报表分类名",trigger:"blur"}]}}},methods:{init(t){t&&(this.form.id=t,(0,u.QL)({id:t}).then((t=>{0===t.code&&(this.form.fileName=t.data.fileName)})))},submitForm(){this.$refs["form"].validate((t=>{if(!t)return!1;(0,u.sy)({...this.form}).then((t=>{0===t.code&&(this.$message({message:"操作成功",type:"success",duration:1500}),this.$emit("successSubmit"))})),this.$emit("successSubmit")}))},formClear(){this.$refs.form.resetFields()}}},c=s,l=r(1001),d=(0,l.Z)(c,i,o,!1,null,null,null),f=d.exports,m=r(475),p=function(){var t=this,e=t._self._c;return e("div",[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择"},on:{change:t.changeCategory},model:{value:t.categoryId,callback:function(e){t.categoryId=e},expression:"categoryId"}},t._l(t.list,(function(t){return e("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1)},h=[],g={name:"categorySelect",props:{injectData:{type:Object,default:()=>({})}},data(){return{categoryId:"",list:JSON.parse(localStorage.getItem("reportCategory"))}},mounted(){this.init()},methods:{init(){this.categoryId=this.injectData.category},changeCategory(){this.$emit("emitData",{categoryId:this.categoryId,injectData:this.injectData})}},watch:{injectData(t,e){e.enabled!==t.enabled&&this.init()}}},b=g,y=(0,l.Z)(b,p,h,!1,null,null,null),C=y.exports;const Z=[{prop:"fileName",label:"报表名称"},{prop:"category",label:"报表分类",subcomponent:C},{prop:"createTime",label:"添加时间",filter:m.g6}],N=[{type:"view",btnName:"预览"},{type:"design",btnName:"设计"},{type:"edit",btnName:"编辑"},{type:"delete",btnName:"删除"}];var $={name:"ReportListDetail",components:{ReportNameEdit:f},data(){return{formConfig:[{type:"input",label:"关键字",placeholder:"报表名称",param:"name",width:200},{type:"select",label:"报表分类",selectOptions:[],param:"category",labelField:"name",valueField:"id",defaultSelect:"",width:200},{type:"button",btnName:"查询",name:"search",color:"primary"},{type:"separate"},{type:"button",btnName:"新增",name:"add",color:"success",plain:!0}],tableProps:Z,tableData:[],tableBtn:N,tableH:(0,m.NC)(330),total:0,listQuery:{current:1,size:20,name:"",category:""},typeList:[],centervisible:!1,addOrEditTitle:""}},created(){this.getCategorylist()},mounted(){window.addEventListener("resize",(()=>{this.tableH=(0,m.NC)(265)})),this.formConfig[1].defaultSelect=this.$route.params.categoryId||"",this.listQuery.catego