1 line
10 KiB
JavaScript
1 line
10 KiB
JavaScript
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[2049],{2049: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.category=this.$route.params.categoryId||"",this.getList()},methods:{getList(){(0,u.kB)({...this.listQuery}).then((t=>{0===t.code&&t.data?(this.tableData=t.data.records,this.total=t.data.total):(this.tableData=[],this.total=0)}))},getCategorylist(){(0,u.J_)({}).then((t=>{0===t.code&&t.data.length>0?(localStorage.setItem("reportCategory",JSON.stringify(t.data)),this.formConfig[1].selectOptions=t.data):localStorage.setItem("reportCategory","")}))},handleClick(t){switch(t.type){case"view":this.$router.push({name:"reportView",params:{name:t.data.name}});break;case"design":this.$router.push({name:"reportDesign",params:{name:t.data.name}});break;case"edit":this.addOrEditTitle="编辑",this.centervisible=!0,this.$nextTick((()=>{this.$refs.reportNameEdit.init(t.data.id)}));break;default:this.$confirm('确认删除报表"'+t.data.name+'"吗?',{type:"warning"}).then((()=>{(0,u.wy)({id:t.data.id}).then((()=>{this.$message({message:"报表删除成功",type:"success",duration:1500,onClose:()=>{}}),this.listQuery.current=1,this.getList()}))})).catch((()=>{}))}},buttonClick(t){switch(t.btnName){case"search":this.listQuery.name=t.name,this.listQuery.category=t.category,this.listQuery.current=1,this.getList();break;default:this.$router.push({path:"/basicConfig/reportManagement/reportDesign"})}},handleCancel(){this.$refs.reportNameEdit.formClear(),this.centervisible=!1,this.addOrEditTitle=""},handleConfirm(){this.$refs.reportNameEdit.submitForm()},successSubmit(){this.handleCancel(),this.getList()},categoryChange(t){(0,u.sy)({fileName:t.injectData.fileName,id:t.injectData.id,category:t.categoryId}).then((t=>{0===t.code&&(this.$message({message:"操作成功",type:"success",duration:1500}),this.getList())}))}}},k=$,L=(0,l.Z)(k,a,n,!1,null,null,null),v=L.exports},910:function(t,e,r){r.d(e,{$0:function(){return v},A0:function(){return L},D0:function(){return o},ER:function(){return E},Hg:function(){return F},J_:function(){return _},Kl:function(){return k},ME:function(){return l},Or:function(){return b},P4:function(){return c},Py:function(){return d},QL:function(){return O},Qj:function(){return N},Sc:function(){return h},W0:function(){return T},WZ:function(){return p},Wj:function(){return s},Zs:function(){return n},_:function(){return S},_1:function(){return y},a:function(){return x},ag:function(){return w},b8:function(){return g},dN:function(){return f},fZ:function(){return m},gz:function(){return C},jF:function(){return i},kB:function(){return I},m3:function(){return q},oW:function(){return Q},qT:function(){return Z},sU:function(){return u},sy:function(){return j},tb:function(){return $},wy:function(){return B},xf:function(){return D},yk:function(){return P}});var a=r(8859);function n(t){return(0,a.Z)({url:"/basic/account/page",method:"post",data:t})}function i(t){return(0,a.Z)({url:"/basic/account/add",method:"post",data:t})}function o(t){return(0,a.Z)({url:"/basic/account/get",method:"post",data:t})}function u(t){return(0,a.Z)({url:"/basic/account/update",method:"post",data:t})}function s(t){return(0,a.Z)({url:"/basic/sparePartsConfiguration/page",method:"post",data:t})}function c(t){return(0,a.Z)({url:"/basic/sparePartsConfiguration/add",method:"post",data:t})}function l(t){return(0,a.Z)({url:"/basic/sparePartsConfiguration/get",method:"post",data:t})}function d(t){return(0,a.Z)({url:"/basic/sparePartsConfiguration/update",method:"post",data:t})}function f(t){return(0,a.Z)({url:"/basic/sparePartsConfiguration/getNameList",method:"post",data:t})}function m(t){return(0,a.Z)({url:"/basic/sparePartsConfiguration/getModelList",method:"post",data:t})}function p(t){return(0,a.Z)({url:"/basic/consumableConfiguration/page",method:"post",data:t})}function h(t){return(0,a.Z)({url:"/basic/consumableConfiguration/add",method:"post",data:t})}function g(t){return(0,a.Z)({url:"/basic/consumableConfiguration/get",method:"post",data:t})}function b(t){return(0,a.Z)({url:"/basic/consumableConfiguration/update",method:"post",data:t})}function y(t){return(0,a.Z)({url:"/basic/consumableConfiguration/materialAndUnit",method:"post",data:t})}function C(t){return(0,a.Z)({url:"/basic/consumableConfiguration/specList",method:"post",data:t})}function Z(t){return(0,a.Z)({url:"/basic/sideLibraryConfiguration/page",method:"post",data:t})}function N(t){return(0,a.Z)({url:"/basic/sideLibraryConfiguration/add",method:"post",data:t})}function $(t){return(0,a.Z)({url:"/basic/sideLibraryConfiguration/get",method:"post",data:t})}function k(t){return(0,a.Z)({url:"/basic/sideLibraryConfiguration/update",method:"post",data:t})}function L(t){return(0,a.Z)({url:"/basic/sideLibraryConfiguration/list",method:"post",data:t})}function v(t){return(0,a.Z)({url:"/basic/equipmentConfiguration/page",method:"post",data:t})}function w(t){return(0,a.Z)({url:"/basic/equipmentConfiguration/add",method:"post",data:t})}function D(t){return(0,a.Z)({url:"/basic/equipmentConfiguration/get",method:"post",data:t})}function Q(t){return(0,a.Z)({url:"/basic/equipmentConfiguration/update",method:"post",data:t})}function S(t){return(0,a.Z)({url:"/basic/equipmentConfiguration/getUnitList",method:"post",formState:!0,data:t})}function E(t){return(0,a.Z)({url:"/basic/equipmentConfiguration/getEqCode",method:"post",data:t})}function _(t){return(0,a.Z)({url:"/report/report-sheet-category/list",method:"post",data:t})}function I(t){return(0,a.Z)({url:"/report/report-sheet/page",method:"post",data:t})}function j(t){return(0,a.Z)({url:"/report/report-sheet/update",method:"post",data:t})}function B(t){return(0,a.Z)({url:"/report/report-sheet/delete",method:"post",data:t})}function O(t){return(0,a.Z)({url:"/report/report-sheet/get",method:"post",data:t})}function P(t){return(0,a.Z)({url:"/report/report-sheet-category/page",method:"post",data:t})}function q(t){return(0,a.Z)({url:"/report/report-sheet-category/add",method:"post",data:t})}function x(t){return(0,a.Z)({url:"/report/report-sheet-category/update",method:"post",data:t})}function F(t){return(0,a.Z)({url:"/report/report-sheet-category/get",method:"post",data:t})}function T(t){return(0,a.Z)({url:"/report/report-sheet-category/delete",method:"post",data:t})}}}]); |