1 wiersz
8.3 KiB
JavaScript
1 wiersz
8.3 KiB
JavaScript
|
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[7705],{7705: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=[],o=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)},i=[],s=r(6527),l={name:"ReportNameEdit",data(){return{form:{id:"",fileName:""},rules:{fileName:[{required:!0,message:"请输入报表分类名",trigger:"blur"}]}}},methods:{init(t){t&&(this.form.id=t,(0,s.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,s.sy)({...this.form}).then((t=>{0===t.code&&(this.$message({message:"操作成功",type:"success"}),this.$emit("successSubmit"))})),this.$emit("successSubmit")}))},formClear(){this.$refs.form.resetFields()}}},u=l,c=r(1001),d=(0,c.Z)(u,o,i,!1,null,null,null),p=d.exports,m=r(475),h=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)},f=[],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()}}},y=g,b=(0,c.Z)(y,h,f,!1,null,null,null),C=b.exports;const N=[{prop:"fileName",label:"报表名称"},{prop:"category",label:"报表分类",subcomponent:C},{prop:"createTime",label:"添加时间",filter:m.g6}],k=[{type:"view",btnName:"预览"},{type:"design",btnName:"设计"},{type:"edit",btnName:"编辑"},{type:"delete",btnName:"删除"}];var Z={name:"ReportListDetail",components:{ReportNameEdit:p},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:N,tableData:[],tableBtn:k,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.category=this.$rout
|