1 line
8.3 KiB
JavaScript
1 line
8.3 KiB
JavaScript
"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[6684],{6684:function(t,e,r){r.r(e),r.d(e,{default:function(){return y}});var n=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}},[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)},a=[],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:"name"}},[e("el-input",{model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),e("el-form-item",{attrs:{label:"报表分类",prop:"category"}},[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"报表分类"},model:{value:t.form.category,callback:function(e){t.$set(t.form,"category",e)},expression:"form.category"}},t._l(t.typeList,(function(t,r){return e("el-option",{key:r,attrs:{label:t.dataName,value:t.dataName}})})),1)],1)],1)},o=[],u=r(910),s={name:"ReportNameEdit",data(){return{form:{id:"",name:"",category:""},typeList:[{dataName:"能源",id:1},{dataName:"订单",id:2},{dataName:"设备",id:3},{dataName:"人员",id:4}],rules:{name:[{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.category=t.data.category,this.form.name=t.data.name)})))},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),m=d.exports,f=r(475);const p=[{prop:"name",label:"报表名称"},{prop:"category",label:"报表分类"},{prop:"createTime",label:"添加时间",filter:f.g6}],h=[{type:"view",btnName:"预览"},{type:"design",btnName:"设计"},{type:"edit",btnName:"编辑"},{type:"delete",btnName:"删除"}];var b={name:"ReportListDetail",components:{ReportNameEdit:m},data(){return{formConfig:[{type:"input",label:"关键字",placeholder:"报表名称",param:"name",width:300},{type:"button",btnName:"查询",name:"search",color:"primary"},{type:"separate"},{type:"button",btnName:"新增",name:"add",color:"success",plain:!0}],tableProps:p,tableData:[],tableBtn:h,tableH:(0,f.NC)(330),total:0,listQuery:{current:1,size:20},centervisible:!1,addOrEditTitle:""}},mounted(){window.addEventListener("resize",(()=>{this.tableH=(0,f.NC)(265)})),this.getList()},methods:{getList(){(0,u.kB)({...this.listQuery}).then((t=>{console.log(t),0===t.code&&t.data?(this.tableData=t.data.records,this.total=t.data.total):(this.tableData=[],this.total=0)}))},handleClick(t){switch(console.log(t.data.name),t.type){case"view":this.$router.push({path:"/basicConfig/reportManagement/reportView",query:{name:t.data.name}});break;case"design":this.$router.push({path:"/basicConfig/reportManagement/reportDesign",query:{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((t=>{console.log(t),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.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()}}},g=b,C=(0,l.Z)(g,n,a,!1,null,null,null),y=C.exports},910:function(t,e,r){r.d(e,{$0:function(){return v},A0:function(){return $},D0:function(){return o},ER:function(){return B},Kl:function(){return k},ME:function(){return l},Or:function(){return g},P4:function(){return c},Py:function(){return d},QL:function(){return D},Qj:function(){return N},Sc:function(){return h},WZ:function(){return p},Wj:function(){return s},Zs:function(){return a},_:function(){return q},_1:function(){return C},ag:function(){return w},b8:function(){return b},dN:function(){return m},fZ:function(){return f},gz:function(){return y},jF:function(){return i},kB:function(){return P},oW:function(){return Q},qT:function(){return Z},sU:function(){return u},sy:function(){return _},tb:function(){return L},wy:function(){return x},xf:function(){return E}});var n=r(8859);function a(t){return(0,n.Z)({url:"/basic/account/page",method:"post",data:t})}function i(t){return(0,n.Z)({url:"/basic/account/add",method:"post",data:t})}function o(t){return(0,n.Z)({url:"/basic/account/get",method:"post",data:t})}function u(t){return(0,n.Z)({url:"/basic/account/update",method:"post",data:t})}function s(t){return(0,n.Z)({url:"/basic/sparePartsConfiguration/page",method:"post",data:t})}function c(t){return(0,n.Z)({url:"/basic/sparePartsConfiguration/add",method:"post",data:t})}function l(t){return(0,n.Z)({url:"/basic/sparePartsConfiguration/get",method:"post",data:t})}function d(t){return(0,n.Z)({url:"/basic/sparePartsConfiguration/update",method:"post",data:t})}function m(t){return(0,n.Z)({url:"/basic/sparePartsConfiguration/getNameList",method:"post",data:t})}function f(t){return(0,n.Z)({url:"/basic/sparePartsConfiguration/getModelList",method:"post",data:t})}function p(t){return(0,n.Z)({url:"/basic/consumableConfiguration/page",method:"post",data:t})}function h(t){return(0,n.Z)({url:"/basic/consumableConfiguration/add",method:"post",data:t})}function b(t){return(0,n.Z)({url:"/basic/consumableConfiguration/get",method:"post",data:t})}function g(t){return(0,n.Z)({url:"/basic/consumableConfiguration/update",method:"post",data:t})}function C(t){return(0,n.Z)({url:"/basic/consumableConfiguration/materialAndUnit",method:"post",data:t})}function y(t){return(0,n.Z)({url:"/basic/consumableConfiguration/specList",method:"post",data:t})}function Z(t){return(0,n.Z)({url:"/basic/sideLibraryConfiguration/page",method:"post",data:t})}function N(t){return(0,n.Z)({url:"/basic/sideLibraryConfiguration/add",method:"post",data:t})}function L(t){return(0,n.Z)({url:"/basic/sideLibraryConfiguration/get",method:"post",data:t})}function k(t){return(0,n.Z)({url:"/basic/sideLibraryConfiguration/update",method:"post",data:t})}function $(t){return(0,n.Z)({url:"/basic/sideLibraryConfiguration/list",method:"post",data:t})}function v(t){return(0,n.Z)({url:"/basic/equipmentConfiguration/page",method:"post",data:t})}function w(t){return(0,n.Z)({url:"/basic/equipmentConfiguration/add",method:"post",data:t})}function E(t){return(0,n.Z)({url:"/basic/equipmentConfiguration/get",method:"post",data:t})}function Q(t){return(0,n.Z)({url:"/basic/equipmentConfiguration/update",method:"post",data:t})}function q(t){return(0,n.Z)({url:"/basic/equipmentConfiguration/getUnitList",method:"post",formState:!0,data:t})}function B(t){return(0,n.Z)({url:"/basic/equipmentConfiguration/getEqCode",method:"post",data:t})}function P(t){return(0,n.Z)({url:"/report/report-sheet/page",method:"post",data:t})}function _(t){return(0,n.Z)({url:"/report/report-sheet/update",method:"post",data:t})}function x(t){return(0,n.Z)({url:"/report/report-sheet/delete",method:"post",data:t})}function D(t){return(0,n.Z)({url:"/report/report-sheet/get",method:"post",data:t})}}}]); |